@cnrai/pave 0.11.83 → 0.11.101

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.
Files changed (70) hide show
  1. package/package.json +1 -1
  2. package/pave.js +2 -2
  3. package/web/assets/{abnfDiagram-VCTEODGH-9I7swegc.js → abnfDiagram-VCTEODGH-CixVqOyW.js} +1 -1
  4. package/web/assets/{arc-DyVWQdpx.js → arc-t-ssOsPw.js} +1 -1
  5. package/web/assets/{architectureDiagram-5GKGNRK7-Bu33Fevc.js → architectureDiagram-5GKGNRK7-xwtc8tHh.js} +1 -1
  6. package/web/assets/{blockDiagram-NRAW4CY4-BjSrG4Gi.js → blockDiagram-I7D4REHJ-BWvDCIy7.js} +2 -2
  7. package/web/assets/{c4Diagram-UCG6FXSJ-DKW76ufa.js → c4Diagram-7LVT6UL2-DPNdwG7s.js} +1 -1
  8. package/web/assets/channel-D59gS-Le.js +1 -0
  9. package/web/assets/{chunk-2Q5K7J3B-DWiA9qEw.js → chunk-2Q5K7J3B-Drf5hWti.js} +1 -1
  10. package/web/assets/{chunk-5VM5RSS4-BxwBK-a7.js → chunk-5VM5RSS4-CQu6N1fr.js} +1 -1
  11. package/web/assets/{chunk-F27PBJKO-55JB7WtZ.js → chunk-F27PBJKO-BNHim5Uk.js} +1 -1
  12. package/web/assets/{chunk-G27WJ6UU-BYcYIibk.js → chunk-IMKFNOWR-61u8Xam-.js} +1 -1
  13. package/web/assets/{chunk-JWPE2WC7-D-kqXy5w.js → chunk-JWPE2WC7-CxvMM081.js} +1 -1
  14. package/web/assets/{chunk-POPQ4Y6H-B-1wHMit.js → chunk-POPQ4Y6H-CZXpKqgY.js} +1 -1
  15. package/web/assets/{chunk-SVP7TREG-BUGEg5xN.js → chunk-SVP7TREG-BAPDK64W.js} +1 -1
  16. package/web/assets/{chunk-LCL6LL3I-D7ezi85E.js → chunk-TICWLB2K-DvGKh0xN.js} +1 -1
  17. package/web/assets/{chunk-XXDRQBXY-Cb0f4fIf.js → chunk-XXDRQBXY-CwJXX4Gu.js} +1 -1
  18. package/web/assets/classDiagram-ZZMXUADV-Bewdb9Y_.js +1 -0
  19. package/web/assets/classDiagram-v2-VYDZK3BY-Bewdb9Y_.js +1 -0
  20. package/web/assets/{cose-bilkent-JH36ORCC-CAWDvLIh.js → cose-bilkent-JH36ORCC-DVHat7AO.js} +1 -1
  21. package/web/assets/{cynefin-OW5HDTMX-Cosp1kQ3.js → cynefin-OW5HDTMX-Bi5sXTWO.js} +1 -1
  22. package/web/assets/{cynefinDiagram-5FMLGOSQ-DNbene_1.js → cynefinDiagram-5FMLGOSQ-DE2_LSH7.js} +1 -1
  23. package/web/assets/{cytoscape.esm-Dz9tvMTw.js → cytoscape.esm-BB-IEtsb.js} +1 -1
  24. package/web/assets/{dagre-3AP2YEHR-CP2z1R4J.js → dagre-GXQ25YYZ-BKanjdm8.js} +1 -1
  25. package/web/assets/{diagram-S7CK7UJ4-Bq6kE3Qo.js → diagram-S7CK7UJ4-D1AUiOrg.js} +1 -1
  26. package/web/assets/{diagram-UQ7AKVKN-BjhawDgz.js → diagram-UQ7AKVKN-DriLbD41.js} +1 -1
  27. package/web/assets/{diagram-VSXAHHWV-k-uyl7kx.js → diagram-VSXAHHWV-DnUn3PWq.js} +1 -1
  28. package/web/assets/{diagram-VX7I27RA-CvQYwC6D.js → diagram-VX7I27RA-B9PfnVER.js} +1 -1
  29. package/web/assets/{diagram-Z3DM3KII-ClEsZ-KM.js → diagram-Z3DM3KII-CoPPej-B.js} +1 -1
  30. package/web/assets/{ebnfDiagram-PWID7BFC-DM6ZbS6R.js → ebnfDiagram-PWID7BFC-G2lYKGN9.js} +1 -1
  31. package/web/assets/{erDiagram-SSCWMZ5O-CYaU_Nw-.js → erDiagram-RLTQ6QDP-BZgLGej_.js} +1 -1
  32. package/web/assets/{flowDiagram-A5DVABFB-C5Rbw9x2.js → flowDiagram-HODETNUW-D4vFPsPz.js} +5 -5
  33. package/web/assets/{ganttDiagram-EL5Y4UJY-1uZXMEyg.js → ganttDiagram-EL5Y4UJY-BV-vOymv.js} +1 -1
  34. package/web/assets/{gitGraphDiagram-WWUBYQGX-Be1ZzKab.js → gitGraphDiagram-WWUBYQGX-BzrTgIPA.js} +1 -1
  35. package/web/assets/index-CocW84LJ.js +130 -0
  36. package/web/assets/index-DQj4J6ml.css +10 -0
  37. package/web/assets/{infoDiagram-RXCK75RN-C910kEri.js → infoDiagram-27XIBGKW-BNjnp8Bw.js} +1 -1
  38. package/web/assets/{ishikawaDiagram-5VMMS53U-CqIAX_4U.js → ishikawaDiagram-5VMMS53U-CRRDJ96x.js} +1 -1
  39. package/web/assets/{journeyDiagram-EYS64GPL-BJH2T6Oe.js → journeyDiagram-3NMN7TZE-DCH1Q0q5.js} +2 -2
  40. package/web/assets/{kanban-definition-3QL26DDD-D4MwIQqo.js → kanban-definition-UXKFOSKX-DNG-2lIe.js} +1 -1
  41. package/web/assets/{layout-E0MZ6Vxs.js → layout-D_zjK4GZ.js} +1 -1
  42. package/web/assets/{linear-BUHqk8Cw.js → linear-BGvNqoX4.js} +1 -1
  43. package/web/assets/{mermaid.core-AbOCDXp6.js → mermaid.core-3qfJimpG.js} +21 -21
  44. package/web/assets/{mindmap-definition-FBJOCRG2-BAJfUJuW.js → mindmap-definition-YA3MSWOX-IAdhY6Xi.js} +1 -1
  45. package/web/assets/{pegDiagram-XKGWAZYB-5bYvRIwo.js → pegDiagram-XKGWAZYB-BpnIe36z.js} +1 -1
  46. package/web/assets/{pieDiagram-E7YTZNPT-D2yDVdcL.js → pieDiagram-E7YTZNPT-j4H9g-5p.js} +1 -1
  47. package/web/assets/{quadrantDiagram-AXDQQJYC-BnD6S8YV.js → quadrantDiagram-AXDQQJYC-tQl3LM00.js} +1 -1
  48. package/web/assets/{railroadDiagram-O6MQD6OU-DQR3NMJt.js → railroadDiagram-O6MQD6OU-DkzjcGjo.js} +1 -1
  49. package/web/assets/{requirementDiagram-EFPCY7ZU-B6ZQEd81.js → requirementDiagram-BXWQKSXE-CbdDUSXh.js} +1 -1
  50. package/web/assets/{sankeyDiagram-P5KCCOFB-gujp6WSF.js → sankeyDiagram-P5KCCOFB-CgweF3tC.js} +1 -1
  51. package/web/assets/{sequenceDiagram-WJ2MYXX4-hohjJ8lb.js → sequenceDiagram-WJ2MYXX4-DRhfwJem.js} +1 -1
  52. package/web/assets/{sizeCapture-X5ZJPWSS-nn3k8g1M.js → sizeCapture-INFHLROL-CX_hwOdH.js} +1 -1
  53. package/web/assets/{stateDiagram-HBIQ2CUA-k17nzvdJ.js → stateDiagram-D77RDMKH-CRKt2Roy.js} +1 -1
  54. package/web/assets/stateDiagram-v2-MP3YSRHH-6BlUiFQM.js +1 -0
  55. package/web/assets/{swimlanes-XN3QIQJK-T7GDnOeh.js → swimlanes-42K2YHIH-Cs5FclrO.js} +1 -1
  56. package/web/assets/swimlanesDiagram-VR7AAH4N-UE24U6QV.js +8 -0
  57. package/web/assets/{timeline-definition-24CTP7MA-CrjmBowP.js → timeline-definition-24CTP7MA-B1ztwagu.js} +1 -1
  58. package/web/assets/{vennDiagram-4TSXK5OY-t0JqhJnA.js → vennDiagram-4TSXK5OY-DaVmdE2o.js} +1 -1
  59. package/web/assets/{wardleyDiagram-VM6X3IG4-DKYd1Jnq.js → wardleyDiagram-VM6X3IG4-CXnyk8a1.js} +1 -1
  60. package/web/assets/{xychartDiagram-S5SC5T6Z-CH7Mipdq.js → xychartDiagram-S5SC5T6Z-D8Jt8h9M.js} +1 -1
  61. package/web/assets/zh-TW-Dm47zZ30.js +1 -0
  62. package/web/index.html +2 -2
  63. package/web/assets/channel-lYoL_8ok.js +0 -1
  64. package/web/assets/classDiagram-DTDB5LWJ-C5UXAo_j.js +0 -1
  65. package/web/assets/classDiagram-v2-JRS7N3AN-C5UXAo_j.js +0 -1
  66. package/web/assets/index-C5qeLycK.css +0 -10
  67. package/web/assets/index-CV--Typp.js +0 -122
  68. package/web/assets/stateDiagram-v2-4QOOHH4V-D5-Y44AB.js +0 -1
  69. package/web/assets/swimlanesDiagram-VK2B7HYN-BmhKCblm.js +0 -8
  70. package/web/assets/zh-TW-DNKt7XlL.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-nn3k8g1M.js","assets/index-CV--Typp.js","assets/index-C5qeLycK.css","assets/dagre-3AP2YEHR-CP2z1R4J.js","assets/layout-E0MZ6Vxs.js","assets/swimlanes-XN3QIQJK-T7GDnOeh.js","assets/cose-bilkent-JH36ORCC-CAWDvLIh.js","assets/cytoscape.esm-Dz9tvMTw.js","assets/c4Diagram-UCG6FXSJ-DKW76ufa.js","assets/chunk-F27PBJKO-55JB7WtZ.js","assets/flowDiagram-A5DVABFB-C5Rbw9x2.js","assets/chunk-5VM5RSS4-BxwBK-a7.js","assets/chunk-XXDRQBXY-Cb0f4fIf.js","assets/chunk-POPQ4Y6H-B-1wHMit.js","assets/channel-lYoL_8ok.js","assets/swimlanesDiagram-VK2B7HYN-BmhKCblm.js","assets/erDiagram-SSCWMZ5O-CYaU_Nw-.js","assets/gitGraphDiagram-WWUBYQGX-Be1ZzKab.js","assets/chunk-2Q5K7J3B-DWiA9qEw.js","assets/chunk-JWPE2WC7-D-kqXy5w.js","assets/cynefin-OW5HDTMX-Cosp1kQ3.js","assets/ganttDiagram-EL5Y4UJY-1uZXMEyg.js","assets/linear-BUHqk8Cw.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-RXCK75RN-C910kEri.js","assets/pieDiagram-E7YTZNPT-D2yDVdcL.js","assets/arc-DyVWQdpx.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-BnD6S8YV.js","assets/xychartDiagram-S5SC5T6Z-CH7Mipdq.js","assets/requirementDiagram-EFPCY7ZU-B6ZQEd81.js","assets/sequenceDiagram-WJ2MYXX4-hohjJ8lb.js","assets/classDiagram-DTDB5LWJ-C5UXAo_j.js","assets/chunk-LCL6LL3I-D7ezi85E.js","assets/classDiagram-v2-JRS7N3AN-C5UXAo_j.js","assets/stateDiagram-HBIQ2CUA-k17nzvdJ.js","assets/chunk-G27WJ6UU-BYcYIibk.js","assets/stateDiagram-v2-4QOOHH4V-D5-Y44AB.js","assets/journeyDiagram-EYS64GPL-BJH2T6Oe.js","assets/timeline-definition-24CTP7MA-CrjmBowP.js","assets/mindmap-definition-FBJOCRG2-BAJfUJuW.js","assets/kanban-definition-3QL26DDD-D4MwIQqo.js","assets/sankeyDiagram-P5KCCOFB-gujp6WSF.js","assets/diagram-Z3DM3KII-ClEsZ-KM.js","assets/diagram-UQ7AKVKN-BjhawDgz.js","assets/blockDiagram-NRAW4CY4-BjSrG4Gi.js","assets/diagram-S7CK7UJ4-Bq6kE3Qo.js","assets/architectureDiagram-5GKGNRK7-Bu33Fevc.js","assets/diagram-VSXAHHWV-k-uyl7kx.js","assets/ishikawaDiagram-5VMMS53U-CqIAX_4U.js","assets/vennDiagram-4TSXK5OY-t0JqhJnA.js","assets/diagram-VX7I27RA-CvQYwC6D.js","assets/wardleyDiagram-VM6X3IG4-DKYd1Jnq.js","assets/cynefinDiagram-5FMLGOSQ-DNbene_1.js","assets/railroadDiagram-O6MQD6OU-DQR3NMJt.js","assets/chunk-SVP7TREG-BUGEg5xN.js","assets/ebnfDiagram-PWID7BFC-DM6ZbS6R.js","assets/abnfDiagram-VCTEODGH-9I7swegc.js","assets/pegDiagram-XKGWAZYB-5bYvRIwo.js"])))=>i.map(i=>d[i]);
2
- var dm=Object.defineProperty;var fm=(e,t,r)=>t in e?dm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Nt=(e,t,r)=>fm(e,typeof t!="symbol"?t+"":t,r);import{g as wn,c as Eo,p as hi,_ as Mt}from"./index-CV--Typp.js";var ku=Object.defineProperty,g=(e,t)=>ku(e,"name",{value:t,configurable:!0}),gm=(e,t)=>{for(var r in t)ku(e,r,{get:t[r],enumerable:!0})},wu={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Eo,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",y="date",m="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,k={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(A){var E=["th","st","nd","rd"],B=A%100;return"["+A+(E[(B-20)%10]||E[B]||E[0])+"]"}},w=function(A,E,B){var P=String(A);return!P||P.length>=E?A:""+Array(E+1-P.length).join(B)+A},T={s:w,z:function(A){var E=-A.utcOffset(),B=Math.abs(E),P=Math.floor(B/60),$=B%60;return(E<=0?"+":"-")+w(P,2,"0")+":"+w($,2,"0")},m:function A(E,B){if(E.date()<B.date())return-A(B,E);var P=12*(B.year()-E.year())+(B.month()-E.month()),$=E.clone().add(P,u),N=B-$<0,V=E.clone().add(P+(N?-1:1),u);return+(-(P+(B-$)/(N?$-V:V-$))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:f,w:h,d:c,D:y,h:l,m:n,s:o,ms:a,Q:d}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},_="en",L={};L[_]=k;var F="$isDayjsObject",v=function(A){return A instanceof rt||!(!A||!A[F])},U=function A(E,B,P){var $;if(!E)return _;if(typeof E=="string"){var N=E.toLowerCase();L[N]&&($=N),B&&(L[N]=B,$=N);var V=E.split("-");if(!$&&V.length>1)return A(V[0])}else{var at=E.name;L[at]=E,$=at}return!P&&$&&(_=$),$||!P&&_},W=function(A,E){if(v(A))return A.clone();var B=typeof E=="object"?E:{};return B.date=A,B.args=arguments,new rt(B)},q=T;q.l=U,q.i=v,q.w=function(A,E){return W(A,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var rt=function(){function A(B){this.$L=U(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[F]=!0}var E=A.prototype;return E.parse=function(B){this.$d=function(P){var $=P.date,N=P.utc;if($===null)return new Date(NaN);if(q.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var V=$.match(C);if(V){var at=V[2]-1||0,ht=(V[7]||"0").substring(0,3);return N?new Date(Date.UTC(V[1],at,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ht)):new Date(V[1],at,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ht)}}return new Date($)}(B),this.init()},E.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},E.$utils=function(){return q},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(B,P){var $=W(B);return this.startOf(P)<=$&&$<=this.endOf(P)},E.isAfter=function(B,P){return W(B)<this.startOf(P)},E.isBefore=function(B,P){return this.endOf(P)<W(B)},E.$g=function(B,P,$){return q.u(B)?this[P]:this.set($,B)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(B,P){var $=this,N=!!q.u(P)||P,V=q.p(B),at=function(bt,it){var ut=q.w($.$u?Date.UTC($.$y,it,bt):new Date($.$y,it,bt),$);return N?ut:ut.endOf(c)},ht=function(bt,it){return q.w($.toDate()[bt].apply($.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(it)),$)},gt=this.$W,yt=this.$M,pt=this.$D,_t="set"+(this.$u?"UTC":"");switch(V){case f:return N?at(1,0):at(31,11);case u:return N?at(1,yt):at(0,yt+1);case h:var wt=this.$locale().weekStart||0,$t=(gt<wt?gt+7:gt)-wt;return at(N?pt-$t:pt+(6-$t),yt);case c:case y:return ht(_t+"Hours",0);case l:return ht(_t+"Minutes",1);case n:return ht(_t+"Seconds",2);case o:return ht(_t+"Milliseconds",3);default:return this.clone()}},E.endOf=function(B){return this.startOf(B,!1)},E.$set=function(B,P){var $,N=q.p(B),V="set"+(this.$u?"UTC":""),at=($={},$[c]=V+"Date",$[y]=V+"Date",$[u]=V+"Month",$[f]=V+"FullYear",$[l]=V+"Hours",$[n]=V+"Minutes",$[o]=V+"Seconds",$[a]=V+"Milliseconds",$)[N],ht=N===c?this.$D+(P-this.$W):P;if(N===u||N===f){var gt=this.clone().set(y,1);gt.$d[at](ht),gt.init(),this.$d=gt.set(y,Math.min(this.$D,gt.daysInMonth())).$d}else at&&this.$d[at](ht);return this.init(),this},E.set=function(B,P){return this.clone().$set(B,P)},E.get=function(B){return this[q.p(B)]()},E.add=function(B,P){var $,N=this;B=Number(B);var V=q.p(P),at=function(yt){var pt=W(N);return q.w(pt.date(pt.date()+Math.round(yt*B)),N)};if(V===u)return this.set(u,this.$M+B);if(V===f)return this.set(f,this.$y+B);if(V===c)return at(1);if(V===h)return at(7);var ht=($={},$[n]=i,$[l]=s,$[o]=r,$)[V]||1,gt=this.$d.getTime()+B*ht;return q.w(gt,this)},E.subtract=function(B,P){return this.add(-1*B,P)},E.format=function(B){var P=this,$=this.$locale();if(!this.isValid())return $.invalidDate||m;var N=B||"YYYY-MM-DDTHH:mm:ssZ",V=q.z(this),at=this.$H,ht=this.$m,gt=this.$M,yt=$.weekdays,pt=$.months,_t=$.meridiem,wt=function(it,ut,Bt,At){return it&&(it[ut]||it(P,N))||Bt[ut].slice(0,At)},$t=function(it){return q.s(at%12||12,it,"0")},bt=_t||function(it,ut,Bt){var At=it<12?"AM":"PM";return Bt?At.toLowerCase():At};return N.replace(x,function(it,ut){return ut||function(Bt){switch(Bt){case"YY":return String(P.$y).slice(-2);case"YYYY":return q.s(P.$y,4,"0");case"M":return gt+1;case"MM":return q.s(gt+1,2,"0");case"MMM":return wt($.monthsShort,gt,pt,3);case"MMMM":return wt(pt,gt);case"D":return P.$D;case"DD":return q.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return wt($.weekdaysMin,P.$W,yt,2);case"ddd":return wt($.weekdaysShort,P.$W,yt,3);case"dddd":return yt[P.$W];case"H":return String(at);case"HH":return q.s(at,2,"0");case"h":return $t(1);case"hh":return $t(2);case"a":return bt(at,ht,!0);case"A":return bt(at,ht,!1);case"m":return String(ht);case"mm":return q.s(ht,2,"0");case"s":return String(P.$s);case"ss":return q.s(P.$s,2,"0");case"SSS":return q.s(P.$ms,3,"0");case"Z":return V}return null}(it)||V.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(B,P,$){var N,V=this,at=q.p(P),ht=W(B),gt=(ht.utcOffset()-this.utcOffset())*i,yt=this-ht,pt=function(){return q.m(V,ht)};switch(at){case f:N=pt()/12;break;case u:N=pt();break;case d:N=pt()/3;break;case h:N=(yt-gt)/6048e5;break;case c:N=(yt-gt)/864e5;break;case l:N=yt/s;break;case n:N=yt/i;break;case o:N=yt/r;break;default:N=yt}return $?N:q.a(N)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return L[this.$L]},E.locale=function(B,P){if(!B)return this.$L;var $=this.clone(),N=U(B,P,!0);return N&&($.$L=N),$},E.clone=function(){return q.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},A}(),Y=rt.prototype;return W.prototype=Y,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",f],["$D",y]].forEach(function(A){Y[A[1]]=function(E){return this.$g(E,A[0],A[1])}}),W.extend=function(A,E){return A.$i||(A(E,rt,W),A.$i=!0),W},W.locale=U,W.isDayjs=v,W.unix=function(A){return W(1e3*A)},W.en=L[_],W.Ls=L,W.p={},W})})(wu);var pm=wu.exports;const ym=wn(pm);var ze={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Sn=g(function(e="fatal"){let t=ze.fatal;typeof e=="string"?e.toLowerCase()in ze&&(t=ze[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=ze.fatal&&(I.fatal=console.error?console.error.bind(console,ge("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ge("FATAL"))),t<=ze.error&&(I.error=console.error?console.error.bind(console,ge("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ge("ERROR"))),t<=ze.warn&&(I.warn=console.warn?console.warn.bind(console,ge("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ge("WARN"))),t<=ze.info&&(I.info=console.info?console.info.bind(console,ge("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ge("INFO"))),t<=ze.debug&&(I.debug=console.debug?console.debug.bind(console,ge("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("DEBUG"))),t<=ze.trace&&(I.trace=console.debug?console.debug.bind(console,ge("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("TRACE")))},"setLogLevel"),ge=g(e=>`%c${ym().format("ss.SSS")} : ${e} : `,"format");const $s={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return $s.hue2rgb(a,s,e+1/3)*255;case"g":return $s.hue2rgb(a,s,e)*255;case"b":return $s.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){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}}},mm={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},xm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Lt={channel:$s,lang:mm,unit:xm},er={};for(let e=0;e<=255;e++)er[e]=Lt.unit.dec2hex(e);const te={ALL:0,RGB:1,HSL:2};let Cm=class{constructor(){this.type=te.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=te.ALL}is(t){return this.type===t}};class bm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Cm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=te.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Lt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Lt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Lt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Lt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(te.HSL)&&r!==void 0?r:(this._ensureHSL(),Lt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(te.HSL)&&r!==void 0?r:(this._ensureHSL(),Lt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(te.HSL)&&r!==void 0?r:(this._ensureHSL(),Lt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(te.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(te.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(te.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(te.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(te.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(te.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(te.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(te.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(te.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ma=new bm({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return ma.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${er[Math.round(t)]}${er[Math.round(r)]}${er[Math.round(i)]}${er[Math.round(s*255)]}`:`#${er[Math.round(t)]}${er[Math.round(r)]}${er[Math.round(i)]}`}},pr={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(pr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Lt.channel.clamp.h(parseFloat(r)*360)}}return Lt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(pr.re);if(!r)return;const[,i,s,a,o,n]=r;return ma.set({h:pr._hue2deg(i),s:Lt.channel.clamp.s(parseFloat(s)),l:Lt.channel.clamp.l(parseFloat(a)),a:o?Lt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Lt.lang.round(t)}, ${Lt.lang.round(r)}%, ${Lt.lang.round(i)}%, ${s})`:`hsl(${Lt.lang.round(t)}, ${Lt.lang.round(r)}%, ${Lt.lang.round(i)}%)`}},Ui={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=Ui.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in Ui.colors)if(Ui.colors[r]===t)return r}},Di={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(Di.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return ma.set({r:Lt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Lt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Lt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Lt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Lt.lang.round(t)}, ${Lt.lang.round(r)}, ${Lt.lang.round(i)}, ${Lt.lang.round(s)})`:`rgb(${Lt.lang.round(t)}, ${Lt.lang.round(r)}, ${Lt.lang.round(i)})`}},Pe={format:{keyword:Ui,hex:Yr,rgb:Di,rgba:Di,hsl:pr,hsla:pr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||Di.parse(e)||pr.parse(e)||Ui.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(te.HSL)||e.data.r===void 0?pr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Di.stringify(e):Yr.stringify(e)},Su=(e,t)=>{const r=Pe.parse(e);for(const i in t)r[i]=Lt.channel.clamp[i](t[i]);return Pe.stringify(r)},ar=(e,t,r=0,i=1)=>{if(typeof e!="number")return Su(e,{a:t});const s=ma.set({r:Lt.channel.clamp.r(e),g:Lt.channel.clamp.g(t),b:Lt.channel.clamp.b(r),a:Lt.channel.clamp.a(i)});return Pe.stringify(s)},km=e=>{const{r:t,g:r,b:i}=Pe.parse(e),s=.2126*Lt.channel.toLinear(t)+.7152*Lt.channel.toLinear(r)+.0722*Lt.channel.toLinear(i);return Lt.lang.round(s)},wm=e=>km(e)>=.5,_e=e=>!wm(e),Tu=(e,t,r)=>{const i=Pe.parse(e),s=i[t],a=Lt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Pe.stringify(i)},z=(e,t)=>Tu(e,"l",t),H=(e,t)=>Tu(e,"l",-t),b=(e,t)=>{const r=Pe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Su(e,i)},Sm=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Pe.parse(e),{r:n,g:l,b:c,a:h}=Pe.parse(t),u=r/100,d=u*2-1,f=o-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,C=1-m,x=i*m+n*C,k=s*m+l*C,w=a*m+c*C,T=o*u+h*(1-u);return ar(x,k,w,T)},M=(e,t=100)=>{const r=Pe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Sm(r,e,t)};var $o=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>$o(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=$o(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Zt=$o,Ie="#ffffff",Re="#f2f2f2",Tt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Xr,Tm=(Xr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,L,F,v,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt,R;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScale"+vt]=H(this["cScale"+vt],75);else for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScale"+vt]=H(this["cScale"+vt],25);for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScaleInv"+vt]=this["cScaleInv"+vt]||M(this["cScale"+vt]);for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this.darkMode?this["cScalePeer"+vt]=this["cScalePeer"+vt]||z(this["cScale"+vt],10):this["cScalePeer"+vt]=this["cScalePeer"+vt]||H(this["cScale"+vt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScaleLabel"+vt]=this["cScaleLabel"+vt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let vt=0;vt<5;vt++)this["surface"+vt]=this["surface"+vt]||b(this.mainBkg,{h:180,s:-15,l:t*(5+vt*3)}),this["surfacePeer"+vt]=this["surfacePeer"+vt]||b(this.mainBkg,{h:180,s:-15,l:t*(8+vt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((w=this.radar)==null?void 0:w.axisLabelFontSize)||12,curveOpacity:((T=this.radar)==null?void 0:T.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((U=this.radar)==null?void 0:U.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((rt=this.wardley)==null?void 0:rt.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((A=this.wardley)==null?void 0:A.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((B=this.wardley)==null?void 0:B.componentStroke)||this.lineColor,componentLabelColor:((P=this.wardley)==null?void 0:P.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((N=this.wardley)==null?void 0:N.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((at=this.wardley)==null?void 0:at.annotationTextColor)||this.primaryTextColor,annotationFill:((ht=this.wardley)==null?void 0:ht.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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((gt=this.xyChart)==null?void 0:gt.backgroundColor)||this.background,titleColor:((yt=this.xyChart)==null?void 0:yt.titleColor)||this.primaryTextColor,dataLabelColor:((pt=this.xyChart)==null?void 0:pt.dataLabelColor)||this.primaryTextColor,legendTextColor:((_t=this.xyChart)==null?void 0:_t.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($t=this.xyChart)==null?void 0:$t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((bt=this.xyChart)==null?void 0:bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((it=this.xyChart)==null?void 0:it.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ut=this.xyChart)==null?void 0:ut.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((At=this.xyChart)==null?void 0:At.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((qt=this.xyChart)==null?void 0:qt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.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?H(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Xr,"Theme"),Xr),_m=g(e=>{const t=new Tm;return t.calculate(e),t},"getThemeVariables"),Vr,Bm=(Vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ar(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=H("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=H(this.sectionBkgColor,10),this.taskBorderColor=ar(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ar(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,L,F,v,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.secondBkg=z(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=z(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=z(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=M(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||M(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScalePeer"+R]=this["cScalePeer"+R]||z(this["cScale"+R],10);for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{h:30,s:-30,l:-(-10+R*4)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{h:30,s:-30,l:-(-7+R*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];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 R=0;R<8;R++)this["venn"+(R+1)]=this["venn"+(R+1)]??z(this["cScale"+R],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#F57F17",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#4A148C",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((w=this.xyChart)==null?void 0:w.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((F=this.xyChart)==null?void 0:F.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((U=this.xyChart)==null?void 0:U.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.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:((Y=this.radar)==null?void 0:Y.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((E=this.radar)==null?void 0:E.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((gt=this.wardley)==null?void 0:gt.backgroundColor)||this.background,axisColor:((yt=this.wardley)==null?void 0:yt.axisColor)||this.lineColor,axisTextColor:((pt=this.wardley)==null?void 0:pt.axisTextColor)||this.primaryTextColor,gridColor:((_t=this.wardley)==null?void 0:_t.gridColor)||this.gridColor,componentFill:((wt=this.wardley)==null?void 0:wt.componentFill)||this.mainBkg,componentStroke:(($t=this.wardley)==null?void 0:$t.componentStroke)||this.lineColor,componentLabelColor:((bt=this.wardley)==null?void 0:bt.componentLabelColor)||this.primaryTextColor,linkStroke:((it=this.wardley)==null?void 0:it.linkStroke)||this.lineColor,evolutionStroke:((ut=this.wardley)==null?void 0:ut.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Bt=this.wardley)==null?void 0:Bt.annotationStroke)||this.lineColor,annotationTextColor:((At=this.wardley)==null?void 0:At.annotationTextColor)||this.primaryTextColor,annotationFill:((qt=this.wardley)==null?void 0:qt.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?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||z("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||z("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||z("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||z("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||z(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||z(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Vr,"Theme"),Vr),vm=g(e=>{const t=new Bm;return t.calculate(e),t},"getThemeVariables"),Zr,Lm=(Zr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Tt(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=ar(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,L,F,v,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=H(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||b(this["cScale"+R],{h:180});for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{h:30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{h:30,l:-(7+R*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((E=this.wardley)==null?void 0:E.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((V=this.wardley)==null?void 0:V.annotationTextColor)||this.primaryTextColor,annotationFill:((at=this.wardley)==null?void 0:at.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((gt=this.xyChart)==null?void 0:gt.titleColor)||this.primaryTextColor,dataLabelColor:((yt=this.xyChart)==null?void 0:yt.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_t=this.xyChart)==null?void 0:_t.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((wt=this.xyChart)==null?void 0:wt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(($t=this.xyChart)==null?void 0:$t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((bt=this.xyChart)==null?void 0:bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((it=this.xyChart)==null?void 0:it.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ut=this.xyChart)==null?void 0:ut.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((At=this.xyChart)==null?void 0:At.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((qt=this.xyChart)==null?void 0:qt.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||H(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Zr,"Theme"),Zr),Fm=g(e=>{const t=new Lm;return t.calculate(e),t},"getThemeVariables"),Kr,Mm=(Kr=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=z("#cde498",10),this.primaryBorderColor=Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,L,F,v,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.actorBorder=H(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=H(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||b(this["cScale"+R],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{h:30,s:-30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{h:30,s:-30,l:-(8+R*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||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF9C4",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#D7CCC8",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((v=this.radar)==null?void 0:v.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((E=this.wardley)==null?void 0:E.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((V=this.wardley)==null?void 0:V.annotationTextColor)||this.primaryTextColor,annotationFill:((at=this.wardley)==null?void 0:at.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((gt=this.xyChart)==null?void 0:gt.titleColor)||this.primaryTextColor,dataLabelColor:((yt=this.xyChart)==null?void 0:yt.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_t=this.xyChart)==null?void 0:_t.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((wt=this.xyChart)==null?void 0:wt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(($t=this.xyChart)==null?void 0:$t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((bt=this.xyChart)==null?void 0:bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((it=this.xyChart)==null?void 0:it.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ut=this.xyChart)==null?void 0:ut.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((At=this.xyChart)==null?void 0:At.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((qt=this.xyChart)==null?void 0:qt.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Kr,"Theme"),Kr),Am=g(e=>{const t=new Mm;return t.calculate(e),t},"getThemeVariables"),Qr,Em=(Qr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(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||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,L,F,v,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||M(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||z(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{l:-(8+R*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=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=H(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=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=H(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];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 R=0;R<8;R++)this["venn"+(R+1)]=this["venn"+(R+1)]??this["cScale"+R];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((w=this.xyChart)==null?void 0:w.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((F=this.xyChart)==null?void 0:F.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((U=this.xyChart)==null?void 0:U.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((Y=this.radar)==null?void 0:Y.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((E=this.radar)==null?void 0:E.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((gt=this.wardley)==null?void 0:gt.backgroundColor)||this.background,axisColor:((yt=this.wardley)==null?void 0:yt.axisColor)||this.lineColor,axisTextColor:((pt=this.wardley)==null?void 0:pt.axisTextColor)||this.primaryTextColor,gridColor:((_t=this.wardley)==null?void 0:_t.gridColor)||this.gridColor,componentFill:((wt=this.wardley)==null?void 0:wt.componentFill)||this.background,componentStroke:(($t=this.wardley)==null?void 0:$t.componentStroke)||this.lineColor,componentLabelColor:((bt=this.wardley)==null?void 0:bt.componentLabelColor)||this.primaryTextColor,linkStroke:((it=this.wardley)==null?void 0:it.linkStroke)||this.lineColor,evolutionStroke:((ut=this.wardley)==null?void 0:ut.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Bt=this.wardley)==null?void 0:Bt.annotationStroke)||this.lineColor,annotationTextColor:((At=this.wardley)==null?void 0:At.annotationTextColor)||this.primaryTextColor,annotationFill:((qt=this.wardley)==null?void 0:qt.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=H(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Qr,"Theme"),Qr),$m=g(e=>{const t=new Em;return t.calculate(e),t},"getThemeVariables"),Jr,Om=(Jr=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=Tt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,d,f,y,m,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||z(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||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||z(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||H(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?H(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Jr,"Theme"),Jr),Pm=g(e=>{const t=new Om;return t.calculate(e),t},"getThemeVariables"),ti,Dm=(ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||M(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||H(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?H(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=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ti,"Theme"),ti),Im=g(e=>{const t=new Dm;return t.calculate(e),t},"getThemeVariables"),ei,Rm=(ei=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=Tt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,d,f,y,m,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||z(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||z(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||H(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?H(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ei,"Theme"),ei),qm=g(e=>{const t=new Rm;return t.calculate(e),t},"getThemeVariables"),ri,Nm=(ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||M(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||H(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?H(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ri,"Theme"),ri),Wm=g(e=>{const t=new Nm;return t.calculate(e),t},"getThemeVariables"),ii,zm=(ii=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=Tt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,d,f,y,m,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||z(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||z(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||H(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?H(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ii,"Theme"),ii),Hm=g(e=>{const t=new zm;return t.calculate(e),t},"getThemeVariables"),si,Ym=(si=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||M(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||H(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=H(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?H(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(si,"Theme"),si),jm=g(e=>{const t=new Ym;return t.calculate(e),t},"getThemeVariables"),Ge={base:{getThemeVariables:_m},dark:{getThemeVariables:vm},default:{getThemeVariables:Fm},forest:{getThemeVariables:Am},neutral:{getThemeVariables:$m},neo:{getThemeVariables:Pm},"neo-dark":{getThemeVariables:Im},redux:{getThemeVariables:qm},"redux-dark":{getThemeVariables:Wm},"redux-color":{getThemeVariables:Hm},"redux-dark-color":{getThemeVariables:jm}},Kt={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},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},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,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},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},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},_u={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Ge.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},railroad:{...Kt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn},cynefin:{...Kt.cynefin}},Bu=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Bu(e[i],"")]:[...r,t+i],[]),"keyify"),Um=new Set(Bu(_u,"")),vu=_u,Gm={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Xm=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(I.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ys=g(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ys(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Um.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Gm[t];i?Xm(e[t],i):(I.debug("sanitizing object",t),Ys(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=Lu(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),Lu=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ci=Object.freeze(vu),qe=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),le=Zt({},ci),js,br=[],Gi=Zt({},ci),cs=g((e,t)=>{let r=Zt({},e),i={};for(const s of t)Au(s),i=Zt(i,s);if(r=Zt(r,i),i.theme&&i.theme in Ge){const s=Zt({},js),a=Zt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ge&&(r.themeVariables=Ge[r.theme].getThemeVariables(a))}return Gi=r,t0(Gi),Gi},"updateCurrentConfig"),Vm=g(e=>(le=Zt({},ci),le=Zt(le,e),e.theme&&Ge[e.theme]&&(le.themeVariables=Ge[e.theme].getThemeVariables(e.themeVariables)),cs(le,br),le),"setSiteConfig"),Zm=g(e=>{js=Zt({},e)},"saveConfigFromInitialize"),Km=g(e=>(le=Zt(le,e),cs(le,br),le),"updateSiteConfig"),Fu=g(()=>Zt({},le),"getSiteConfig"),Mu=g(e=>(cs(Gi,[e]),Yt()),"setConfig"),Yt=g(()=>Zt({},Gi),"getConfig"),Au=g(e=>{e&&(["secure",...le.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.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"&&Au(e[t])}))},"sanitize"),Qm=g(e=>{var t;Ys(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),br.push(e),cs(le,br)},"addDirective"),Us=g((e=le)=>{br=[],cs(e,br)},"reset"),Jm={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."},Kl={},Eu=g(e=>{Kl[e]||(I.warn(Jm[e]),Kl[e]=!0)},"issueWarning"),t0=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Eu("LAZY_LOAD_DEPRECATED")},"checkConfig"),X5=g(()=>{let e={};js&&(e=Zt(e,js));for(const t of br)e=Zt(e,t);return e},"getUserDefinedConfig"),se=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Eu("FLOWCHART_HTML_LABELS_DEPRECATED"),qe(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),$u=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Xi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,e0=/\s*%%.*\n/gm,ai,Ou=(ai=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(ai,"UnknownDiagramError"),ai),kr={},Tn=g(function(e,t){e=e.replace($u,"").replace(Xi,"").replace(e0,`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-CX_hwOdH.js","assets/index-CocW84LJ.js","assets/index-DQj4J6ml.css","assets/dagre-GXQ25YYZ-BKanjdm8.js","assets/layout-D_zjK4GZ.js","assets/swimlanes-42K2YHIH-Cs5FclrO.js","assets/cose-bilkent-JH36ORCC-DVHat7AO.js","assets/cytoscape.esm-BB-IEtsb.js","assets/c4Diagram-7LVT6UL2-DPNdwG7s.js","assets/chunk-F27PBJKO-BNHim5Uk.js","assets/flowDiagram-HODETNUW-D4vFPsPz.js","assets/chunk-5VM5RSS4-CQu6N1fr.js","assets/chunk-XXDRQBXY-CwJXX4Gu.js","assets/chunk-POPQ4Y6H-CZXpKqgY.js","assets/channel-D59gS-Le.js","assets/swimlanesDiagram-VR7AAH4N-UE24U6QV.js","assets/erDiagram-RLTQ6QDP-BZgLGej_.js","assets/gitGraphDiagram-WWUBYQGX-BzrTgIPA.js","assets/chunk-2Q5K7J3B-Drf5hWti.js","assets/chunk-JWPE2WC7-CxvMM081.js","assets/cynefin-OW5HDTMX-Bi5sXTWO.js","assets/ganttDiagram-EL5Y4UJY-BV-vOymv.js","assets/linear-BGvNqoX4.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-27XIBGKW-BNjnp8Bw.js","assets/pieDiagram-E7YTZNPT-j4H9g-5p.js","assets/arc-t-ssOsPw.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-AXDQQJYC-tQl3LM00.js","assets/xychartDiagram-S5SC5T6Z-D8Jt8h9M.js","assets/requirementDiagram-BXWQKSXE-CbdDUSXh.js","assets/sequenceDiagram-WJ2MYXX4-DRhfwJem.js","assets/classDiagram-ZZMXUADV-Bewdb9Y_.js","assets/chunk-TICWLB2K-DvGKh0xN.js","assets/classDiagram-v2-VYDZK3BY-Bewdb9Y_.js","assets/stateDiagram-D77RDMKH-CRKt2Roy.js","assets/chunk-IMKFNOWR-61u8Xam-.js","assets/stateDiagram-v2-MP3YSRHH-6BlUiFQM.js","assets/journeyDiagram-3NMN7TZE-DCH1Q0q5.js","assets/timeline-definition-24CTP7MA-B1ztwagu.js","assets/mindmap-definition-YA3MSWOX-IAdhY6Xi.js","assets/kanban-definition-UXKFOSKX-DNG-2lIe.js","assets/sankeyDiagram-P5KCCOFB-CgweF3tC.js","assets/diagram-Z3DM3KII-CoPPej-B.js","assets/diagram-UQ7AKVKN-DriLbD41.js","assets/blockDiagram-I7D4REHJ-BWvDCIy7.js","assets/diagram-S7CK7UJ4-D1AUiOrg.js","assets/architectureDiagram-5GKGNRK7-xwtc8tHh.js","assets/diagram-VSXAHHWV-DnUn3PWq.js","assets/ishikawaDiagram-5VMMS53U-CRRDJ96x.js","assets/vennDiagram-4TSXK5OY-DaVmdE2o.js","assets/diagram-VX7I27RA-B9PfnVER.js","assets/wardleyDiagram-VM6X3IG4-CXnyk8a1.js","assets/cynefinDiagram-5FMLGOSQ-DE2_LSH7.js","assets/railroadDiagram-O6MQD6OU-DkzjcGjo.js","assets/chunk-SVP7TREG-BAPDK64W.js","assets/ebnfDiagram-PWID7BFC-G2lYKGN9.js","assets/abnfDiagram-VCTEODGH-CixVqOyW.js","assets/pegDiagram-XKGWAZYB-BpnIe36z.js"])))=>i.map(i=>d[i]);
2
+ var dm=Object.defineProperty;var fm=(e,t,r)=>t in e?dm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Nt=(e,t,r)=>fm(e,typeof t!="symbol"?t+"":t,r);import{g as wn,c as Eo,p as hi,_ as Mt}from"./index-CocW84LJ.js";var ku=Object.defineProperty,g=(e,t)=>ku(e,"name",{value:t,configurable:!0}),gm=(e,t)=>{for(var r in t)ku(e,r,{get:t[r],enumerable:!0})},wu={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(Eo,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",y="date",m="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,k={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(A){var E=["th","st","nd","rd"],B=A%100;return"["+A+(E[(B-20)%10]||E[B]||E[0])+"]"}},w=function(A,E,B){var P=String(A);return!P||P.length>=E?A:""+Array(E+1-P.length).join(B)+A},T={s:w,z:function(A){var E=-A.utcOffset(),B=Math.abs(E),P=Math.floor(B/60),$=B%60;return(E<=0?"+":"-")+w(P,2,"0")+":"+w($,2,"0")},m:function A(E,B){if(E.date()<B.date())return-A(B,E);var P=12*(B.year()-E.year())+(B.month()-E.month()),$=E.clone().add(P,u),N=B-$<0,V=E.clone().add(P+(N?-1:1),u);return+(-(P+(B-$)/(N?$-V:V-$))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:f,w:h,d:c,D:y,h:l,m:n,s:o,ms:a,Q:d}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},_="en",v={};v[_]=k;var F="$isDayjsObject",L=function(A){return A instanceof rt||!(!A||!A[F])},U=function A(E,B,P){var $;if(!E)return _;if(typeof E=="string"){var N=E.toLowerCase();v[N]&&($=N),B&&(v[N]=B,$=N);var V=E.split("-");if(!$&&V.length>1)return A(V[0])}else{var at=E.name;v[at]=E,$=at}return!P&&$&&(_=$),$||!P&&_},W=function(A,E){if(L(A))return A.clone();var B=typeof E=="object"?E:{};return B.date=A,B.args=arguments,new rt(B)},q=T;q.l=U,q.i=L,q.w=function(A,E){return W(A,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var rt=function(){function A(B){this.$L=U(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[F]=!0}var E=A.prototype;return E.parse=function(B){this.$d=function(P){var $=P.date,N=P.utc;if($===null)return new Date(NaN);if(q.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var V=$.match(C);if(V){var at=V[2]-1||0,ht=(V[7]||"0").substring(0,3);return N?new Date(Date.UTC(V[1],at,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ht)):new Date(V[1],at,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ht)}}return new Date($)}(B),this.init()},E.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},E.$utils=function(){return q},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(B,P){var $=W(B);return this.startOf(P)<=$&&$<=this.endOf(P)},E.isAfter=function(B,P){return W(B)<this.startOf(P)},E.isBefore=function(B,P){return this.endOf(P)<W(B)},E.$g=function(B,P,$){return q.u(B)?this[P]:this.set($,B)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(B,P){var $=this,N=!!q.u(P)||P,V=q.p(B),at=function(bt,it){var ut=q.w($.$u?Date.UTC($.$y,it,bt):new Date($.$y,it,bt),$);return N?ut:ut.endOf(c)},ht=function(bt,it){return q.w($.toDate()[bt].apply($.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(it)),$)},gt=this.$W,yt=this.$M,pt=this.$D,_t="set"+(this.$u?"UTC":"");switch(V){case f:return N?at(1,0):at(31,11);case u:return N?at(1,yt):at(0,yt+1);case h:var wt=this.$locale().weekStart||0,$t=(gt<wt?gt+7:gt)-wt;return at(N?pt-$t:pt+(6-$t),yt);case c:case y:return ht(_t+"Hours",0);case l:return ht(_t+"Minutes",1);case n:return ht(_t+"Seconds",2);case o:return ht(_t+"Milliseconds",3);default:return this.clone()}},E.endOf=function(B){return this.startOf(B,!1)},E.$set=function(B,P){var $,N=q.p(B),V="set"+(this.$u?"UTC":""),at=($={},$[c]=V+"Date",$[y]=V+"Date",$[u]=V+"Month",$[f]=V+"FullYear",$[l]=V+"Hours",$[n]=V+"Minutes",$[o]=V+"Seconds",$[a]=V+"Milliseconds",$)[N],ht=N===c?this.$D+(P-this.$W):P;if(N===u||N===f){var gt=this.clone().set(y,1);gt.$d[at](ht),gt.init(),this.$d=gt.set(y,Math.min(this.$D,gt.daysInMonth())).$d}else at&&this.$d[at](ht);return this.init(),this},E.set=function(B,P){return this.clone().$set(B,P)},E.get=function(B){return this[q.p(B)]()},E.add=function(B,P){var $,N=this;B=Number(B);var V=q.p(P),at=function(yt){var pt=W(N);return q.w(pt.date(pt.date()+Math.round(yt*B)),N)};if(V===u)return this.set(u,this.$M+B);if(V===f)return this.set(f,this.$y+B);if(V===c)return at(1);if(V===h)return at(7);var ht=($={},$[n]=i,$[l]=s,$[o]=r,$)[V]||1,gt=this.$d.getTime()+B*ht;return q.w(gt,this)},E.subtract=function(B,P){return this.add(-1*B,P)},E.format=function(B){var P=this,$=this.$locale();if(!this.isValid())return $.invalidDate||m;var N=B||"YYYY-MM-DDTHH:mm:ssZ",V=q.z(this),at=this.$H,ht=this.$m,gt=this.$M,yt=$.weekdays,pt=$.months,_t=$.meridiem,wt=function(it,ut,Bt,At){return it&&(it[ut]||it(P,N))||Bt[ut].slice(0,At)},$t=function(it){return q.s(at%12||12,it,"0")},bt=_t||function(it,ut,Bt){var At=it<12?"AM":"PM";return Bt?At.toLowerCase():At};return N.replace(x,function(it,ut){return ut||function(Bt){switch(Bt){case"YY":return String(P.$y).slice(-2);case"YYYY":return q.s(P.$y,4,"0");case"M":return gt+1;case"MM":return q.s(gt+1,2,"0");case"MMM":return wt($.monthsShort,gt,pt,3);case"MMMM":return wt(pt,gt);case"D":return P.$D;case"DD":return q.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return wt($.weekdaysMin,P.$W,yt,2);case"ddd":return wt($.weekdaysShort,P.$W,yt,3);case"dddd":return yt[P.$W];case"H":return String(at);case"HH":return q.s(at,2,"0");case"h":return $t(1);case"hh":return $t(2);case"a":return bt(at,ht,!0);case"A":return bt(at,ht,!1);case"m":return String(ht);case"mm":return q.s(ht,2,"0");case"s":return String(P.$s);case"ss":return q.s(P.$s,2,"0");case"SSS":return q.s(P.$ms,3,"0");case"Z":return V}return null}(it)||V.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(B,P,$){var N,V=this,at=q.p(P),ht=W(B),gt=(ht.utcOffset()-this.utcOffset())*i,yt=this-ht,pt=function(){return q.m(V,ht)};switch(at){case f:N=pt()/12;break;case u:N=pt();break;case d:N=pt()/3;break;case h:N=(yt-gt)/6048e5;break;case c:N=(yt-gt)/864e5;break;case l:N=yt/s;break;case n:N=yt/i;break;case o:N=yt/r;break;default:N=yt}return $?N:q.a(N)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return v[this.$L]},E.locale=function(B,P){if(!B)return this.$L;var $=this.clone(),N=U(B,P,!0);return N&&($.$L=N),$},E.clone=function(){return q.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},A}(),Y=rt.prototype;return W.prototype=Y,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",f],["$D",y]].forEach(function(A){Y[A[1]]=function(E){return this.$g(E,A[0],A[1])}}),W.extend=function(A,E){return A.$i||(A(E,rt,W),A.$i=!0),W},W.locale=U,W.isDayjs=L,W.unix=function(A){return W(1e3*A)},W.en=v[_],W.Ls=v,W.p={},W})})(wu);var pm=wu.exports;const ym=wn(pm);var ze={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},I={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Sn=g(function(e="fatal"){let t=ze.fatal;typeof e=="string"?e.toLowerCase()in ze&&(t=ze[e]):typeof e=="number"&&(t=e),I.trace=()=>{},I.debug=()=>{},I.info=()=>{},I.warn=()=>{},I.error=()=>{},I.fatal=()=>{},t<=ze.fatal&&(I.fatal=console.error?console.error.bind(console,ge("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ge("FATAL"))),t<=ze.error&&(I.error=console.error?console.error.bind(console,ge("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ge("ERROR"))),t<=ze.warn&&(I.warn=console.warn?console.warn.bind(console,ge("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ge("WARN"))),t<=ze.info&&(I.info=console.info?console.info.bind(console,ge("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ge("INFO"))),t<=ze.debug&&(I.debug=console.debug?console.debug.bind(console,ge("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("DEBUG"))),t<=ze.trace&&(I.trace=console.debug?console.debug.bind(console,ge("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ge("TRACE")))},"setLogLevel"),ge=g(e=>`%c${ym().format("ss.SSS")} : ${e} : `,"format");const $s={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return $s.hue2rgb(a,s,e+1/3)*255;case"g":return $s.hue2rgb(a,s,e)*255;case"b":return $s.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){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}}},mm={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},xm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Lt={channel:$s,lang:mm,unit:xm},er={};for(let e=0;e<=255;e++)er[e]=Lt.unit.dec2hex(e);const te={ALL:0,RGB:1,HSL:2};let Cm=class{constructor(){this.type=te.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=te.ALL}is(t){return this.type===t}};class bm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Cm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=te.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Lt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Lt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Lt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Lt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Lt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Lt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(te.HSL)&&r!==void 0?r:(this._ensureHSL(),Lt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(te.HSL)&&r!==void 0?r:(this._ensureHSL(),Lt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(te.HSL)&&r!==void 0?r:(this._ensureHSL(),Lt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(te.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(te.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(te.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(te.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(te.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(te.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(te.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(te.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(te.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ma=new bm({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return ma.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${er[Math.round(t)]}${er[Math.round(r)]}${er[Math.round(i)]}${er[Math.round(s*255)]}`:`#${er[Math.round(t)]}${er[Math.round(r)]}${er[Math.round(i)]}`}},pr={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(pr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Lt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Lt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Lt.channel.clamp.h(parseFloat(r)*360)}}return Lt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(pr.re);if(!r)return;const[,i,s,a,o,n]=r;return ma.set({h:pr._hue2deg(i),s:Lt.channel.clamp.s(parseFloat(s)),l:Lt.channel.clamp.l(parseFloat(a)),a:o?Lt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Lt.lang.round(t)}, ${Lt.lang.round(r)}%, ${Lt.lang.round(i)}%, ${s})`:`hsl(${Lt.lang.round(t)}, ${Lt.lang.round(r)}%, ${Lt.lang.round(i)}%)`}},Ui={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=Ui.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in Ui.colors)if(Ui.colors[r]===t)return r}},Di={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(Di.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return ma.set({r:Lt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Lt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Lt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Lt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Lt.lang.round(t)}, ${Lt.lang.round(r)}, ${Lt.lang.round(i)}, ${Lt.lang.round(s)})`:`rgb(${Lt.lang.round(t)}, ${Lt.lang.round(r)}, ${Lt.lang.round(i)})`}},Pe={format:{keyword:Ui,hex:Yr,rgb:Di,rgba:Di,hsl:pr,hsla:pr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||Di.parse(e)||pr.parse(e)||Ui.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(te.HSL)||e.data.r===void 0?pr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Di.stringify(e):Yr.stringify(e)},Su=(e,t)=>{const r=Pe.parse(e);for(const i in t)r[i]=Lt.channel.clamp[i](t[i]);return Pe.stringify(r)},ar=(e,t,r=0,i=1)=>{if(typeof e!="number")return Su(e,{a:t});const s=ma.set({r:Lt.channel.clamp.r(e),g:Lt.channel.clamp.g(t),b:Lt.channel.clamp.b(r),a:Lt.channel.clamp.a(i)});return Pe.stringify(s)},km=e=>{const{r:t,g:r,b:i}=Pe.parse(e),s=.2126*Lt.channel.toLinear(t)+.7152*Lt.channel.toLinear(r)+.0722*Lt.channel.toLinear(i);return Lt.lang.round(s)},wm=e=>km(e)>=.5,_e=e=>!wm(e),Tu=(e,t,r)=>{const i=Pe.parse(e),s=i[t],a=Lt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),Pe.stringify(i)},z=(e,t)=>Tu(e,"l",t),H=(e,t)=>Tu(e,"l",-t),b=(e,t)=>{const r=Pe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Su(e,i)},Sm=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=Pe.parse(e),{r:n,g:l,b:c,a:h}=Pe.parse(t),u=r/100,d=u*2-1,f=o-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,C=1-m,x=i*m+n*C,k=s*m+l*C,w=a*m+c*C,T=o*u+h*(1-u);return ar(x,k,w,T)},M=(e,t=100)=>{const r=Pe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Sm(r,e,t)};var $o=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>$o(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=$o(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Zt=$o,Ie="#ffffff",Re="#f2f2f2",Tt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Xr,Tm=(Xr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,v,F,L,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt,R;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScale"+vt]=H(this["cScale"+vt],75);else for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScale"+vt]=H(this["cScale"+vt],25);for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScaleInv"+vt]=this["cScaleInv"+vt]||M(this["cScale"+vt]);for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this.darkMode?this["cScalePeer"+vt]=this["cScalePeer"+vt]||z(this["cScale"+vt],10):this["cScalePeer"+vt]=this["cScalePeer"+vt]||H(this["cScale"+vt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScaleLabel"+vt]=this["cScaleLabel"+vt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let vt=0;vt<5;vt++)this["surface"+vt]=this["surface"+vt]||b(this.mainBkg,{h:180,s:-15,l:t*(5+vt*3)}),this["surfacePeer"+vt]=this["surfacePeer"+vt]||b(this.mainBkg,{h:180,s:-15,l:t*(8+vt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((y=this.cynefin)==null?void 0:y.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((w=this.radar)==null?void 0:w.axisLabelFontSize)||12,curveOpacity:((T=this.radar)==null?void 0:T.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((F=this.radar)==null?void 0:F.graticuleStrokeWidth)||1,graticuleOpacity:((L=this.radar)==null?void 0:L.graticuleOpacity)||.3,legendBoxSize:((U=this.radar)==null?void 0:U.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((rt=this.wardley)==null?void 0:rt.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((A=this.wardley)==null?void 0:A.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((B=this.wardley)==null?void 0:B.componentStroke)||this.lineColor,componentLabelColor:((P=this.wardley)==null?void 0:P.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((N=this.wardley)==null?void 0:N.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((V=this.wardley)==null?void 0:V.annotationStroke)||this.lineColor,annotationTextColor:((at=this.wardley)==null?void 0:at.annotationTextColor)||this.primaryTextColor,annotationFill:((ht=this.wardley)==null?void 0:ht.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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((gt=this.xyChart)==null?void 0:gt.backgroundColor)||this.background,titleColor:((yt=this.xyChart)==null?void 0:yt.titleColor)||this.primaryTextColor,dataLabelColor:((pt=this.xyChart)==null?void 0:pt.dataLabelColor)||this.primaryTextColor,legendTextColor:((_t=this.xyChart)==null?void 0:_t.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($t=this.xyChart)==null?void 0:$t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((bt=this.xyChart)==null?void 0:bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((it=this.xyChart)==null?void 0:it.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ut=this.xyChart)==null?void 0:ut.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((At=this.xyChart)==null?void 0:At.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((qt=this.xyChart)==null?void 0:qt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.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?H(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Xr,"Theme"),Xr),_m=g(e=>{const t=new Tm;return t.calculate(e),t},"getThemeVariables"),Vr,Bm=(Vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ar(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=H("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=H(this.sectionBkgColor,10),this.taskBorderColor=ar(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ar(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,v,F,L,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.secondBkg=z(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=z(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=z(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=M(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||M(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScalePeer"+R]=this["cScalePeer"+R]||z(this["cScale"+R],10);for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{h:30,s:-30,l:-(-10+R*4)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{h:30,s:-30,l:-(-7+R*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];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 R=0;R<8;R++)this["venn"+(R+1)]=this["venn"+(R+1)]??z(this["cScale"+R],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#F57F17",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#4A148C",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((w=this.xyChart)==null?void 0:w.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((F=this.xyChart)==null?void 0:F.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((U=this.xyChart)==null?void 0:U.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.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:((Y=this.radar)==null?void 0:Y.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((E=this.radar)==null?void 0:E.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((gt=this.wardley)==null?void 0:gt.backgroundColor)||this.background,axisColor:((yt=this.wardley)==null?void 0:yt.axisColor)||this.lineColor,axisTextColor:((pt=this.wardley)==null?void 0:pt.axisTextColor)||this.primaryTextColor,gridColor:((_t=this.wardley)==null?void 0:_t.gridColor)||this.gridColor,componentFill:((wt=this.wardley)==null?void 0:wt.componentFill)||this.mainBkg,componentStroke:(($t=this.wardley)==null?void 0:$t.componentStroke)||this.lineColor,componentLabelColor:((bt=this.wardley)==null?void 0:bt.componentLabelColor)||this.primaryTextColor,linkStroke:((it=this.wardley)==null?void 0:it.linkStroke)||this.lineColor,evolutionStroke:((ut=this.wardley)==null?void 0:ut.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Bt=this.wardley)==null?void 0:Bt.annotationStroke)||this.lineColor,annotationTextColor:((At=this.wardley)==null?void 0:At.annotationTextColor)||this.primaryTextColor,annotationFill:((qt=this.wardley)==null?void 0:qt.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?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||z("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||z("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||z("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||z("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||z(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||z(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Vr,"Theme"),Vr),vm=g(e=>{const t=new Bm;return t.calculate(e),t},"getThemeVariables"),Zr,Lm=(Zr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Tt(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=ar(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,v,F,L,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=H(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||b(this["cScale"+R],{h:180});for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{h:30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{h:30,l:-(7+R*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((E=this.wardley)==null?void 0:E.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((V=this.wardley)==null?void 0:V.annotationTextColor)||this.primaryTextColor,annotationFill:((at=this.wardley)==null?void 0:at.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((gt=this.xyChart)==null?void 0:gt.titleColor)||this.primaryTextColor,dataLabelColor:((yt=this.xyChart)==null?void 0:yt.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_t=this.xyChart)==null?void 0:_t.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((wt=this.xyChart)==null?void 0:wt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(($t=this.xyChart)==null?void 0:$t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((bt=this.xyChart)==null?void 0:bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((it=this.xyChart)==null?void 0:it.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ut=this.xyChart)==null?void 0:ut.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((At=this.xyChart)==null?void 0:At.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((qt=this.xyChart)==null?void 0:qt.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||H(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Zr,"Theme"),Zr),Fm=g(e=>{const t=new Lm;return t.calculate(e),t},"getThemeVariables"),Kr,Mm=(Kr=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=z("#cde498",10),this.primaryBorderColor=Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,v,F,L,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.actorBorder=H(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=H(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||b(this["cScale"+R],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{h:30,s:-30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{h:30,s:-30,l:-(8+R*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||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(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||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(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??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF9C4",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#D7CCC8",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((x=this.radar)==null?void 0:x.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((q=this.wardley)==null?void 0:q.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((E=this.wardley)==null?void 0:E.componentStroke)||this.lineColor,componentLabelColor:((B=this.wardley)==null?void 0:B.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((N=this.wardley)==null?void 0:N.annotationStroke)||this.lineColor,annotationTextColor:((V=this.wardley)==null?void 0:V.annotationTextColor)||this.primaryTextColor,annotationFill:((at=this.wardley)==null?void 0:at.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((gt=this.xyChart)==null?void 0:gt.titleColor)||this.primaryTextColor,dataLabelColor:((yt=this.xyChart)==null?void 0:yt.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_t=this.xyChart)==null?void 0:_t.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((wt=this.xyChart)==null?void 0:wt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:(($t=this.xyChart)==null?void 0:$t.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((bt=this.xyChart)==null?void 0:bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((it=this.xyChart)==null?void 0:it.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ut=this.xyChart)==null?void 0:ut.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((At=this.xyChart)==null?void 0:At.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((qt=this.xyChart)==null?void 0:qt.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Kr,"Theme"),Kr),Am=g(e=>{const t=new Mm;return t.calculate(e),t},"getThemeVariables"),Qr,Em=(Qr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(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||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,d,f,y,m,C,x,k,w,T,_,v,F,L,U,W,q,rt,Y,A,E,B,P,$,N,V,at,ht,gt,yt,pt,_t,wt,$t,bt,it,ut,Bt,At,qt;this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||M(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||z(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||H(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||b(this.mainBkg,{l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||b(this.mainBkg,{l:-(8+R*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=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=H(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=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=H(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];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 R=0;R<8;R++)this["venn"+(R+1)]=this["venn"+(R+1)]??this["cScale"+R];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((f=this.cynefin)==null?void 0:f.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(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:((C=this.xyChart)==null?void 0:C.backgroundColor)||this.background,titleColor:((x=this.xyChart)==null?void 0:x.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((w=this.xyChart)==null?void 0:w.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((F=this.xyChart)==null?void 0:F.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((U=this.xyChart)==null?void 0:U.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((q=this.xyChart)==null?void 0:q.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((Y=this.radar)==null?void 0:Y.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((E=this.radar)==null?void 0:E.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((N=this.radar)==null?void 0:N.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((gt=this.wardley)==null?void 0:gt.backgroundColor)||this.background,axisColor:((yt=this.wardley)==null?void 0:yt.axisColor)||this.lineColor,axisTextColor:((pt=this.wardley)==null?void 0:pt.axisTextColor)||this.primaryTextColor,gridColor:((_t=this.wardley)==null?void 0:_t.gridColor)||this.gridColor,componentFill:((wt=this.wardley)==null?void 0:wt.componentFill)||this.background,componentStroke:(($t=this.wardley)==null?void 0:$t.componentStroke)||this.lineColor,componentLabelColor:((bt=this.wardley)==null?void 0:bt.componentLabelColor)||this.primaryTextColor,linkStroke:((it=this.wardley)==null?void 0:it.linkStroke)||this.lineColor,evolutionStroke:((ut=this.wardley)==null?void 0:ut.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Bt=this.wardley)==null?void 0:Bt.annotationStroke)||this.lineColor,annotationTextColor:((At=this.wardley)==null?void 0:At.annotationTextColor)||this.primaryTextColor,annotationFill:((qt=this.wardley)==null?void 0:qt.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=H(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Qr,"Theme"),Qr),$m=g(e=>{const t=new Em;return t.calculate(e),t},"getThemeVariables"),Jr,Om=(Jr=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=Tt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,d,f,y,m,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||z(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||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||z(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||H(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?H(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Jr,"Theme"),Jr),Pm=g(e=>{const t=new Om;return t.calculate(e),t},"getThemeVariables"),ti,Dm=(ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||M(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||H(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?H(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=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ti,"Theme"),ti),Im=g(e=>{const t=new Dm;return t.calculate(e),t},"getThemeVariables"),ei,Rm=(ei=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=Tt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,d,f,y,m,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||z(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=H(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||z(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||H(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?H(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ei,"Theme"),ei),qm=g(e=>{const t=new Rm;return t.calculate(e),t},"getThemeVariables"),ri,Nm=(ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=H(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||M(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||H(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?H(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ri,"Theme"),ri),Wm=g(e=>{const t=new Nm;return t.calculate(e),t},"getThemeVariables"),ii,zm=(ii=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=Tt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,d,f,y,m,C;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(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||z(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 x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||M(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||z(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||H(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||b(this.mainBkg,{h:180,s:-15,l:s*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((C=this.xyChart)==null?void 0:C.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?H(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||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ii,"Theme"),ii),Hm=g(e=>{const t=new zm;return t.calculate(e),t},"getThemeVariables"),si,Ym=(si=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Tt(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(M("#323D47"),10),this.border1="#ccc",this.border2=ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,d,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Tt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Tt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Tt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Tt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(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?H(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||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||z(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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||M(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||H(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=H(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||b(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(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||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(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||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||_e(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((d=this.xyChart)==null?void 0:d.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((f=this.xyChart)==null?void 0:f.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?H(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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(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||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Re}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(si,"Theme"),si),jm=g(e=>{const t=new Ym;return t.calculate(e),t},"getThemeVariables"),Ge={base:{getThemeVariables:_m},dark:{getThemeVariables:vm},default:{getThemeVariables:Fm},forest:{getThemeVariables:Am},neutral:{getThemeVariables:$m},neo:{getThemeVariables:Pm},"neo-dark":{getThemeVariables:Im},redux:{getThemeVariables:qm},"redux-dark":{getThemeVariables:Wm},"redux-color":{getThemeVariables:Hm},"redux-dark-color":{getThemeVariables:jm}},Kt={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},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},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,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},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},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},_u={...Kt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Ge.default.getThemeVariables(),sequence:{...Kt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Kt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Kt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Kt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Kt.pie,useWidth:984},xyChart:{...Kt.xyChart,useWidth:void 0},requirement:{...Kt.requirement,useWidth:void 0},packet:{...Kt.packet},eventmodeling:{...Kt.eventmodeling},treeView:{...Kt.treeView,useWidth:void 0},radar:{...Kt.radar},railroad:{...Kt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Kt.ishikawa},sankey:{...Kt.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:{...Kt.venn},cynefin:{...Kt.cynefin}},Bu=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Bu(e[i],"")]:[...r,t+i],[]),"keyify"),Um=new Set(Bu(_u,"")),vu=_u,Gm={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Xm=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(I.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ys=g(e=>{if(I.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ys(t));return}for(const t of Object.keys(e)){if(I.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Um.has(t)||e[t]==null){I.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Gm[t];i?Xm(e[t],i):(I.debug("sanitizing object",t),Ys(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(I.debug("sanitizing css option",t),e[t]=Lu(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}I.debug("After sanitization",e)}},"sanitizeDirective"),Lu=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ci=Object.freeze(vu),qe=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),le=Zt({},ci),js,br=[],Gi=Zt({},ci),cs=g((e,t)=>{let r=Zt({},e),i={};for(const s of t)Au(s),i=Zt(i,s);if(r=Zt(r,i),i.theme&&i.theme in Ge){const s=Zt({},js),a=Zt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ge&&(r.themeVariables=Ge[r.theme].getThemeVariables(a))}return Gi=r,t0(Gi),Gi},"updateCurrentConfig"),Vm=g(e=>(le=Zt({},ci),le=Zt(le,e),e.theme&&Ge[e.theme]&&(le.themeVariables=Ge[e.theme].getThemeVariables(e.themeVariables)),cs(le,br),le),"setSiteConfig"),Zm=g(e=>{js=Zt({},e)},"saveConfigFromInitialize"),Km=g(e=>(le=Zt(le,e),cs(le,br),le),"updateSiteConfig"),Fu=g(()=>Zt({},le),"getSiteConfig"),Mu=g(e=>(cs(Gi,[e]),Yt()),"setConfig"),Yt=g(()=>Zt({},Gi),"getConfig"),Au=g(e=>{e&&(["secure",...le.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(I.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"&&Au(e[t])}))},"sanitize"),Qm=g(e=>{var t;Ys(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),br.push(e),cs(le,br)},"addDirective"),Us=g((e=le)=>{br=[],cs(e,br)},"reset"),Jm={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."},Kl={},Eu=g(e=>{Kl[e]||(I.warn(Jm[e]),Kl[e]=!0)},"issueWarning"),t0=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Eu("LAZY_LOAD_DEPRECATED")},"checkConfig"),X5=g(()=>{let e={};js&&(e=Zt(e,js));for(const t of br)e=Zt(e,t);return e},"getUserDefinedConfig"),se=g(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Eu("FLOWCHART_HTML_LABELS_DEPRECATED"),qe(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),$u=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Xi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,e0=/\s*%%.*\n/gm,ai,Ou=(ai=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(ai,"UnknownDiagramError"),ai),kr={},Tn=g(function(e,t){e=e.replace($u,"").replace(Xi,"").replace(e0,`
3
3
  `);for(const[r,{detector:i}]of Object.entries(kr))if(i(e,t))return r;throw new Ou(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Oo=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Pu(t,r,i)},"registerLazyLoadedDiagrams"),Pu=g((e,t,r)=>{kr[e]&&I.warn(`Detector with key ${e} already exists. Overwriting.`),kr[e]={detector:t,loader:r},I.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),r0=g(e=>kr[e].loader,"getDiagramLoader"),us=/<br\s*\/?>/gi,i0=g(e=>e?Ru(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),s0=(()=>{let e=!1;return()=>{e||(Du(),e=!0)}})();function Du(){const e="data-temp-href-target";hi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),hi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(Du,"setupDompurifyHooks");var Iu=g(e=>(s0(),hi.sanitize(e)),"removeScript"),Ql=g((e,t)=>{if(se(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Iu(e):r!=="loose"&&(e=Ru(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=l0(e))}return e},"sanitizeMore"),pe=g((e,t)=>e&&(t.dompurifyConfig?e=hi.sanitize(Ql(e,t),t.dompurifyConfig).toString():e=hi.sanitize(Ql(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),a0=g((e,t)=>typeof e=="string"?pe(e,t):e.flat().map(r=>pe(r,t)),"sanitizeTextOrArray"),o0=g(e=>us.test(e),"hasBreaks"),n0=g(e=>e.split(us),"splitBreaks"),l0=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ru=g(e=>e.replace(us,"#br#"),"breakToPlaceholder"),h0=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),c0=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),u0=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Jl=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];d0(a,o)&&(s=a+","+o,i++,r.pop())}r.push(f0(s))}return r.join("")},"parseGenericTypes"),Po=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),d0=g((e,t)=>{const r=Po(e,"~"),i=Po(t,"~");return r===1&&i===1},"shouldCombineSets"),f0=g(e=>{const t=Po(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),th=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Do=/\$\$(.*?)\$\$/g,Ji=g(e=>{var t;return(((t=e.match(Do))==null?void 0:t.length)??0)>0},"hasKatex"),V5=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await qu(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),g0=g(async(e,t)=>{if(!Ji(e))return e;if(!(th()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Do,"MathML is unsupported in this environment.");{const{default:r}=await Mt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!th()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(us).map(s=>Ji(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Do,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),qu=g(async(e,t)=>pe(await g0(e,t),t),"renderKatexSanitized"),ds={getRows:i0,sanitizeText:pe,sanitizeTextOrArray:a0,hasBreaks:o0,splitBreaks:n0,lineBreakRegex:us,removeScript:Iu,getUrl:h0,evaluate:qe,getMax:c0,getMin:u0},p0=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),y0=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Nu=g(function(e,t,r,i){const s=y0(t,r,i);p0(e,s)},"configureSvgSize"),m0=g(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;I.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;I.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,I.info(`Calculated bounds: ${n}x${l}`),Nu(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Os={};function Io(e){return[...e.cssRules].map(t=>t.cssText).join(`
4
4
  `)}g(Io,"cssStyleSheetToString");var x0=g((e,t,r,i)=>{let s="";return e in Os&&Os[e]?s=Os[e]({...r,svgId:i}):I.warn(`No theme found for ${e}`),`& {
5
5
  font-family: ${r.fontFamily};
@@ -123,7 +123,7 @@ var dm=Object.defineProperty;var fm=(e,t,r)=>t in e?dm(e,t,{enumerable:!0,config
123
123
 
124
124
  ${t}
125
125
  `},"getStyles"),C0=g((e,t)=>{t!==void 0&&(Os[e]=t)},"addStylesForDiagram"),b0=x0,Wu={};gm(Wu,{clear:()=>k0,getAccDescription:()=>_0,getAccTitle:()=>S0,getDiagramTitle:()=>v0,setAccDescription:()=>T0,setAccTitle:()=>w0,setDiagramTitle:()=>B0});var _n="",Bn="",vn="",Ln=g(e=>pe(e,Yt()),"sanitizeText"),k0=g(()=>{_n="",vn="",Bn=""},"clear"),w0=g(e=>{_n=Ln(e).replace(/^\s+/g,"")},"setAccTitle"),S0=g(()=>_n,"getAccTitle"),T0=g(e=>{vn=Ln(e).replace(/\n\s+/g,`
126
- `)},"setAccDescription"),_0=g(()=>vn,"getAccDescription"),B0=g(e=>{Bn=Ln(e)},"setDiagramTitle"),v0=g(()=>Bn,"getDiagramTitle"),eh=I,L0=Sn,Et=Yt,Z5=Mu,K5=ci,Fn=g(e=>pe(e,Et()),"sanitizeText"),F0=m0,M0=g(()=>Wu,"getCommonDb"),Gs={},Xs=g((e,t,r)=>{var i;Gs[e]&&eh.warn(`Diagram with id ${e} already registered. Overwriting.`),Gs[e]=t,r&&Pu(e,r),C0(e,t.styles),(i=t.injectUtils)==null||i.call(t,eh,L0,Et,Fn,F0,M0(),()=>{})},"registerDiagram"),Ro=g(e=>{if(e in Gs)return Gs[e];throw new A0(e)},"getDiagram"),oi,A0=(oi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(oi,"DiagramNotFoundError"),oi),E0={value:()=>{}};function zu(){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 Ps(r)}function Ps(e){this._=e}function $0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ps.prototype=zu.prototype={constructor:Ps,on:function(e,t){var r=this._,i=$0(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=O0(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=rh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=rh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ps(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function O0(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function rh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=E0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var qo="http://www.w3.org/1999/xhtml";const ih={svg:"http://www.w3.org/2000/svg",xhtml:qo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),ih.hasOwnProperty(t)?{space:ih[t],local:e}:e}function P0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===qo&&t.documentElement.namespaceURI===qo?t.createElement(e):t.createElementNS(r,e)}}function D0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hu(e){var t=xa(e);return(t.local?D0:P0)(t)}function I0(){}function Mn(e){return e==null?I0:function(){return this.querySelector(e)}}function R0(e){typeof e!="function"&&(e=Mn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new fe(i,this._parents)}function q0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function N0(){return[]}function Yu(e){return e==null?N0:function(){return this.querySelectorAll(e)}}function W0(e){return function(){return q0(e.apply(this,arguments))}}function z0(e){typeof e=="function"?e=W0(e):e=Yu(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),s.push(l));return new fe(i,s)}function ju(e){return function(){return this.matches(e)}}function Uu(e){return function(t){return t.matches(e)}}var H0=Array.prototype.find;function Y0(e){return function(){return H0.call(this.children,e)}}function j0(){return this.firstElementChild}function U0(e){return this.select(e==null?j0:Y0(typeof e=="function"?e:Uu(e)))}var G0=Array.prototype.filter;function X0(){return Array.from(this.children)}function V0(e){return function(){return G0.call(this.children,e)}}function Z0(e){return this.selectAll(e==null?X0:V0(typeof e=="function"?e:Uu(e)))}function K0(e){typeof e!="function"&&(e=ju(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new fe(i,this._parents)}function Gu(e){return new Array(e.length)}function Q0(){return new fe(this._enter||this._groups.map(Gu),this._parents)}function Vs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vs.prototype={constructor:Vs,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 J0(e){return function(){return e}}function tx(e,t,r,i,s,a){for(var o=0,n,l=t.length,c=a.length;o<c;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new Vs(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function ex(e,t,r,i,s,a,o){var n,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(n=0;n<h;++n)(l=t[n])&&(d[n]=f=o.call(l,l.__data__,n,t)+"",c.has(f)?s[n]=l:c.set(f,l));for(n=0;n<u;++n)f=o.call(e,a[n],n,a)+"",(l=c.get(f))?(i[n]=l,l.__data__=a[n],c.delete(f)):r[n]=new Vs(e,a[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(d[n])===l&&(s[n]=l)}function rx(e){return e.__data__}function ix(e,t){if(!arguments.length)return Array.from(this,rx);var r=t?ex:tx,i=this._parents,s=this._groups;typeof e!="function"&&(e=J0(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=s[c],d=u.length,f=sx(e.call(h,h&&h.__data__,c,i)),y=f.length,m=n[c]=new Array(y),C=o[c]=new Array(y),x=l[c]=new Array(d);r(h,u,m,C,x,f,t);for(var k=0,w=0,T,_;k<y;++k)if(T=m[k]){for(k>=w&&(w=k+1);!(_=C[w])&&++w<y;);T._next=_||null}}return o=new fe(o,i),o._enter=n,o._exit=l,o}function sx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ax(){return new fe(this._exit||this._groups.map(Gu),this._parents)}function ox(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function nx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,d=n[l]=new Array(u),f,y=0;y<u;++y)(f=c[y]||h[y])&&(d[y]=f);for(;l<s;++l)n[l]=r[l];return new fe(n,this._parents)}function lx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function hx(e){e||(e=cx);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),c,h=0;h<n;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new fe(s,this._parents).order()}function cx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ux(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function dx(){return Array.from(this)}function fx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function gx(){let e=0;for(const t of this)++e;return e}function px(){return!this.node()}function yx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function mx(e){return function(){this.removeAttribute(e)}}function xx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cx(e,t){return function(){this.setAttribute(e,t)}}function bx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function wx(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 Sx(e,t){var r=xa(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?xx:mx:typeof t=="function"?r.local?wx:kx:r.local?bx:Cx)(r,t))}function Xu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Tx(e){return function(){this.style.removeProperty(e)}}function _x(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Bx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function vx(e,t,r){return arguments.length>1?this.each((t==null?Tx:typeof t=="function"?Bx:_x)(e,t,r??"")):ui(this.node(),e)}function ui(e,t){return e.style.getPropertyValue(t)||Xu(e).getComputedStyle(e,null).getPropertyValue(t)}function Lx(e){return function(){delete this[e]}}function Fx(e,t){return function(){this[e]=t}}function Mx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Ax(e,t){return arguments.length>1?this.each((t==null?Lx:typeof t=="function"?Mx:Fx)(e,t)):this.node()[e]}function Vu(e){return e.trim().split(/^|\s+/)}function An(e){return e.classList||new Zu(e)}function Zu(e){this._node=e,this._names=Vu(e.getAttribute("class")||"")}Zu.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 Ku(e,t){for(var r=An(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Qu(e,t){for(var r=An(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function Ex(e){return function(){Ku(this,e)}}function $x(e){return function(){Qu(this,e)}}function Ox(e,t){return function(){(t.apply(this,arguments)?Ku:Qu)(this,e)}}function Px(e,t){var r=Vu(e+"");if(arguments.length<2){for(var i=An(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Ox:t?Ex:$x)(r,t))}function Dx(){this.textContent=""}function Ix(e){return function(){this.textContent=e}}function Rx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function qx(e){return arguments.length?this.each(e==null?Dx:(typeof e=="function"?Rx:Ix)(e)):this.node().textContent}function Nx(){this.innerHTML=""}function Wx(e){return function(){this.innerHTML=e}}function zx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Hx(e){return arguments.length?this.each(e==null?Nx:(typeof e=="function"?zx:Wx)(e)):this.node().innerHTML}function Yx(){this.nextSibling&&this.parentNode.appendChild(this)}function jx(){return this.each(Yx)}function Ux(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gx(){return this.each(Ux)}function Xx(e){var t=typeof e=="function"?e:Hu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Vx(){return null}function Zx(e,t){var r=typeof e=="function"?e:Hu(e),i=t==null?Vx:typeof t=="function"?t:Mn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Kx(){var e=this.parentNode;e&&e.removeChild(this)}function Qx(){return this.each(Kx)}function Jx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eC(e){return this.select(e?tC:Jx)}function rC(e){return arguments.length?this.property("__data__",e):this.node().__data__}function iC(e){return function(t){e.call(this,t,this.__data__)}}function sC(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 aC(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function oC(e,t,r){return function(){var i=this.__on,s,a=iC(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function nC(e,t,r){var i=sC(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<a;++s)if((o=i[s]).type===h.type&&o.name===h.name)return h.value}return}for(n=t?oC:aC,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Ju(e,t,r){var i=Xu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function lC(e,t){return function(){return Ju(this,e,t)}}function hC(e,t){return function(){return Ju(this,e,t.apply(this,arguments))}}function cC(e,t){return this.each((typeof t=="function"?hC:lC)(e,t))}function*uC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var td=[null];function fe(e,t){this._groups=e,this._parents=t}function fs(){return new fe([[document.documentElement]],td)}function dC(){return this}fe.prototype=fs.prototype={constructor:fe,select:R0,selectAll:z0,selectChild:U0,selectChildren:Z0,filter:K0,data:ix,enter:Q0,exit:ax,join:ox,merge:nx,selection:dC,order:lx,sort:hx,call:ux,nodes:dx,node:fx,size:gx,empty:px,each:yx,attr:Sx,style:vx,property:Ax,classed:Px,text:qx,html:Hx,raise:jx,lower:Gx,append:Xx,insert:Zx,remove:Qx,clone:eC,datum:rC,on:nC,dispatch:cC,[Symbol.iterator]:uC};function Ft(e){return typeof e=="string"?new fe([[document.querySelector(e)]],[document.documentElement]):new fe([[e]],td)}function En(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ed(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function gs(){}var ts=.7,Zs=1/ts,jr="\\s*([+-]?\\d+)\\s*",es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fC=/^#([0-9a-f]{3,8})$/,gC=new RegExp(`^rgb\\(${jr},${jr},${jr}\\)$`),pC=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),yC=new RegExp(`^rgba\\(${jr},${jr},${jr},${es}\\)$`),mC=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${es}\\)$`),xC=new RegExp(`^hsl\\(${es},${Oe},${Oe}\\)$`),CC=new RegExp(`^hsla\\(${es},${Oe},${Oe},${es}\\)$`),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};En(gs,rs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ah,formatHex:ah,formatHex8:bC,formatHsl:kC,formatRgb:oh,toString:oh});function ah(){return this.rgb().formatHex()}function bC(){return this.rgb().formatHex8()}function kC(){return rd(this).formatHsl()}function oh(){return this.rgb().formatRgb()}function rs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=fC.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?nh(t):r===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Cs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Cs(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=gC.exec(e))?new he(t[1],t[2],t[3],1):(t=pC.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yC.exec(e))?Cs(t[1],t[2],t[3],t[4]):(t=mC.exec(e))?Cs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=xC.exec(e))?ch(t[1],t[2]/100,t[3]/100,1):(t=CC.exec(e))?ch(t[1],t[2]/100,t[3]/100,t[4]):sh.hasOwnProperty(e)?nh(sh[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function nh(e){return new he(e>>16&255,e>>8&255,e&255,1)}function Cs(e,t,r,i){return i<=0&&(e=t=r=NaN),new he(e,t,r,i)}function wC(e){return e instanceof gs||(e=rs(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function No(e,t,r,i){return arguments.length===1?wC(e):new he(e,t,r,i??1)}function he(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}En(he,No,ed(gs,{brighter(e){return e=e==null?Zs:Math.pow(Zs,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(xr(this.r),xr(this.g),xr(this.b),Ks(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:SC,formatRgb:hh,toString:hh}));function lh(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function SC(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function hh(){const e=Ks(this.opacity);return`${e===1?"rgb(":"rgba("}${xr(this.r)}, ${xr(this.g)}, ${xr(this.b)}${e===1?")":`, ${e})`}`}function Ks(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yr(e){return e=xr(e),(e<16?"0":"")+e.toString(16)}function ch(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Se(e,t,r,i)}function rd(e){if(e instanceof Se)return new Se(e.h,e.s,e.l,e.opacity);if(e instanceof gs||(e=rs(e)),!e)return new Se;if(e instanceof Se)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new Se(o,n,l,e.opacity)}function TC(e,t,r,i){return arguments.length===1?rd(e):new Se(e,t,r,i??1)}function Se(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}En(Se,TC,ed(gs,{brighter(e){return e=e==null?Zs:Math.pow(Zs,e),new Se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new Se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new he(za(e>=240?e-240:e+120,s,i),za(e,s,i),za(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Se(uh(this.h),bs(this.s),bs(this.l),Ks(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=Ks(this.opacity);return`${e===1?"hsl(":"hsla("}${uh(this.h)}, ${bs(this.s)*100}%, ${bs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uh(e){return e=(e||0)%360,e<0?e+360:e}function bs(e){return Math.max(0,Math.min(1,e||0))}function za(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 $n=e=>()=>e;function id(e,t){return function(r){return e+r*t}}function _C(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 Q5(e,t){var r=t-e;return r?id(e,r>180||r<-180?r-360*Math.round(r/360):r):$n(isNaN(e)?t:e)}function BC(e){return(e=+e)==1?sd:function(t,r){return r-t?_C(t,r,e):$n(isNaN(t)?r:t)}}function sd(e,t){var r=t-e;return r?id(e,r):$n(isNaN(e)?t:e)}const dh=function e(t){var r=BC(t);function i(s,a){var o=r((s=No(s)).r,(a=No(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),c=sd(s.opacity,a.opacity);return function(h){return s.r=o(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i}(1);function rr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Wo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ha=new RegExp(Wo.source,"g");function vC(e){return function(){return e}}function LC(e){return function(t){return e(t)+""}}function FC(e,t){var r=Wo.lastIndex=Ha.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Wo.exec(e))&&(s=Ha.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:rr(i,s)})),r=Ha.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?LC(l[0].x):vC(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)n[(u=l[h]).i]=u.x(c);return n.join("")})}var fh=180/Math.PI,zo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ad(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(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,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*fh,skewX:Math.atan(l)*fh,scaleX:o,scaleY:n}}var ks;function MC(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zo:ad(t.a,t.b,t.c,t.d,t.e,t.f)}function AC(e){return e==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",e),!(e=ks.transform.baseVal.consolidate()))?zo:(e=e.matrix,ad(e.a,e.b,e.c,e.d,e.e,e.f))}function od(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,y){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);y.push({i:m-4,x:rr(c,u)},{i:m-2,x:rr(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function o(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(s(u)+"rotate(",null,i)-2,x:rr(c,h)})):h&&u.push(s(u)+"rotate("+h+i)}function n(c,h,u,d){c!==h?d.push({i:u.push(s(u)+"skewX(",null,i)-2,x:rr(c,h)}):h&&u.push(s(u)+"skewX("+h+i)}function l(c,h,u,d,f,y){if(c!==u||h!==d){var m=f.push(s(f)+"scale(",null,",",null,")");y.push({i:m-4,x:rr(c,u)},{i:m-2,x:rr(h,d)})}else(u!==1||d!==1)&&f.push(s(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),o(c.rotate,h.rotate,u,d),n(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var y=-1,m=d.length,C;++y<m;)u[(C=d[y]).i]=C.x(f);return u.join("")}}}var EC=od(MC,"px, ","px)","deg)"),$C=od(AC,", ",")",")"),di=0,Ii=0,Li=0,nd=1e3,Qs,Ri,Js=0,wr=0,Ca=0,is=typeof performance=="object"&&performance.now?performance:Date,ld=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function On(){return wr||(ld(OC),wr=is.now()+Ca)}function OC(){wr=0}function ta(){this._call=this._time=this._next=null}ta.prototype=hd.prototype={constructor:ta,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?On():+r)+(t==null?0:+t),!this._next&&Ri!==this&&(Ri?Ri._next=this:Qs=this,Ri=this),this._call=e,this._time=r,Ho()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ho())}};function hd(e,t,r){var i=new ta;return i.restart(e,t,r),i}function PC(){On(),++di;for(var e=Qs,t;e;)(t=wr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--di}function gh(){wr=(Js=is.now())+Ca,di=Ii=0;try{PC()}finally{di=0,IC(),wr=0}}function DC(){var e=is.now(),t=e-Js;t>nd&&(Ca-=t,Js=e)}function IC(){for(var e,t=Qs,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:Qs=r);Ri=e,Ho(i)}function Ho(e){if(!di){Ii&&(Ii=clearTimeout(Ii));var t=e-wr;t>24?(e<1/0&&(Ii=setTimeout(gh,e-is.now()-Ca)),Li&&(Li=clearInterval(Li))):(Li||(Js=is.now(),Li=setInterval(DC,nd)),di=1,ld(gh))}}function ph(e,t,r){var i=new ta;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var RC=zu("start","end","cancel","interrupt"),qC=[],cd=0,yh=1,Yo=2,Ds=3,mh=4,jo=5,Is=6;function ba(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;NC(e,r,{name:t,index:i,group:s,on:RC,tween:qC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:cd})}function Pn(e,t){var r=Be(e,t);if(r.state>cd)throw new Error("too late; already scheduled");return r}function Ne(e,t){var r=Be(e,t);if(r.state>Ds)throw new Error("too late; already running");return r}function Be(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function NC(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=hd(a,0,r.time);function a(c){r.state=yh,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,d,f;if(r.state!==yh)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===Ds)return ph(o);f.state===mh?(f.state=Is,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=Is,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(ph(function(){r.state===Ds&&(r.state=mh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Yo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Yo){for(r.state=Ds,s=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=f);s.length=u+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=jo,1),u=-1,d=s.length;++u<d;)s[u].call(e,h);r.state===jo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Is,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function WC(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>Yo&&i.state<jo,i.state=Is,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function zC(e){return this.each(function(){WC(this,e)})}function HC(e,t){var r,i;return function(){var s=Ne(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function YC(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=Ne(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}a.tween=s}}function jC(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Be(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?HC:YC)(r,e,t))}function Dn(e,t,r){var i=e._id;return e.each(function(){var s=Ne(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Be(s,i).value[t]}}function ud(e,t){var r;return(typeof t=="number"?rr:t instanceof rs?dh:(r=rs(t))?(t=r,dh):FC)(e,t)}function UC(e){return function(){this.removeAttribute(e)}}function GC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function XC(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function VC(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function ZC(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function KC(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function QC(e,t){var r=xa(e),i=r==="transform"?$C:ud;return this.attrTween(e,typeof t=="function"?(r.local?KC:ZC)(r,i,Dn(this,"attr."+e,t)):t==null?(r.local?GC:UC)(r):(r.local?VC:XC)(r,i,t))}function JC(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function tb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function eb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&tb(e,a)),r}return s._value=t,s}function rb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&JC(e,a)),r}return s._value=t,s}function ib(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=xa(e);return this.tween(r,(i.local?eb:rb)(i,t))}function sb(e,t){return function(){Pn(this,e).delay=+t.apply(this,arguments)}}function ab(e,t){return t=+t,function(){Pn(this,e).delay=t}}function ob(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sb:ab)(t,e)):Be(this.node(),t).delay}function nb(e,t){return function(){Ne(this,e).duration=+t.apply(this,arguments)}}function lb(e,t){return t=+t,function(){Ne(this,e).duration=t}}function hb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nb:lb)(t,e)):Be(this.node(),t).duration}function cb(e,t){if(typeof t!="function")throw new Error;return function(){Ne(this,e).ease=t}}function ub(e){var t=this._id;return arguments.length?this.each(cb(t,e)):Be(this.node(),t).ease}function db(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ne(this,e).ease=r}}function fb(e){if(typeof e!="function")throw new Error;return this.each(db(this._id,e))}function gb(e){typeof e!="function"&&(e=ju(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new Ve(i,this._parents,this._name,this._id)}function pb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],c=r[n],h=l.length,u=o[n]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;n<i;++n)o[n]=t[n];return new Ve(o,this._parents,this._name,this._id)}function yb(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 mb(e,t,r){var i,s,a=yb(t)?Pn:Ne;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function xb(e,t){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(e):this.each(mb(r,e,t))}function Cb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function bb(){return this.on("end.remove",Cb(this._id))}function kb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Mn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,c=a[o]=new Array(l),h,u,d=0;d<l;++d)(h=n[d])&&(u=e.call(h,h.__data__,d,n))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ba(c[d],t,r,d,c,Be(h,r)));return new Ve(a,this._parents,t,r)}function wb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Yu(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,y=Be(h,r),m=0,C=d.length;m<C;++m)(f=d[m])&&ba(f,t,r,m,d,y);a.push(d),o.push(h)}return new Ve(a,o,t,r)}var Sb=fs.prototype.constructor;function Tb(){return new Sb(this._groups,this._parents)}function _b(e,t){var r,i,s;return function(){var a=ui(this,e),o=(this.style.removeProperty(e),ui(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function dd(e){return function(){this.style.removeProperty(e)}}function Bb(e,t,r){var i,s=r+"",a;return function(){var o=ui(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function vb(e,t,r){var i,s,a;return function(){var o=ui(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),ui(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Lb(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=Ne(this,e),c=l.on,h=l.value[a]==null?n||(n=dd(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(o,s=h),l.on=i}}function Fb(e,t,r){var i=(e+="")=="transform"?EC:ud;return t==null?this.styleTween(e,_b(e,i)).on("end.style."+e,dd(e)):typeof t=="function"?this.styleTween(e,vb(e,i,Dn(this,"style."+e,t))).each(Lb(this._id,e)):this.styleTween(e,Bb(e,i,t),r).on("end.style."+e,null)}function Mb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Ab(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Mb(e,o,r)),i}return a._value=t,a}function Eb(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,Ab(e,t,r??""))}function $b(e){return function(){this.textContent=e}}function Ob(e){return function(){var t=e(this);this.textContent=t??""}}function Pb(e){return this.tween("text",typeof e=="function"?Ob(Dn(this,"text",e)):$b(e==null?"":e+""))}function Db(e){return function(t){this.textContent=e.call(this,t)}}function Ib(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Db(s)),t}return i._value=e,i}function Rb(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,Ib(e))}function qb(){for(var e=this._name,t=this._id,r=fd(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)if(l=o[c]){var h=Be(l,t);ba(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ve(i,this._parents,e,r)}function Nb(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var c=Ne(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}),s===0&&a()})}var Wb=0;function Ve(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function fd(){return++Wb}var He=fs.prototype;Ve.prototype={constructor:Ve,select:kb,selectAll:wb,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:gb,merge:pb,selection:Tb,transition:qb,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:xb,attr:QC,attrTween:ib,style:Fb,styleTween:Eb,text:Pb,textTween:Rb,remove:bb,tween:jC,delay:ob,duration:hb,ease:ub,easeVarying:fb,end:Nb,[Symbol.iterator]:He[Symbol.iterator]};function zb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Hb={time:null,delay:0,duration:250,ease:zb};function Yb(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 jb(e){var t,r;e instanceof Ve?(t=e._id,e=e._name):(t=fd(),(r=Hb).time=On(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&ba(l,e,t,c,o,r||Yb(l,t));return new Ve(i,this._parents,e,t)}fs.prototype.interrupt=zC;fs.prototype.transition=jb;const Uo=Math.PI,Go=2*Uo,fr=1e-6,Ub=Go-fr;function gd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Gb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gd;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Xb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gd:Gb(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,c=s-r,h=o-t,u=n-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>fr)if(!(Math.abs(u*l-c*h)>fr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-o,y=s-n,m=l*l+c*c,C=f*f+y*y,x=Math.sqrt(m),k=Math.sqrt(d),w=a*Math.tan((Uo-Math.acos((m+d-C)/(2*x*k)))/2),T=w/k,_=w/x;Math.abs(T-1)>fr&&this._append`L${t+T*h},${r+T*u}`,this._append`A${a},${a},0,0,${+(u*f>h*y)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,u=1^o,d=o?s-a:a-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>fr||Math.abs(this._y1-h)>fr)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%Go+Go),d>Ub?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>fr&&this._append`A${i},${i},0,${+(d>=Uo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Dr(e){return function(){return e}}const J5=Math.abs,tM=Math.atan2,eM=Math.cos,rM=Math.max,iM=Math.min,sM=Math.sin,aM=Math.sqrt,xh=1e-12,In=Math.PI,Ch=In/2,oM=2*In;function nM(e){return e>1?0:e<-1?In:Math.acos(e)}function lM(e){return e>=1?Ch:e<=-1?-Ch:Math.asin(e)}function Vb(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 Xb(t)}function Zb(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 Kb(e){return e[0]}function Qb(e){return e[1]}function Jb(e,t){var r=Dr(!0),i=null,s=Vi,a=null,o=Vb(n);e=typeof e=="function"?e:e===void 0?Kb:Dr(e),t=typeof t=="function"?t:t===void 0?Qb:Dr(t);function n(l){var c,h=(l=Zb(l)).length,u,d=!1,f;for(i==null&&(a=s(f=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Dr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Dr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Dr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class yd{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 md(e){return new yd(e,!0)}function xd(e){return new yd(e,!1)}function or(){}function ea(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 ka(e){this._context=e}ka.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:ea(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:ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xo(e){return new ka(e)}function Cd(e){this._context=e}Cd.prototype={areaStart:or,areaEnd:or,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:ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function t1(e){return new Cd(e)}function bd(e){this._context=e}bd.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:ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e1(e){return new bd(e)}function kd(e,t){this._basis=new ka(e),this._beta=t}kd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const r1=function e(t){function r(i){return t===1?new ka(i):new kd(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ra(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 Rn(e,t){this._context=e,this._k=(1-t)/6}Rn.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:ra(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:ra(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 wd=function e(t){function r(i){return new Rn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function qn(e,t){this._context=e,this._k=(1-t)/6}qn.prototype={areaStart:or,areaEnd:or,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:ra(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 i1=function e(t){function r(i){return new qn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.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:ra(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 s1=function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Wn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>xh){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,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>xh){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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Sd(e,t){this._context=e,this._alpha=t}Sd.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:Wn(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 Td=function e(t){function r(i){return t?new Sd(i,t):new Rn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function _d(e,t){this._context=e,this._alpha=t}_d.prototype={areaStart:or,areaEnd:or,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:Wn(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 a1=function e(t){function r(i){return t?new _d(i,t):new qn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Bd(e,t){this._context=e,this._alpha=t}Bd.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:Wn(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 o1=function e(t){function r(i){return t?new Bd(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function vd(e){this._context=e}vd.prototype={areaStart:or,areaEnd:or,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 n1(e){return new vd(e)}function bh(e){return e<0?-1:1}function kh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(bh(a)+bh(o))*Math.min(Math.abs(a),Math.abs(o),.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,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function ia(e){this._context=e}ia.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=kh(this,e,t)),r);break;default:Ya(this,this._t0,r=kh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ld(e){this._context=new Fd(e)}(Ld.prototype=Object.create(ia.prototype)).point=function(e,t){ia.prototype.point.call(this,t,e)};function Fd(e){this._context=e}Fd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Md(e){return new ia(e)}function Ad(e){return new Ld(e)}function Ed(e){this._context=e}Ed.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=Sh(e),s=Sh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(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 Sh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function $d(e){return new Ed(e)}function wa(e,t){this._context=e,this._t=t}wa.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 Od(e){return new wa(e,.5)}function Pd(e){return new wa(e,0)}function Dd(e){return new wa(e,1)}function qi(e,t,r){this.k=e,this.x=t,this.y=r}qi.prototype={constructor:qi,scale:function(e){return e===1?this:new qi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new qi(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+")"}};qi.prototype;var l1=g(e=>{var s;const{securityLevel:t}=Et();let r=Ft("body");if(t==="sandbox"){const o=((s=Ft(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Ft(o.body)}return r.select(`#${e}`)},"selectSvgElement"),h1=g(e=>{const{handDrawnSeed:t}=Et();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),c1=g(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),yi=g(e=>{const t=u1([...e.cssCompiledStyles||[],...e.cssStyles||[],...c1(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),u1=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Id=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),dt=g(e=>{const{stylesArray:t}=yi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Id(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),ot=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Et(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=yi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:d1(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),d1=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const f1=Object.freeze({left:0,top:0,width:16,height:16}),sa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Rd=Object.freeze({...f1,...sa}),g1=Object.freeze({...Rd,body:"",hidden:!1}),p1=Object.freeze({width:null,height:null}),y1=Object.freeze({...p1,...sa}),m1=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return ja(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return ja(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return ja(n,r)?n:null}return null},ja=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function x1(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 Th(e,t){const r=x1(e,t);for(const i in g1)i in sa?i in e&&!(i in r)&&(r[i]=sa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function C1(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function _h(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Th(i[n]||s[n],a)}return o(t),r.forEach(o),Th(e,a)}function b1(e,t){if(e.icons[t])return _h(e,t,[]);const r=C1(e,[t])[t];return r?_h(e,t,r):null}const k1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,w1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Bh(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(k1);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=w1.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function S1(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function T1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function _1(e,t,r){const i=S1(e);return T1(i.defs,t+i.content+r)}const B1=e=>e==="unset"||e==="undefined"||e==="none";function v1(e,t){const r={...Rd,...e},i={...y1,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const C=[],x=m.hFlip,k=m.vFlip;let w=m.rotate;x?k?w+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):k&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}w%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(a=_1(a,'<g transform="'+C.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Bh(u,l/c)):(h=o==="auto"?l:o,u=n===null?Bh(h,c/l):n==="auto"?c:n);const d={},f=(m,C)=>{B1(C)||(d[m]=C.toString())};f("width",h),f("height",u);const y=[s.left,s.top,l,c];return d.viewBox=y.join(" "),{attributes:d,viewBox:y,body:a}}const L1=/\sid="(\S+)"/g,vh=new Map;function F1(e){e=e.replace(/[0-9]+$/,"")||"a";const t=vh.get(e)||0;return vh.set(e,t+1),t?`${e}${t}`:e}function M1(e){const t=[];let r;for(;r=L1.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=F1(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function A1(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>"}var E1={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},Vo=new Map,qd=new Map,$1=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",t.name),"loader"in t)qd.set(t.name,t.loader);else if("icons"in t)Vo.set(t.name,t.icons);else throw I.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Nd=g(async(e,t)=>{const r=m1(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Vo.get(i);if(!s){const o=qd.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},Vo.set(i,s)}catch(n){throw I.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=b1(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),O1=g(async e=>{try{return await Nd(e),!0}catch{return!1}},"isIconAvailable"),ps=g(async(e,t,r)=>{let i;try{i=await Nd(e,t==null?void 0:t.fallbackPrefix)}catch(o){I.error(o),i=E1}const s=v1(i,t),a=A1(M1(s.body),{...s.attributes,...r});return pe(a,Yt())},"getIconSVG"),Wd={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.BLANK_URL=Vt.relativeFirstCharacters=Vt.whitespaceEscapeCharsRegex=Vt.urlSchemeRegex=Vt.ctrlCharactersRegex=Vt.htmlCtrlEntityRegex=Vt.htmlEntitiesRegex=Vt.invalidProtocolRegex=void 0;Vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Vt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Vt.urlSchemeRegex=/^.+(:|&colon;)/gim;Vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Vt.relativeFirstCharacters=[".","/"];Vt.BLANK_URL="about:blank";Object.defineProperty(Wd,"__esModule",{value:!0});var P1=Wd.sanitizeUrl=q1,ee=Vt;function D1(e){return ee.relativeFirstCharacters.indexOf(e[0])>-1}function I1(e){var t=e.replace(ee.ctrlCharactersRegex,"");return t.replace(ee.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function R1(e){return URL.canParse(e)}function Lh(e){try{return decodeURIComponent(e)}catch{return e}}function q1(e){if(!e)return ee.BLANK_URL;var t,r=Lh(e.trim());do r=I1(r).replace(ee.htmlCtrlEntityRegex,"").replace(ee.ctrlCharactersRegex,"").replace(ee.whitespaceEscapeCharsRegex,"").trim(),r=Lh(r),t=r.match(ee.ctrlCharactersRegex)||r.match(ee.htmlEntitiesRegex)||r.match(ee.htmlCtrlEntityRegex)||r.match(ee.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return ee.BLANK_URL;if(D1(i))return i;var s=i.trimStart(),a=s.match(ee.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(ee.invalidProtocolRegex.test(o))return ee.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!R1(n))return ee.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function Ua(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function N1(){}function zd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function zn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const W1="[object RegExp]",Hd="[object String]",Yd="[object Number]",jd="[object Boolean]",Ud="[object Arguments]",z1="[object Symbol]",H1="[object Date]",Y1="[object Map]",j1="[object Set]",U1="[object Array]",G1="[object ArrayBuffer]",X1="[object Object]",V1="[object DataView]",Z1="[object Uint8Array]",K1="[object Uint8ClampedArray]",Q1="[object Uint16Array]",J1="[object Uint32Array]",tk="[object Int8Array]",ek="[object Int16Array]",rk="[object Int32Array]",ik="[object Float32Array]",sk="[object Float64Array]",Fh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function Hn(e){return typeof Fh.Buffer<"u"&&Fh.Buffer.isBuffer(e)}function ak(e){return Number.isSafeInteger(e)&&e>=0}function Gd(e){return e!=null&&typeof e!="function"&&ak(e.length)}function ok(e){return e==="__proto__"}function Yn(e){return e==null||typeof e!="object"&&typeof e!="function"}function jn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nk(e,t){return Hr(e,void 0,e,new Map,t)}function Hr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Yn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Hr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Hr(n,void 0,r,i,s));return o}if(Hn(e))return e.subarray();if(jn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),be(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),be(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,be(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(typeof e=="object"&&lk(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),be(o,e,r,i,s),o}return e}function be(e,t,r=e,i,s){const a=[...Object.keys(t),...zd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Hr(t[n],n,r,i,s))}}function lk(e){switch(zn(e)){case Ud:case U1:case G1:case V1:case jd:case H1:case ik:case sk:case tk:case ek:case rk:case Y1:case Yd:case X1:case W1:case j1:case Hd:case z1:case Z1:case K1:case Q1:case J1:return!0;default:return!1}}function hk(e,t){return nk(e,(r,i,s,a)=>{if(typeof e=="object"){if(zn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),be(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Yd:case Hd:case jd:{const o=new e.constructor(e==null?void 0:e.valueOf());return be(o,e),o}case Ud:{const o={};return be(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Mh(e){return hk(e)}function Zo(e){return e!==null&&typeof e=="object"&&zn(e)==="[object Arguments]"}function Ko(e){return typeof e=="object"&&e!==null}function ck(e){return Ko(e)&&Gd(e)}function Rs(e){return jn(e)}function uk(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(ys.Cache||Map),r}ys.Cache=Map;function dk(e){if(Yn(e))return e;if(Array.isArray(e)||jn(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 fk(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=qs(s,o,i,new Map)}return s}function qs(e,t,r,i){if(Yn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return dk(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...zd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(ok(o))continue;let n=t[o],l=e[o];if(Zo(n)&&(n={...n}),Zo(l)&&(l={...l}),Hn(n)&&(n=Mh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let d=0;d<u.length;d++){const f=u[d];h[f]=l[f]}l=h}else if(ck(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||Ko(l)&&Ko(n)&&(Ua(l)||Ua(n)||Rs(l)||Rs(n))?e[o]=qs(l,n,r,i):l==null&&Ua(n)?e[o]=qs({},n,r,i):l==null&&Rs(n)?e[o]=Mh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function gk(e,...t){return fk(e,...t,N1)}function Ah(e){if(e==null)return!0;if(Gd(e))return typeof e.splice!="function"&&typeof e!="string"&&!Hn(e)&&!Rs(e)&&!Zo(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 uk(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var pk="​",yk={curveBasis:Xo,curveBasisClosed:t1,curveBasisOpen:e1,curveBumpX:md,curveBumpY:xd,curveBundle:r1,curveCardinalClosed:i1,curveCardinalOpen:s1,curveCardinal:wd,curveCatmullRomClosed:a1,curveCatmullRomOpen:o1,curveCatmullRom:Td,curveLinear:Vi,curveLinearClosed:n1,curveMonotoneX:Md,curveMonotoneY:Ad,curveNatural:$d,curveStep:Od,curveStepAfter:Dd,curveStepBefore:Pd},mk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,xk=g(function(e,t){const r=Xd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Ys(o),i=Zt(i,[...o])}else i=r.args;if(!i)return;let s=Tn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Xd=g(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${mk.source})(?=[}][%]{2}).*
126
+ `)},"setAccDescription"),_0=g(()=>vn,"getAccDescription"),B0=g(e=>{Bn=Ln(e)},"setDiagramTitle"),v0=g(()=>Bn,"getDiagramTitle"),eh=I,L0=Sn,Et=Yt,Z5=Mu,K5=ci,Fn=g(e=>pe(e,Et()),"sanitizeText"),F0=m0,M0=g(()=>Wu,"getCommonDb"),Gs={},Xs=g((e,t,r)=>{var i;Gs[e]&&eh.warn(`Diagram with id ${e} already registered. Overwriting.`),Gs[e]=t,r&&Pu(e,r),C0(e,t.styles),(i=t.injectUtils)==null||i.call(t,eh,L0,Et,Fn,F0,M0(),()=>{})},"registerDiagram"),Ro=g(e=>{if(e in Gs)return Gs[e];throw new A0(e)},"getDiagram"),oi,A0=(oi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(oi,"DiagramNotFoundError"),oi),E0={value:()=>{}};function zu(){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 Ps(r)}function Ps(e){this._=e}function $0(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ps.prototype=zu.prototype={constructor:Ps,on:function(e,t){var r=this._,i=$0(e+"",r),s,a=-1,o=i.length;if(arguments.length<2){for(;++a<o;)if((s=(e=i[a]).type)&&(s=O0(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(s=(e=i[a]).type)r[s]=rh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=rh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ps(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,a;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,r)}};function O0(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function rh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=E0,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var qo="http://www.w3.org/1999/xhtml";const ih={svg:"http://www.w3.org/2000/svg",xhtml:qo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xa(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),ih.hasOwnProperty(t)?{space:ih[t],local:e}:e}function P0(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===qo&&t.documentElement.namespaceURI===qo?t.createElement(e):t.createElementNS(r,e)}}function D0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hu(e){var t=xa(e);return(t.local?D0:P0)(t)}function I0(){}function Mn(e){return e==null?I0:function(){return this.querySelector(e)}}function R0(e){typeof e!="function"&&(e=Mn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=new Array(o),l,c,h=0;h<o;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new fe(i,this._parents)}function q0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function N0(){return[]}function Yu(e){return e==null?N0:function(){return this.querySelectorAll(e)}}function W0(e){return function(){return q0(e.apply(this,arguments))}}function z0(e){typeof e=="function"?e=W0(e):e=Yu(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var o=t[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&(i.push(e.call(l,l.__data__,c,o)),s.push(l));return new fe(i,s)}function ju(e){return function(){return this.matches(e)}}function Uu(e){return function(t){return t.matches(e)}}var H0=Array.prototype.find;function Y0(e){return function(){return H0.call(this.children,e)}}function j0(){return this.firstElementChild}function U0(e){return this.select(e==null?j0:Y0(typeof e=="function"?e:Uu(e)))}var G0=Array.prototype.filter;function X0(){return Array.from(this.children)}function V0(e){return function(){return G0.call(this.children,e)}}function Z0(e){return this.selectAll(e==null?X0:V0(typeof e=="function"?e:Uu(e)))}function K0(e){typeof e!="function"&&(e=ju(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new fe(i,this._parents)}function Gu(e){return new Array(e.length)}function Q0(){return new fe(this._enter||this._groups.map(Gu),this._parents)}function Vs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vs.prototype={constructor:Vs,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 J0(e){return function(){return e}}function tx(e,t,r,i,s,a){for(var o=0,n,l=t.length,c=a.length;o<c;++o)(n=t[o])?(n.__data__=a[o],i[o]=n):r[o]=new Vs(e,a[o]);for(;o<l;++o)(n=t[o])&&(s[o]=n)}function ex(e,t,r,i,s,a,o){var n,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(n=0;n<h;++n)(l=t[n])&&(d[n]=f=o.call(l,l.__data__,n,t)+"",c.has(f)?s[n]=l:c.set(f,l));for(n=0;n<u;++n)f=o.call(e,a[n],n,a)+"",(l=c.get(f))?(i[n]=l,l.__data__=a[n],c.delete(f)):r[n]=new Vs(e,a[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(d[n])===l&&(s[n]=l)}function rx(e){return e.__data__}function ix(e,t){if(!arguments.length)return Array.from(this,rx);var r=t?ex:tx,i=this._parents,s=this._groups;typeof e!="function"&&(e=J0(e));for(var a=s.length,o=new Array(a),n=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=s[c],d=u.length,f=sx(e.call(h,h&&h.__data__,c,i)),y=f.length,m=n[c]=new Array(y),C=o[c]=new Array(y),x=l[c]=new Array(d);r(h,u,m,C,x,f,t);for(var k=0,w=0,T,_;k<y;++k)if(T=m[k]){for(k>=w&&(w=k+1);!(_=C[w])&&++w<y;);T._next=_||null}}return o=new fe(o,i),o._enter=n,o._exit=l,o}function sx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ax(){return new fe(this._exit||this._groups.map(Gu),this._parents)}function ox(e,t,r){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?a.remove():r(a),i&&s?i.merge(s).order():s}function nx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,o=Math.min(s,a),n=new Array(s),l=0;l<o;++l)for(var c=r[l],h=i[l],u=c.length,d=n[l]=new Array(u),f,y=0;y<u;++y)(f=c[y]||h[y])&&(d[y]=f);for(;l<s;++l)n[l]=r[l];return new fe(n,this._parents)}function lx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],o;--s>=0;)(o=i[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function hx(e){e||(e=cx);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a){for(var o=r[a],n=o.length,l=s[a]=new Array(n),c,h=0;h<n;++h)(c=o[h])&&(l[h]=c);l.sort(t)}return new fe(s,this._parents).order()}function cx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ux(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function dx(){return Array.from(this)}function fx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var o=i[s];if(o)return o}return null}function gx(){let e=0;for(const t of this)++e;return e}function px(){return!this.node()}function yx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,o=s.length,n;a<o;++a)(n=s[a])&&e.call(n,n.__data__,a,s);return this}function mx(e){return function(){this.removeAttribute(e)}}function xx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cx(e,t){return function(){this.setAttribute(e,t)}}function bx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function wx(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 Sx(e,t){var r=xa(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?xx:mx:typeof t=="function"?r.local?wx:kx:r.local?bx:Cx)(r,t))}function Xu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Tx(e){return function(){this.style.removeProperty(e)}}function _x(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Bx(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function vx(e,t,r){return arguments.length>1?this.each((t==null?Tx:typeof t=="function"?Bx:_x)(e,t,r??"")):ui(this.node(),e)}function ui(e,t){return e.style.getPropertyValue(t)||Xu(e).getComputedStyle(e,null).getPropertyValue(t)}function Lx(e){return function(){delete this[e]}}function Fx(e,t){return function(){this[e]=t}}function Mx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Ax(e,t){return arguments.length>1?this.each((t==null?Lx:typeof t=="function"?Mx:Fx)(e,t)):this.node()[e]}function Vu(e){return e.trim().split(/^|\s+/)}function An(e){return e.classList||new Zu(e)}function Zu(e){this._node=e,this._names=Vu(e.getAttribute("class")||"")}Zu.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 Ku(e,t){for(var r=An(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Qu(e,t){for(var r=An(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function Ex(e){return function(){Ku(this,e)}}function $x(e){return function(){Qu(this,e)}}function Ox(e,t){return function(){(t.apply(this,arguments)?Ku:Qu)(this,e)}}function Px(e,t){var r=Vu(e+"");if(arguments.length<2){for(var i=An(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?Ox:t?Ex:$x)(r,t))}function Dx(){this.textContent=""}function Ix(e){return function(){this.textContent=e}}function Rx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function qx(e){return arguments.length?this.each(e==null?Dx:(typeof e=="function"?Rx:Ix)(e)):this.node().textContent}function Nx(){this.innerHTML=""}function Wx(e){return function(){this.innerHTML=e}}function zx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Hx(e){return arguments.length?this.each(e==null?Nx:(typeof e=="function"?zx:Wx)(e)):this.node().innerHTML}function Yx(){this.nextSibling&&this.parentNode.appendChild(this)}function jx(){return this.each(Yx)}function Ux(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gx(){return this.each(Ux)}function Xx(e){var t=typeof e=="function"?e:Hu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Vx(){return null}function Zx(e,t){var r=typeof e=="function"?e:Hu(e),i=t==null?Vx:typeof t=="function"?t:Mn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Kx(){var e=this.parentNode;e&&e.removeChild(this)}function Qx(){return this.each(Kx)}function Jx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eC(e){return this.select(e?tC:Jx)}function rC(e){return arguments.length?this.property("__data__",e):this.node().__data__}function iC(e){return function(t){e.call(this,t,this.__data__)}}function sC(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 aC(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,a;r<s;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function oC(e,t,r){return function(){var i=this.__on,s,a=iC(t);if(i){for(var o=0,n=i.length;o<n;++o)if((s=i[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function nC(e,t,r){var i=sC(e+""),s,a=i.length,o;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<a;++s)if((o=i[s]).type===h.type&&o.name===h.name)return h.value}return}for(n=t?oC:aC,s=0;s<a;++s)this.each(n(i[s],t,r));return this}function Ju(e,t,r){var i=Xu(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function lC(e,t){return function(){return Ju(this,e,t)}}function hC(e,t){return function(){return Ju(this,e,t.apply(this,arguments))}}function cC(e,t){return this.each((typeof t=="function"?hC:lC)(e,t))}function*uC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,o;s<a;++s)(o=i[s])&&(yield o)}var td=[null];function fe(e,t){this._groups=e,this._parents=t}function fs(){return new fe([[document.documentElement]],td)}function dC(){return this}fe.prototype=fs.prototype={constructor:fe,select:R0,selectAll:z0,selectChild:U0,selectChildren:Z0,filter:K0,data:ix,enter:Q0,exit:ax,join:ox,merge:nx,selection:dC,order:lx,sort:hx,call:ux,nodes:dx,node:fx,size:gx,empty:px,each:yx,attr:Sx,style:vx,property:Ax,classed:Px,text:qx,html:Hx,raise:jx,lower:Gx,append:Xx,insert:Zx,remove:Qx,clone:eC,datum:rC,on:nC,dispatch:cC,[Symbol.iterator]:uC};function Ft(e){return typeof e=="string"?new fe([[document.querySelector(e)]],[document.documentElement]):new fe([[e]],td)}function En(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ed(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function gs(){}var ts=.7,Zs=1/ts,jr="\\s*([+-]?\\d+)\\s*",es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fC=/^#([0-9a-f]{3,8})$/,gC=new RegExp(`^rgb\\(${jr},${jr},${jr}\\)$`),pC=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),yC=new RegExp(`^rgba\\(${jr},${jr},${jr},${es}\\)$`),mC=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${es}\\)$`),xC=new RegExp(`^hsl\\(${es},${Oe},${Oe}\\)$`),CC=new RegExp(`^hsla\\(${es},${Oe},${Oe},${es}\\)$`),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};En(gs,rs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ah,formatHex:ah,formatHex8:bC,formatHsl:kC,formatRgb:oh,toString:oh});function ah(){return this.rgb().formatHex()}function bC(){return this.rgb().formatHex8()}function kC(){return rd(this).formatHsl()}function oh(){return this.rgb().formatRgb()}function rs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=fC.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?nh(t):r===3?new he(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Cs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Cs(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=gC.exec(e))?new he(t[1],t[2],t[3],1):(t=pC.exec(e))?new he(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=yC.exec(e))?Cs(t[1],t[2],t[3],t[4]):(t=mC.exec(e))?Cs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=xC.exec(e))?ch(t[1],t[2]/100,t[3]/100,1):(t=CC.exec(e))?ch(t[1],t[2]/100,t[3]/100,t[4]):sh.hasOwnProperty(e)?nh(sh[e]):e==="transparent"?new he(NaN,NaN,NaN,0):null}function nh(e){return new he(e>>16&255,e>>8&255,e&255,1)}function Cs(e,t,r,i){return i<=0&&(e=t=r=NaN),new he(e,t,r,i)}function wC(e){return e instanceof gs||(e=rs(e)),e?(e=e.rgb(),new he(e.r,e.g,e.b,e.opacity)):new he}function No(e,t,r,i){return arguments.length===1?wC(e):new he(e,t,r,i??1)}function he(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}En(he,No,ed(gs,{brighter(e){return e=e==null?Zs:Math.pow(Zs,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new he(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new he(xr(this.r),xr(this.g),xr(this.b),Ks(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:SC,formatRgb:hh,toString:hh}));function lh(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function SC(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function hh(){const e=Ks(this.opacity);return`${e===1?"rgb(":"rgba("}${xr(this.r)}, ${xr(this.g)}, ${xr(this.b)}${e===1?")":`, ${e})`}`}function Ks(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yr(e){return e=xr(e),(e<16?"0":"")+e.toString(16)}function ch(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Se(e,t,r,i)}function rd(e){if(e instanceof Se)return new Se(e.h,e.s,e.l,e.opacity);if(e instanceof gs||(e=rs(e)),!e)return new Se;if(e instanceof Se)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,n=a-s,l=(a+s)/2;return n?(t===a?o=(r-i)/n+(r<i)*6:r===a?o=(i-t)/n+2:o=(t-r)/n+4,n/=l<.5?a+s:2-a-s,o*=60):n=l>0&&l<1?0:o,new Se(o,n,l,e.opacity)}function TC(e,t,r,i){return arguments.length===1?rd(e):new Se(e,t,r,i??1)}function Se(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}En(Se,TC,ed(gs,{brighter(e){return e=e==null?Zs:Math.pow(Zs,e),new Se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new Se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new he(za(e>=240?e-240:e+120,s,i),za(e,s,i),za(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Se(uh(this.h),bs(this.s),bs(this.l),Ks(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=Ks(this.opacity);return`${e===1?"hsl(":"hsla("}${uh(this.h)}, ${bs(this.s)*100}%, ${bs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uh(e){return e=(e||0)%360,e<0?e+360:e}function bs(e){return Math.max(0,Math.min(1,e||0))}function za(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 $n=e=>()=>e;function id(e,t){return function(r){return e+r*t}}function _C(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 Q5(e,t){var r=t-e;return r?id(e,r>180||r<-180?r-360*Math.round(r/360):r):$n(isNaN(e)?t:e)}function BC(e){return(e=+e)==1?sd:function(t,r){return r-t?_C(t,r,e):$n(isNaN(t)?r:t)}}function sd(e,t){var r=t-e;return r?id(e,r):$n(isNaN(e)?t:e)}const dh=function e(t){var r=BC(t);function i(s,a){var o=r((s=No(s)).r,(a=No(a)).r),n=r(s.g,a.g),l=r(s.b,a.b),c=sd(s.opacity,a.opacity);return function(h){return s.r=o(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i}(1);function rr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Wo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ha=new RegExp(Wo.source,"g");function vC(e){return function(){return e}}function LC(e){return function(t){return e(t)+""}}function FC(e,t){var r=Wo.lastIndex=Ha.lastIndex=0,i,s,a,o=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Wo.exec(e))&&(s=Ha.exec(t));)(a=s.index)>r&&(a=t.slice(r,a),n[o]?n[o]+=a:n[++o]=a),(i=i[0])===(s=s[0])?n[o]?n[o]+=s:n[++o]=s:(n[++o]=null,l.push({i:o,x:rr(i,s)})),r=Ha.lastIndex;return r<t.length&&(a=t.slice(r),n[o]?n[o]+=a:n[++o]=a),n.length<2?l[0]?LC(l[0].x):vC(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)n[(u=l[h]).i]=u.x(c);return n.join("")})}var fh=180/Math.PI,zo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ad(e,t,r,i,s,a){var o,n,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(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,o=-o),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*fh,skewX:Math.atan(l)*fh,scaleX:o,scaleY:n}}var ks;function MC(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zo:ad(t.a,t.b,t.c,t.d,t.e,t.f)}function AC(e){return e==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",e),!(e=ks.transform.baseVal.consolidate()))?zo:(e=e.matrix,ad(e.a,e.b,e.c,e.d,e.e,e.f))}function od(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,y){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);y.push({i:m-4,x:rr(c,u)},{i:m-2,x:rr(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function o(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(s(u)+"rotate(",null,i)-2,x:rr(c,h)})):h&&u.push(s(u)+"rotate("+h+i)}function n(c,h,u,d){c!==h?d.push({i:u.push(s(u)+"skewX(",null,i)-2,x:rr(c,h)}):h&&u.push(s(u)+"skewX("+h+i)}function l(c,h,u,d,f,y){if(c!==u||h!==d){var m=f.push(s(f)+"scale(",null,",",null,")");y.push({i:m-4,x:rr(c,u)},{i:m-2,x:rr(h,d)})}else(u!==1||d!==1)&&f.push(s(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),o(c.rotate,h.rotate,u,d),n(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var y=-1,m=d.length,C;++y<m;)u[(C=d[y]).i]=C.x(f);return u.join("")}}}var EC=od(MC,"px, ","px)","deg)"),$C=od(AC,", ",")",")"),di=0,Ii=0,Li=0,nd=1e3,Qs,Ri,Js=0,wr=0,Ca=0,is=typeof performance=="object"&&performance.now?performance:Date,ld=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function On(){return wr||(ld(OC),wr=is.now()+Ca)}function OC(){wr=0}function ta(){this._call=this._time=this._next=null}ta.prototype=hd.prototype={constructor:ta,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?On():+r)+(t==null?0:+t),!this._next&&Ri!==this&&(Ri?Ri._next=this:Qs=this,Ri=this),this._call=e,this._time=r,Ho()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ho())}};function hd(e,t,r){var i=new ta;return i.restart(e,t,r),i}function PC(){On(),++di;for(var e=Qs,t;e;)(t=wr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--di}function gh(){wr=(Js=is.now())+Ca,di=Ii=0;try{PC()}finally{di=0,IC(),wr=0}}function DC(){var e=is.now(),t=e-Js;t>nd&&(Ca-=t,Js=e)}function IC(){for(var e,t=Qs,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:Qs=r);Ri=e,Ho(i)}function Ho(e){if(!di){Ii&&(Ii=clearTimeout(Ii));var t=e-wr;t>24?(e<1/0&&(Ii=setTimeout(gh,e-is.now()-Ca)),Li&&(Li=clearInterval(Li))):(Li||(Js=is.now(),Li=setInterval(DC,nd)),di=1,ld(gh))}}function ph(e,t,r){var i=new ta;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var RC=zu("start","end","cancel","interrupt"),qC=[],cd=0,yh=1,Yo=2,Ds=3,mh=4,jo=5,Is=6;function ba(e,t,r,i,s,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;NC(e,r,{name:t,index:i,group:s,on:RC,tween:qC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:cd})}function Pn(e,t){var r=Be(e,t);if(r.state>cd)throw new Error("too late; already scheduled");return r}function Ne(e,t){var r=Be(e,t);if(r.state>Ds)throw new Error("too late; already running");return r}function Be(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function NC(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=hd(a,0,r.time);function a(c){r.state=yh,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,d,f;if(r.state!==yh)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===Ds)return ph(o);f.state===mh?(f.state=Is,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=Is,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(ph(function(){r.state===Ds&&(r.state=mh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Yo,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Yo){for(r.state=Ds,s=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=f);s.length=u+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=jo,1),u=-1,d=s.length;++u<d;)s[u].call(e,h);r.state===jo&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Is,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function WC(e,t){var r=e.__transition,i,s,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((i=r[o]).name!==t){a=!1;continue}s=i.state>Yo&&i.state<jo,i.state=Is,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[o]}a&&delete e.__transition}}function zC(e){return this.each(function(){WC(this,e)})}function HC(e,t){var r,i;return function(){var s=Ne(this,e),a=s.tween;if(a!==r){i=r=a;for(var o=0,n=i.length;o<n;++o)if(i[o].name===t){i=i.slice(),i.splice(o,1);break}}s.tween=i}}function YC(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var a=Ne(this,e),o=a.tween;if(o!==i){s=(i=o).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}a.tween=s}}function jC(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Be(this.node(),r).tween,s=0,a=i.length,o;s<a;++s)if((o=i[s]).name===e)return o.value;return null}return this.each((t==null?HC:YC)(r,e,t))}function Dn(e,t,r){var i=e._id;return e.each(function(){var s=Ne(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Be(s,i).value[t]}}function ud(e,t){var r;return(typeof t=="number"?rr:t instanceof rs?dh:(r=rs(t))?(t=r,dh):FC)(e,t)}function UC(e){return function(){this.removeAttribute(e)}}function GC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function XC(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttribute(e);return o===s?null:o===i?a:a=t(i=o,r)}}function VC(e,t,r){var i,s=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===i?a:a=t(i=o,r)}}function ZC(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function KC(e,t,r){var i,s,a;return function(){var o,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=n+"",o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n)))}}function QC(e,t){var r=xa(e),i=r==="transform"?$C:ud;return this.attrTween(e,typeof t=="function"?(r.local?KC:ZC)(r,i,Dn(this,"attr."+e,t)):t==null?(r.local?GC:UC)(r):(r.local?VC:XC)(r,i,t))}function JC(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function tb(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function eb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&tb(e,a)),r}return s._value=t,s}function rb(e,t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&JC(e,a)),r}return s._value=t,s}function ib(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=xa(e);return this.tween(r,(i.local?eb:rb)(i,t))}function sb(e,t){return function(){Pn(this,e).delay=+t.apply(this,arguments)}}function ab(e,t){return t=+t,function(){Pn(this,e).delay=t}}function ob(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sb:ab)(t,e)):Be(this.node(),t).delay}function nb(e,t){return function(){Ne(this,e).duration=+t.apply(this,arguments)}}function lb(e,t){return t=+t,function(){Ne(this,e).duration=t}}function hb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?nb:lb)(t,e)):Be(this.node(),t).duration}function cb(e,t){if(typeof t!="function")throw new Error;return function(){Ne(this,e).ease=t}}function ub(e){var t=this._id;return arguments.length?this.each(cb(t,e)):Be(this.node(),t).ease}function db(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ne(this,e).ease=r}}function fb(e){if(typeof e!="function")throw new Error;return this.each(db(this._id,e))}function gb(e){typeof e!="function"&&(e=ju(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],o=a.length,n=i[s]=[],l,c=0;c<o;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&n.push(l);return new Ve(i,this._parents,this._name,this._id)}function pb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,a=Math.min(i,s),o=new Array(i),n=0;n<a;++n)for(var l=t[n],c=r[n],h=l.length,u=o[n]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;n<i;++n)o[n]=t[n];return new Ve(o,this._parents,this._name,this._id)}function yb(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 mb(e,t,r){var i,s,a=yb(t)?Pn:Ne;return function(){var o=a(this,e),n=o.on;n!==i&&(s=(i=n).copy()).on(t,r),o.on=s}}function xb(e,t){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(e):this.each(mb(r,e,t))}function Cb(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function bb(){return this.on("end.remove",Cb(this._id))}function kb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Mn(e));for(var i=this._groups,s=i.length,a=new Array(s),o=0;o<s;++o)for(var n=i[o],l=n.length,c=a[o]=new Array(l),h,u,d=0;d<l;++d)(h=n[d])&&(u=e.call(h,h.__data__,d,n))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,ba(c[d],t,r,d,c,Be(h,r)));return new Ve(a,this._parents,t,r)}function wb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Yu(e));for(var i=this._groups,s=i.length,a=[],o=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,y=Be(h,r),m=0,C=d.length;m<C;++m)(f=d[m])&&ba(f,t,r,m,d,y);a.push(d),o.push(h)}return new Ve(a,o,t,r)}var Sb=fs.prototype.constructor;function Tb(){return new Sb(this._groups,this._parents)}function _b(e,t){var r,i,s;return function(){var a=ui(this,e),o=(this.style.removeProperty(e),ui(this,e));return a===o?null:a===r&&o===i?s:s=t(r=a,i=o)}}function dd(e){return function(){this.style.removeProperty(e)}}function Bb(e,t,r){var i,s=r+"",a;return function(){var o=ui(this,e);return o===s?null:o===i?a:a=t(i=o,r)}}function vb(e,t,r){var i,s,a;return function(){var o=ui(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),ui(this,e))),o===l?null:o===i&&l===s?a:(s=l,a=t(i=o,n))}}function Lb(e,t){var r,i,s,a="style."+t,o="end."+a,n;return function(){var l=Ne(this,e),c=l.on,h=l.value[a]==null?n||(n=dd(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(o,s=h),l.on=i}}function Fb(e,t,r){var i=(e+="")=="transform"?EC:ud;return t==null?this.styleTween(e,_b(e,i)).on("end.style."+e,dd(e)):typeof t=="function"?this.styleTween(e,vb(e,i,Dn(this,"style."+e,t))).each(Lb(this._id,e)):this.styleTween(e,Bb(e,i,t),r).on("end.style."+e,null)}function Mb(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Ab(e,t,r){var i,s;function a(){var o=t.apply(this,arguments);return o!==s&&(i=(s=o)&&Mb(e,o,r)),i}return a._value=t,a}function Eb(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,Ab(e,t,r??""))}function $b(e){return function(){this.textContent=e}}function Ob(e){return function(){var t=e(this);this.textContent=t??""}}function Pb(e){return this.tween("text",typeof e=="function"?Ob(Dn(this,"text",e)):$b(e==null?"":e+""))}function Db(e){return function(t){this.textContent=e.call(this,t)}}function Ib(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Db(s)),t}return i._value=e,i}function Rb(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,Ib(e))}function qb(){for(var e=this._name,t=this._id,r=fd(),i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)if(l=o[c]){var h=Be(l,t);ba(l,e,r,c,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ve(i,this._parents,e,r)}function Nb(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(a,o){var n={value:o},l={value:function(){--s===0&&a()}};r.each(function(){var c=Ne(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}),s===0&&a()})}var Wb=0;function Ve(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function fd(){return++Wb}var He=fs.prototype;Ve.prototype={constructor:Ve,select:kb,selectAll:wb,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:gb,merge:pb,selection:Tb,transition:qb,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:xb,attr:QC,attrTween:ib,style:Fb,styleTween:Eb,text:Pb,textTween:Rb,remove:bb,tween:jC,delay:ob,duration:hb,ease:ub,easeVarying:fb,end:Nb,[Symbol.iterator]:He[Symbol.iterator]};function zb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Hb={time:null,delay:0,duration:250,ease:zb};function Yb(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 jb(e){var t,r;e instanceof Ve?(t=e._id,e=e._name):(t=fd(),(r=Hb).time=On(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var o=i[a],n=o.length,l,c=0;c<n;++c)(l=o[c])&&ba(l,e,t,c,o,r||Yb(l,t));return new Ve(i,this._parents,e,t)}fs.prototype.interrupt=zC;fs.prototype.transition=jb;const Uo=Math.PI,Go=2*Uo,fr=1e-6,Ub=Go-fr;function gd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Gb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return gd;const r=10**t;return function(i){this._+=i[0];for(let s=1,a=i.length;s<a;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class Xb{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?gd:Gb(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,o){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,n=this._y1,l=i-t,c=s-r,h=o-t,u=n-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>fr)if(!(Math.abs(u*l-c*h)>fr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-o,y=s-n,m=l*l+c*c,C=f*f+y*y,x=Math.sqrt(m),k=Math.sqrt(d),w=a*Math.tan((Uo-Math.acos((m+d-C)/(2*x*k)))/2),T=w/k,_=w/x;Math.abs(T-1)>fr&&this._append`L${t+T*h},${r+T*u}`,this._append`A${a},${a},0,0,${+(u*f>h*y)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,s,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,u=1^o,d=o?s-a:a-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>fr||Math.abs(this._y1-h)>fr)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%Go+Go),d>Ub?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>fr&&this._append`A${i},${i},0,${+(d>=Uo)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Dr(e){return function(){return e}}const J5=Math.abs,tM=Math.atan2,eM=Math.cos,rM=Math.max,iM=Math.min,sM=Math.sin,aM=Math.sqrt,xh=1e-12,In=Math.PI,Ch=In/2,oM=2*In;function nM(e){return e>1?0:e<-1?In:Math.acos(e)}function lM(e){return e>=1?Ch:e<=-1?-Ch:Math.asin(e)}function Vb(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 Xb(t)}function Zb(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 Kb(e){return e[0]}function Qb(e){return e[1]}function Jb(e,t){var r=Dr(!0),i=null,s=Vi,a=null,o=Vb(n);e=typeof e=="function"?e:e===void 0?Kb:Dr(e),t=typeof t=="function"?t:t===void 0?Qb:Dr(t);function n(l){var c,h=(l=Zb(l)).length,u,d=!1,f;for(i==null&&(a=s(f=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Dr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Dr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Dr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}class yd{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 md(e){return new yd(e,!0)}function xd(e){return new yd(e,!1)}function or(){}function ea(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 ka(e){this._context=e}ka.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:ea(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:ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xo(e){return new ka(e)}function Cd(e){this._context=e}Cd.prototype={areaStart:or,areaEnd:or,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:ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function t1(e){return new Cd(e)}function bd(e){this._context=e}bd.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:ea(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e1(e){return new bd(e)}function kd(e,t){this._basis=new ka(e),this._beta=t}kd.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const r1=function e(t){function r(i){return t===1?new ka(i):new kd(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function ra(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 Rn(e,t){this._context=e,this._k=(1-t)/6}Rn.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:ra(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:ra(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 wd=function e(t){function r(i){return new Rn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function qn(e,t){this._context=e,this._k=(1-t)/6}qn.prototype={areaStart:or,areaEnd:or,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:ra(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 i1=function e(t){function r(i){return new qn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.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:ra(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 s1=function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Wn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>xh){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,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>xh){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);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Sd(e,t){this._context=e,this._alpha=t}Sd.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:Wn(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 Td=function e(t){function r(i){return t?new Sd(i,t):new Rn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function _d(e,t){this._context=e,this._alpha=t}_d.prototype={areaStart:or,areaEnd:or,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:Wn(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 a1=function e(t){function r(i){return t?new _d(i,t):new qn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Bd(e,t){this._context=e,this._alpha=t}Bd.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:Wn(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 o1=function e(t){function r(i){return t?new Bd(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function vd(e){this._context=e}vd.prototype={areaStart:or,areaEnd:or,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 n1(e){return new vd(e)}function bh(e){return e<0?-1:1}function kh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(bh(a)+bh(o))*Math.min(Math.abs(a),Math.abs(o),.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,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function ia(e){this._context=e}ia.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=kh(this,e,t)),r);break;default:Ya(this,this._t0,r=kh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ld(e){this._context=new Fd(e)}(Ld.prototype=Object.create(ia.prototype)).point=function(e,t){ia.prototype.point.call(this,t,e)};function Fd(e){this._context=e}Fd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function Md(e){return new ia(e)}function Ad(e){return new Ld(e)}function Ed(e){this._context=e}Ed.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=Sh(e),s=Sh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(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 Sh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function $d(e){return new Ed(e)}function wa(e,t){this._context=e,this._t=t}wa.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 Od(e){return new wa(e,.5)}function Pd(e){return new wa(e,0)}function Dd(e){return new wa(e,1)}function qi(e,t,r){this.k=e,this.x=t,this.y=r}qi.prototype={constructor:qi,scale:function(e){return e===1?this:new qi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new qi(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+")"}};qi.prototype;var l1=g(e=>{var s;const{securityLevel:t}=Et();let r=Ft("body");if(t==="sandbox"){const o=((s=Ft(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Ft(o.body)}return r.select(`#${e}`)},"selectSvgElement"),h1=g(e=>{const{handDrawnSeed:t}=Et();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),c1=g(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),yi=g(e=>{const t=u1([...e.cssCompiledStyles||[],...e.cssStyles||[],...c1(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),u1=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Id=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),dt=g(e=>{const{stylesArray:t}=yi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Id(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),ot=g((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Et(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=yi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:d1(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),d1=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const f1=Object.freeze({left:0,top:0,width:16,height:16}),sa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Rd=Object.freeze({...f1,...sa}),g1=Object.freeze({...Rd,body:"",hidden:!1}),p1=Object.freeze({width:null,height:null}),y1=Object.freeze({...p1,...sa}),m1=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return ja(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return ja(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return ja(n,r)?n:null}return null},ja=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function x1(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 Th(e,t){const r=x1(e,t);for(const i in g1)i in sa?i in e&&!(i in r)&&(r[i]=sa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function C1(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function _h(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Th(i[n]||s[n],a)}return o(t),r.forEach(o),Th(e,a)}function b1(e,t){if(e.icons[t])return _h(e,t,[]);const r=C1(e,[t])[t];return r?_h(e,t,r):null}const k1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,w1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Bh(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(k1);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=w1.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function S1(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function T1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function _1(e,t,r){const i=S1(e);return T1(i.defs,t+i.content+r)}const B1=e=>e==="unset"||e==="undefined"||e==="none";function v1(e,t){const r={...Rd,...e},i={...y1,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const C=[],x=m.hFlip,k=m.vFlip;let w=m.rotate;x?k?w+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):k&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}w%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(a=_1(a,'<g transform="'+C.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Bh(u,l/c)):(h=o==="auto"?l:o,u=n===null?Bh(h,c/l):n==="auto"?c:n);const d={},f=(m,C)=>{B1(C)||(d[m]=C.toString())};f("width",h),f("height",u);const y=[s.left,s.top,l,c];return d.viewBox=y.join(" "),{attributes:d,viewBox:y,body:a}}const L1=/\sid="(\S+)"/g,vh=new Map;function F1(e){e=e.replace(/[0-9]+$/,"")||"a";const t=vh.get(e)||0;return vh.set(e,t+1),t?`${e}${t}`:e}function M1(e){const t=[];let r;for(;r=L1.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=F1(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function A1(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>"}var E1={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},Vo=new Map,qd=new Map,$1=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(I.debug("Registering icon pack:",t.name),"loader"in t)qd.set(t.name,t.loader);else if("icons"in t)Vo.set(t.name,t.icons);else throw I.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Nd=g(async(e,t)=>{const r=m1(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Vo.get(i);if(!s){const o=qd.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},Vo.set(i,s)}catch(n){throw I.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=b1(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),O1=g(async e=>{try{return await Nd(e),!0}catch{return!1}},"isIconAvailable"),ps=g(async(e,t,r)=>{let i;try{i=await Nd(e,t==null?void 0:t.fallbackPrefix)}catch(o){I.error(o),i=E1}const s=v1(i,t),a=A1(M1(s.body),{...s.attributes,...r});return pe(a,Yt())},"getIconSVG"),Wd={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.BLANK_URL=Vt.relativeFirstCharacters=Vt.whitespaceEscapeCharsRegex=Vt.urlSchemeRegex=Vt.ctrlCharactersRegex=Vt.htmlCtrlEntityRegex=Vt.htmlEntitiesRegex=Vt.invalidProtocolRegex=void 0;Vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Vt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Vt.urlSchemeRegex=/^.+(:|&colon;)/gim;Vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Vt.relativeFirstCharacters=[".","/"];Vt.BLANK_URL="about:blank";Object.defineProperty(Wd,"__esModule",{value:!0});var P1=Wd.sanitizeUrl=q1,ee=Vt;function D1(e){return ee.relativeFirstCharacters.indexOf(e[0])>-1}function I1(e){var t=e.replace(ee.ctrlCharactersRegex,"");return t.replace(ee.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function R1(e){return URL.canParse(e)}function Lh(e){try{return decodeURIComponent(e)}catch{return e}}function q1(e){if(!e)return ee.BLANK_URL;var t,r=Lh(e.trim());do r=I1(r).replace(ee.htmlCtrlEntityRegex,"").replace(ee.ctrlCharactersRegex,"").replace(ee.whitespaceEscapeCharsRegex,"").trim(),r=Lh(r),t=r.match(ee.ctrlCharactersRegex)||r.match(ee.htmlEntitiesRegex)||r.match(ee.htmlCtrlEntityRegex)||r.match(ee.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return ee.BLANK_URL;if(D1(i))return i;var s=i.trimStart(),a=s.match(ee.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(ee.invalidProtocolRegex.test(o))return ee.BLANK_URL;var n=s.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return n;if(o==="http:"||o==="https:"){if(!R1(n))return ee.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function Ua(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function N1(){}function zd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function zn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const W1="[object RegExp]",Hd="[object String]",Yd="[object Number]",jd="[object Boolean]",Ud="[object Arguments]",z1="[object Symbol]",H1="[object Date]",Y1="[object Map]",j1="[object Set]",U1="[object Array]",G1="[object ArrayBuffer]",X1="[object Object]",V1="[object DataView]",Z1="[object Uint8Array]",K1="[object Uint8ClampedArray]",Q1="[object Uint16Array]",J1="[object Uint32Array]",tk="[object Int8Array]",ek="[object Int16Array]",rk="[object Int32Array]",ik="[object Float32Array]",sk="[object Float64Array]",Fh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function Hn(e){return typeof Fh.Buffer<"u"&&Fh.Buffer.isBuffer(e)}function ak(e){return Number.isSafeInteger(e)&&e>=0}function Gd(e){return e!=null&&typeof e!="function"&&ak(e.length)}function ok(e){return e==="__proto__"}function Yn(e){return e==null||typeof e!="object"&&typeof e!="function"}function jn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nk(e,t){return Hr(e,void 0,e,new Map,t)}function Hr(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Yn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,Hr(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(Hr(n,void 0,r,i,s));return o}if(Hn(e))return e.subarray();if(jn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=Hr(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),be(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),be(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,be(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),be(o,e,r,i,s),o}if(typeof e=="object"&&lk(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),be(o,e,r,i,s),o}return e}function be(e,t,r=e,i,s){const a=[...Object.keys(t),...zd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Hr(t[n],n,r,i,s))}}function lk(e){switch(zn(e)){case Ud:case U1:case G1:case V1:case jd:case H1:case ik:case sk:case tk:case ek:case rk:case Y1:case Yd:case X1:case W1:case j1:case Hd:case z1:case Z1:case K1:case Q1:case J1:return!0;default:return!1}}function hk(e,t){return nk(e,(r,i,s,a)=>{if(typeof e=="object"){if(zn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),be(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Yd:case Hd:case jd:{const o=new e.constructor(e==null?void 0:e.valueOf());return be(o,e),o}case Ud:{const o={};return be(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Mh(e){return hk(e)}function Zo(e){return e!==null&&typeof e=="object"&&zn(e)==="[object Arguments]"}function Ko(e){return typeof e=="object"&&e!==null}function ck(e){return Ko(e)&&Gd(e)}function Rs(e){return jn(e)}function uk(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(ys.Cache||Map),r}ys.Cache=Map;function dk(e){if(Yn(e))return e;if(Array.isArray(e)||jn(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 fk(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=qs(s,o,i,new Map)}return s}function qs(e,t,r,i){if(Yn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return dk(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...zd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(ok(o))continue;let n=t[o],l=e[o];if(Zo(n)&&(n={...n}),Zo(l)&&(l={...l}),Hn(n)&&(n=Mh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let d=0;d<u.length;d++){const f=u[d];h[f]=l[f]}l=h}else if(ck(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||Ko(l)&&Ko(n)&&(Ua(l)||Ua(n)||Rs(l)||Rs(n))?e[o]=qs(l,n,r,i):l==null&&Ua(n)?e[o]=qs({},n,r,i):l==null&&Rs(n)?e[o]=Mh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function gk(e,...t){return fk(e,...t,N1)}function Ah(e){if(e==null)return!0;if(Gd(e))return typeof e.splice!="function"&&typeof e!="string"&&!Hn(e)&&!Rs(e)&&!Zo(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 uk(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var pk="​",yk={curveBasis:Xo,curveBasisClosed:t1,curveBasisOpen:e1,curveBumpX:md,curveBumpY:xd,curveBundle:r1,curveCardinalClosed:i1,curveCardinalOpen:s1,curveCardinal:wd,curveCatmullRomClosed:a1,curveCatmullRomOpen:o1,curveCatmullRom:Td,curveLinear:Vi,curveLinearClosed:n1,curveMonotoneX:Md,curveMonotoneY:Ad,curveNatural:$d,curveStep:Od,curveStepAfter:Dd,curveStepBefore:Pd},mk=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,xk=g(function(e,t){const r=Xd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);Ys(o),i=Zt(i,[...o])}else i=r.args;if(!i)return;let s=Tn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Xd=g(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${mk.source})(?=[}][%]{2}).*
127
127
  `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),I.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Xi.exec(e))!==null;)if(a.index===Xi.lastIndex&&Xi.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return I.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Ck=g(function(e){return e.replace(Xi,"")},"removeDirectives"),bk=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Un(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return yk[r]??t}g(Un,"interpolateToCurve");function Vd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?P1(r):r}g(Vd,"formatUrl");var kk=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){I.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function Gn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(Gn,"distance");function Zd(e){let t,r=0;e.forEach(s=>{r+=Gn(s,t),t=s});const i=r/2;return Xn(e,i)}g(Zd,"traverseEdge");function Kd(e){return e.length===1?e[0]:Zd(e)}g(Kd,"calcLabelPosition");var Eh=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Xn=g((e,t)=>{let r,i=t;for(const s of e){if(r){const a=Gn(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Eh((1-o)*r.x+o*s.x,5),y:Eh((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),wk=g((e,t,r)=>{I.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Xn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Qd(e,t,r){const i=structuredClone(r);I.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Xn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}g(Qd,"calcTerminalLabelPosition");function Jd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(Jd,"getStylesFromArray");var $h=0,Sk=g(()=>($h++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$h),"generateId");function tf(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(tf,"makeRandomHex");var Tk=g(e=>tf(e.length),"random"),_k=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Bk=g(function(e,t){const r=t.text.replace(ds.lineBreakRegex," "),[,i]=Sa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),vk=ys((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ds.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=Ze(`${o} `,r),c=Ze(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=Lk(o,t,"-",r);s.push(a,...d),a=f}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Lk=ys((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(Ze(c,i)>=t){const u=l+1,d=s.length===u,f=`${c}${r}`;a.push(d?c:f),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ef(e,t){return Vn(e,t).height}g(ef,"calculateTextHeight");function Ze(e,t){return Vn(e,t).width}g(Ze,"calculateTextWidth");var Vn=ys((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Sa(r),o=["sans-serif",i],n=e.split(ds.lineBreakRegex),l=[],c=Ft("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of o){let f=0;const y={width:0,height:0,lineHeight:0};for(const m of n){const C=_k();C.text=m||pk;const x=Bk(h,C).style("font-size",a).style("font-weight",s).style("font-family",d),k=(x._groups||x)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,k.width)),f=Math.round(k.height),y.height+=f,y.lineHeight=Math.round(Math.max(y.lineHeight,f))}l.push(y)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ni,Fk=(ni=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(ni,"InitIDGenerator"),ni),ws,Mk=g(function(e){return ws=ws||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ws.innerHTML=e,unescape(ws.textContent)},"entityDecode");function Zn(e){return"str"in e}g(Zn,"isDetailedError");var Ak=g((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Sa=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Kn(e,t){return gk({},e,t)}g(Kn,"cleanAndMerge");var ie={assignWithDepth:Zt,wrapLabel:vk,calculateTextHeight:ef,calculateTextWidth:Ze,calculateTextDimensions:Vn,cleanAndMerge:Kn,detectInit:xk,detectDirective:Xd,isSubstringInArray:bk,interpolateToCurve:Un,calcLabelPosition:Kd,calcCardinalityPosition:wk,calcTerminalLabelPosition:Qd,formatUrl:Vd,getStylesFromArray:Jd,generateId:Sk,random:Tk,runFunc:kk,entityDecode:Mk,insertTitle:Ak,isLabelCoordinateInPath:rf,parseFontSize:Sa,InitIDGenerator:Fk},Ek=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),nr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),hM=g((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Xt(e){return e??null}g(Xt,"handleUndefinedAttr");function rf(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(rf,"isLabelCoordinateInPath");var sf={exports:{}};(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var d=u?h.bind(u):h;return this.reads.push(d),a(this),d},mutate:function(h,u){var d=u?h.bind(u):h;return this.writes.push(d),a(this),d},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function a(h){h.scheduled||(h.scheduled=!0,h.raf(o.bind(null,h)))}function o(h){var u=h.writes,d=h.reads,f;try{r("flushing reads",d.length),h.runTasks(d),r("flushing writes",u.length),h.runTasks(u)}catch(y){f=y}if(h.scheduled=!1,(d.length||u.length)&&a(h),f)if(r("task errored",f.message),h.catch)h.catch(f);else throw f}function n(h,u){var d=h.indexOf(u);return!!~d&&!!h.splice(d,1)}function l(h,u){for(var d in u)u.hasOwnProperty(d)&&(h[d]=u[d])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof Eo<"u"?Eo:globalThis)})(sf);var $k=sf.exports;const Ok=wn($k);var af={exports:{}};(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,a=s.get(i);this.fastdom.clear(a),s.delete(i)}};function r(i,s,a,o){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(u,d){c=l[s](function(){n.delete(h);try{u(o?a.call(o):a())}catch(f){d(f)}},o)});return n.set(h,c),h}e.exports=t})()})(af);var Pk=af.exports;const Dk=wn(Pk);function Qn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=Qn();function of(e){Lr=e}var Zi={exec:()=>null};function It(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(oe.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var Ik=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),oe={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")},Rk=/^(?:[ \t]*(?:\n|$))+/,qk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ms=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jn=/(?:[*+-]|\d{1,9}[.)])/,nf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lf=It(nf).replace(/bull/g,Jn).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(),zk=It(nf).replace(/bull/g,Jn).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(),tl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hk=/^[^\n]+/,el=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yk=It(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",el).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jk=It(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jn).getRegex(),Ta="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",rl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Uk=It("^ {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",rl).replace("tag",Ta).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),hf=It(tl).replace("hr",ms).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",Ta).getRegex(),Gk=It(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",hf).getRegex(),il={blockquote:Gk,code:qk,def:Yk,fences:Nk,heading:Wk,hr:ms,html:Uk,lheading:lf,list:jk,newline:Rk,paragraph:hf,table:Zi,text:Hk},Oh=It("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ms).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",Ta).getRegex(),Xk={...il,lheading:zk,table:Oh,paragraph:It(tl).replace("hr",ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Oh).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",Ta).getRegex()},Vk={...il,html:It(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rl).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:It(tl).replace("hr",ms).replace("heading",` *#{1,6} *[^
128
128
  ]`).replace("lheading",lf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cf=/^( {2,}|\\)\n(?!\s*$)/,Qk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_a=/[\p{P}\p{S}]/u,sl=/[\s\p{P}\p{S}]/u,uf=/[^\s\p{P}\p{S}]/u,Jk=It(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sl).getRegex(),df=/(?!~)[\p{P}\p{S}]/u,t2=/(?!~)[\s\p{P}\p{S}]/u,e2=/(?:[^\s\p{P}\p{S}]|~)/u,r2=It(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ik?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ff=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,i2=It(ff,"u").replace(/punct/g,_a).getRegex(),s2=It(ff,"u").replace(/punct/g,df).getRegex(),gf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",a2=It(gf,"gu").replace(/notPunctSpace/g,uf).replace(/punctSpace/g,sl).replace(/punct/g,_a).getRegex(),o2=It(gf,"gu").replace(/notPunctSpace/g,e2).replace(/punctSpace/g,t2).replace(/punct/g,df).getRegex(),n2=It("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uf).replace(/punctSpace/g,sl).replace(/punct/g,_a).getRegex(),l2=It(/\\(punct)/,"gu").replace(/punct/g,_a).getRegex(),h2=It(/^<(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(),c2=It(rl).replace("(?:-->|$)","-->").getRegex(),u2=It("^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",c2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,d2=It(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",aa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pf=It(/^!?\[(label)\]\[(ref)\]/).replace("label",aa).replace("ref",el).getRegex(),yf=It(/^!?\[(ref)\](?:\[\])?/).replace("ref",el).getRegex(),f2=It("reflink|nolink(?!\\()","g").replace("reflink",pf).replace("nolink",yf).getRegex(),Ph=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,al={_backpedal:Zi,anyPunctuation:l2,autolink:h2,blockSkip:r2,br:cf,code:Kk,del:Zi,emStrongLDelim:i2,emStrongRDelimAst:a2,emStrongRDelimUnd:n2,escape:Zk,link:d2,nolink:yf,punctuation:Jk,reflink:pf,reflinkSearch:f2,tag:u2,text:Qk,url:Zi},g2={...al,link:It(/^!?\[(label)\]\((.*?)\)/).replace("label",aa).getRegex(),reflink:It(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aa).getRegex()},Qo={...al,emStrongRDelimAst:o2,emStrongLDelim:s2,url:It(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ph).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:It(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ph).getRegex()},p2={...Qo,br:It(cf).replace("{2,}","*").getRegex(),text:It(Qo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ss={normal:il,gfm:Xk,pedantic:Vk},Fi={normal:al,gfm:Qo,breaks:p2,pedantic:g2},y2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Dh=e=>y2[e];function Fe(e,t){if(t){if(oe.escapeTest.test(e))return e.replace(oe.escapeReplace,Dh)}else if(oe.escapeTestNoEncode.test(e))return e.replace(oe.escapeReplaceNoEncode,Dh);return e}function Ih(e){try{e=encodeURI(e).replace(oe.percentDecode,"%")}catch{return null}return e}function Rh(e,t){var a;let r=e.replace(oe.findPipe,(o,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(oe.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(oe.slashPipe,"|");return i}function Mi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function m2(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function qh(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function x2(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
129
129
  `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
@@ -143,11 +143,11 @@ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
143
143
  `);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
144
144
  `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),f=t.split(`
145
145
  `,1)[0],y=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):y?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=d.slice(m),m+=r[1].length),y&&this.rules.other.blankLine.test(f)&&(h+=f+`
146
- `,t=t.substring(f.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),T=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),L=this.rules.other.htmlBeginRegex(m);for(;t;){let F=t.split(`
147
- `,1)[0],v;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),v=f):v=f.replace(this.rules.other.tabCharGlobal," "),T.test(f)||_.test(f)||L.test(f)||k.test(f)||w.test(f))break;if(v.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
148
- `+v.slice(m);else{if(y||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||_.test(d)||w.test(d))break;u+=`
146
+ `,t=t.substring(f.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(m),w=this.rules.other.hrRegex(m),T=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),v=this.rules.other.htmlBeginRegex(m);for(;t;){let F=t.split(`
147
+ `,1)[0],L;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),L=f):L=f.replace(this.rules.other.tabCharGlobal," "),T.test(f)||_.test(f)||v.test(f)||k.test(f)||w.test(f))break;if(L.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
148
+ `+L.slice(m);else{if(y||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||_.test(d)||w.test(d))break;u+=`
149
149
  `+f}!y&&!f.trim()&&(y=!0),h+=F+`
150
- `,t=t.substring(F.length+1),d=v.slice(m)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Rh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
150
+ `,t=t.substring(F.length+1),d=L.slice(m)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let C=null,x;this.options.gfm&&(C=this.rules.other.listIsTask.exec(u),C&&(x=C[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!C,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Rh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
151
151
  `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Rh(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}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)===`
152
152
  `?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 o=Mi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=m2(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),qh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return qh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,d=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let y=d.slice(1,-1);return{type:"em",raw:d,text:y,tokens:this.lexer.inlineTokens(y)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ke=class Jo{constructor(t){Nt(this,"tokens");Nt(this,"options");Nt(this,"state");Nt(this,"tokenizer");Nt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Lr,this.options.tokenizer=this.options.tokenizer||new oa,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:oe,block:Ss.normal,inline:Fi.normal};this.options.pedantic?(r.block=Ss.pedantic,r.inline=Fi.pedantic):this.options.gfm&&(r.block=Ss.gfm,this.options.breaks?r.inline=Fi.breaks:r.inline=Fi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ss,inline:Fi}}static lex(t,r){return new Jo(r).lex(t)}static lexInline(t,r){return new Jo(r).inlineTokens(t)}lex(t){t=t.replace(oe.carriageReturn,`
153
153
  `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(oe.tabCharGlobal," ").replace(oe.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
@@ -195,16 +195,16 @@ ${a.join(`
195
195
  `);return mf(i)}g(xf,"preprocessMarkdown");function Cf(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}g(Cf,"nonMarkdownToLines");function bf(e,t={}){const r=xf(e,t),i=Rt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
196
196
  `).forEach((h,u)=>{u!==0&&(a++,s.push([])),h.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&s[a].push({content:d,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return g(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}g(bf,"markdownToLines");function kf(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(kf,"nonMarkdownToHTML");function wf(e,{markdownAutoWrap:t}={}){const r=Rt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(I.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(wf,"markdownToHTML");function Sf(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(Sf,"splitTextToChars");function Tf(e,t){const r=Sf(t.content);return nl(e,[],r,t.type)}g(Tf,"splitWordToFitWidth");function nl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?nl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(nl,"splitWordToFitWidthRecursion");function _f(e,t){if(e.some(({content:r})=>r.includes(`
197
197
  `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return la(e,t)}g(_f,"splitLineToFitWidth");function la(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return la(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Tf(t,a);r.push([n]),l.content&&e.unshift(l)}return la(e,t,r)}g(la,"splitLineToFitWidthRecursion");function rn(e,t){t&&e.attr("style",t)}g(rn,"applyStyle");var Nh=16384;async function Bf(e,t,r,i,s=!1,a=Yt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Nh)}px`),o.attr("height",`${Math.min(10*r,Nh)}px`);const n=o.append("xhtml:div"),l=Ji(t.label)?await qu(t.label.replace(ds.lineBreakRegex,`
198
- `),a):pe(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),rn(h,t.labelStyle),h.attr("class",`${c} ${i}`),rn(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"),s&&n.attr("class","labelBkg"),(await Tr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),o.node()}g(Bf,"addHtmlSpan");function Ba(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(Ba,"createTspan");function vf(e,t,r){const i=e.append("text"),s=Ba(i,1,t);va(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}g(vf,"computeWidthOfText");function T2(e,t,r){var o;const i=e.append("text"),s=Ba(i,1,t);va(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(T2,"computeDimensionOfText");function Lf(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=g(f=>vf(o,1.1,f)<=e,"checkWidth"),d=u(h)?[h]:_f(h,u);for(const f of d){const y=Ba(l,c,1.1,s);va(y,f),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}g(Lf,"createFormattedText");function sn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(sn,"decodeHTMLEntities");function va(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(sn(r.content)):s.text(" "+sn(r.content))})}g(va,"updateTextContentAndStyles");async function Ff(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await O1(n)?await ps(n,void 0,{class:"label-icon"}):`<i class='${pe(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(Ff,"replaceIconSubstring");var ve=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(I.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?wf(t,h):kf(t),d=await Ff(nr(u),h),f=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Ji(t)?f:d,labelStyle:r.replace("fill:","color:")};return await Bf(e,y,l,s,c,h)}else{const u=nr(t.replace(/<br\s*\/?>/g,"<br/>")),d=o?bf(u.replace("<br>","<br/>"),h):Cf(u),f=Lf(l,e,d,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ft(f).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ft(f).select("rect").attr("style",y.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ft(f).select("text").attr("style",m)}return i?Ft(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Ft(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function Xa(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function _2(e,t){return e[0]===t[0]&&e[1]===t[1]}function B2(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)Xa(c,n,s);const l=function(c,h,u){const d=[];for(const k of c){const w=[...k];_2(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const y=[];for(const k of d)for(let w=0;w<k.length-1;w++){const T=k[w],_=k[w+1];if(T[1]!==_[1]){const L=Math.min(T[1],_[1]);y.push({ymin:L,ymax:Math.max(T[1],_[1]),x:L===T[1]?T[0]:_[0],islope:(_[0]-T[0])/(_[1]-T[1])})}}if(y.sort((k,w)=>k.ymin<w.ymin?-1:k.ymin>w.ymin?1:k.x<w.x?-1:k.x>w.x?1:k.ymax===w.ymax?0:(k.ymax-w.ymax)/Math.abs(k.ymax-w.ymax)),!y.length)return f;let m=[],C=y[0].ymin,x=0;for(;m.length||y.length;){if(y.length){let k=-1;for(let w=0;w<y.length&&!(y[w].ymin>C);w++)k=w;y.splice(0,k+1).forEach(w=>{m.push({s:C,edge:w})})}if(m=m.filter(k=>!(k.edge.ymax<=C)),m.sort((k,w)=>k.edge.x===w.edge.x?0:(k.edge.x-w.edge.x)/Math.abs(k.edge.x-w.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let k=0;k<m.length;k+=2){const w=k+1;if(w>=m.length)break;const T=m[k].edge,_=m[w].edge;f.push([[Math.round(T.x),C],[Math.round(_.x),C]])}C+=u,m.forEach(k=>{k.edge.x=k.edge.x+u*k.edge.islope}),x++}return f}(o,a,i);if(s){for(const c of o)Xa(c,n,-s);(function(c,h,u){const d=[];c.forEach(f=>d.push(...f)),Xa(d,h,u)})(l,n,-s)}return l}function xs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),B2(e,s,i,a||1)}class ll{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=xs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function La(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 v2 extends ll{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=xs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)La([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class L2 extends ll{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class F2{constructor(t){this.helper=t}fillPolygons(t,r){const i=xs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=La(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,d=(n[0][0]+n[1][0])/2-s/4,f=Math.min(n[0][1],n[1][1]);for(let y=0;y<h;y++){const m=f+u+y*s,C=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,k=this.helper.ellipse(C,x,a,a,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class M2{constructor(t){this.helper=t}fillPolygons(t,r){const i=xs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=La(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const y=f*(i+s),m=y+i,C=[h[0]+y*Math.cos(d)+c*Math.cos(d),h[1]+y*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}}),a}}class A2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=xs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=La(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const d=2*u*r,f=2*(u+1)*r,y=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+y*Math.cos(h+Math.PI/4),m[1]+y*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}}),s}}const ne={};class E2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const $2=0,Va=1,Wh=2,Ts={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 Za(e,t){return e.type===t}function hl(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:$2,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Va,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Wh,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!Za(a,Wh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return hl("M0,0"+e);s++,o=Ts[a.text],i=a.text}else Za(a,Va)?o=Ts[i]:(s++,o=Ts[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!Za(c,Va))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Ts[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Mf(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.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);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.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);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.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);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Af(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=s+(s-l)):(u=i,d=s),t.push({key:"C",data:[u,d,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,d]=h;let f=0,y=0;r==="Q"||r==="T"?(f=i+(i-n),y=s+(s-l)):(f=i,y=s);const m=i+2*(f-i)/3,C=s+2*(y-s)/3,x=u+2*(f-u)/3,k=d+2*(y-d)/3;t.push({key:"C",data:[m,C,x,k,u,d]}),n=f,l=y,i=u,s=d;break}case"Q":{const[u,d,f,y]=h,m=i+2*(u-i)/3,C=s+2*(d-s)/3,x=f+2*(u-f)/3,k=y+2*(d-y)/3;t.push({key:"C",data:[m,C,x,k,f,y]}),n=u,l=d,i=f,s=y;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],y=h[3],m=h[4],C=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(Ef(i,s,C,x,u,d,f,y,m).forEach(function(k){t.push({key:"C",data:k})}),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Ai(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Ef(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],f=0,y=0,m=0,C=0;if(c)[f,y,m,C]=c;else{[e,t]=Ai(e,t,-h),[r,i]=Ai(r,i,-h);const Y=(e-r)/2,A=(t-i)/2;let E=Y*Y/(s*s)+A*A/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const B=s*s,P=a*a,$=B*P-B*A*A-P*Y*Y,N=B*A*A+P*Y*Y,V=(n===l?-1:1)*Math.sqrt(Math.abs($/N));m=V*s*A/a+(e+r)/2,C=V*-a*Y/s+(t+i)/2,f=Math.asin(parseFloat(((t-C)/a).toFixed(9))),y=Math.asin(parseFloat(((i-C)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(y=Math.PI-y),f<0&&(f=2*Math.PI+f),y<0&&(y=2*Math.PI+y),l&&f>y&&(f-=2*Math.PI),!l&&y>f&&(y-=2*Math.PI)}let x=y-f;if(Math.abs(x)>120*Math.PI/180){const Y=y,A=r,E=i;y=l&&y>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Ef(r=m+s*Math.cos(y),i=C+a*Math.sin(y),A,E,s,a,o,0,l,[y,Y,m,C])}x=y-f;const k=Math.cos(f),w=Math.sin(f),T=Math.cos(y),_=Math.sin(y),L=Math.tan(x/4),F=4/3*s*L,v=4/3*a*L,U=[e,t],W=[e+F*w,t-v*k],q=[r+F*_,i-v*T],rt=[r,i];if(W[0]=2*U[0]-W[0],W[1]=2*U[1]-W[1],c)return[W,q,rt].concat(d);{d=[W,q,rt].concat(d);const Y=[];for(let A=0;A<d.length;A+=3){const E=Ai(d[A][0],d[A][1],h),B=Ai(d[A+1][0],d[A+1][1],h),P=Ai(d[A+2][0],d[A+2][1],h);Y.push([E[0],E[1],B[0],B[1],P[0],P[1]])}return Y}}const O2={randOffset:function(e,t){return St(e,t)},randOffsetWithRange:function(e,t,r){return ha(e,t,r)},ellipse:function(e,t,r,i,s){const a=Of(r,i,s);return an(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return lr(e,t,r,i,s,!0)}};function $f(e,t,r,i,s){return{type:"path",ops:lr(e,t,r,i,s)}}function Ns(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...lr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?$f(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function P2(e,t,r,i,s){return function(a,o){return Ns(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function zh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=_s(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:_s(r[0],1.5*(1+.22*t.roughness),jh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=_s(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:_s(o,1.5*(1+.22*t.roughness),jh(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Of(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=St(o*l,r),n+=St(n*l,r),{increment:a,rx:o,ry:n}}function an(e,t,r,i){const[s,a]=Uh(i.increment,e,t,i.rx,i.ry,1,i.increment*ha(.1,ha(.4,1,r),r),r);let o=ca(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Uh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ca(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Hh(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=St(.01*u,l),d+=St(.01*d,l);let f=s,y=a;for(;f<0;)f+=2*Math.PI,y+=2*Math.PI;y-f>2*Math.PI&&(f=0,y=2*Math.PI);const m=2*Math.PI/l.curveStepCount,C=Math.min(m/2,(y-f)/2),x=Gh(C,c,h,u,d,f,y,1,l);if(!l.disableMultiStroke){const k=Gh(C,c,h,u,d,f,y,1.5,l);x.push(...k)}return o&&(n?x.push(...lr(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...lr(c,h,c+u*Math.cos(y),h+d*Math.sin(y),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function Yh(e,t){const r=Af(Mf(hl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...lr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,d,f]=n;i.push(...D2(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...lr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Ka(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+St(s,t),i[0][1]+St(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+St(s,t),i[o][1]+St(s,t)]})}}return{type:"fillPath",ops:r}}function Rr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!ne[s])switch(s){case"zigzag":ne[s]||(ne[s]=new v2(i));break;case"cross-hatch":ne[s]||(ne[s]=new L2(i));break;case"dots":ne[s]||(ne[s]=new F2(i));break;case"dashed":ne[s]||(ne[s]=new M2(i));break;case"zigzag-line":ne[s]||(ne[s]=new A2(i));break;default:s="hachure",ne[s]||(ne[s]=new ll(i))}return ne[s]}(t,O2).fillPolygons(e,t)}function jh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Pf(e){return e.randomizer||(e.randomizer=new E2(e.seed||0)),e.randomizer.next()}function ha(e,t,r,i=1){return r.roughness*i*(Pf(r)*(t-e)+e)}function St(e,t,r=1){return ha(-e,e,t,r)}function lr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=on(e,t,r,i,s,!0,!1);if(o)return n;const l=on(e,t,r,i,s,!0,!0);return n.concat(l)}function on(e,t,r,i,s,a,o){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=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,d=.2+.2*Pf(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=St(f,s,c),y=St(y,s,c);const m=[],C=()=>St(u,s,c),x=()=>St(h,s,c),k=s.preserveVertices;return o?m.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):m.push({op:"move",data:[e+(k?0:St(h,s,c)),t+(k?0:St(h,s,c))]}),o?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),y+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),y+t+2*(i-t)*d+C(),r+(k?0:C()),i+(k?0:C())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),y+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),y+t+2*(i-t)*d+x(),r+(k?0:x()),i+(k?0:x())]}),m}function _s(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+St(t,r),e[0][1]+St(t,r)]),i.push([e[0][0]+St(t,r),e[0][1]+St(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+St(t,r),e[s][1]+St(t,r)]),s===e.length-1&&i.push([e[s][0]+St(t,r),e[s][1]+St(t,r)]);return ca(i,null,r)}function ca(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...on(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Uh(e,t,r,i,s,a,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=St(.5,n)-Math.PI/2;c.push([St(a,n)+t+.9*i*Math.cos(h-e),St(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[St(a,n)+t+i*Math.cos(d),St(a,n)+r+s*Math.sin(d)];l.push(f),c.push(f)}c.push([St(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),St(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([St(a,n)+t+.98*i*Math.cos(h+o),St(a,n)+r+.98*s*Math.sin(h+o)]),c.push([St(a,n)+t+.9*i*Math.cos(h+.5*o),St(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function Gh(e,t,r,i,s,a,o,n,l){const c=a+St(.1,l),h=[];h.push([St(n,l)+t+.9*i*Math.cos(c-e),St(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([St(n,l)+t+i*Math.cos(u),St(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),ca(h,null,l)}function D2(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:St(c[0],n)),o[1]+(d?0:St(c[0],n))]}),h=d?[s,a]:[s+St(c[f],n),a+St(c[f],n)],l.push({op:"bcurveTo",data:[e+St(c[f],n),t+St(c[f],n),r+St(c[f],n),i+St(c[f],n),h[0],h[1]]});return l}function Ei(e){return[...e]}function Xh(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(Ei(e[0]),Ei(e[1]),Ei(e[2]),Ei(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Ei(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Ws(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function I2(e,t,r){const i=Ws(t,r);if(i===0)return Ws(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Ws(e,gr(t,r,s))}function gr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function nn(e,t,r,i){const s=i||[];if(function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],d=n[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let y=3*h[1]-2*c[1]-d[1];y*=y;let m=3*u[0]-2*d[0]-c[0];m*=m;let C=3*u[1]-2*d[1]-c[1];return C*=C,f<m&&(f=m),y<C&&(y=C),f+y}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Ws(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=gr(l,c,.5),f=gr(c,h,.5),y=gr(h,u,.5),m=gr(d,f,.5),C=gr(f,y,.5),x=gr(m,C,.5);nn([l,d,m,x],0,r,s),nn([x,C,y,u],0,r,s)}var a,o;return s}function R2(e,t){return ua(e,0,e.length,t)}function ua(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=I2(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ua(e,t,c+1,i,a),ua(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Qa(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)nn(e,3*a,t,i);return r&&r>0?ua(i,0,i.length,r):i}const ue="none";class da{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[$f(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=P2(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Ka([c],o)):n.push(Rr([c],o))}return o.stroke!==ue&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Of(i,s,o),c=an(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=an(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Rr([c.estimatedPoints],o));return o.stroke!==ue&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ns(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=Hh(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Hh(t,r,i,s,a,o,!0,!1,d);f.type="fillPath",h.push(f)}else h.push(function(d,f,y,m,C,x,k){const w=d,T=f;let _=Math.abs(y/2),L=Math.abs(m/2);_+=St(.01*_,k),L+=St(.01*L,k);let F=C,v=x;for(;F<0;)F+=2*Math.PI,v+=2*Math.PI;v-F>2*Math.PI&&(F=0,v=2*Math.PI);const U=(v-F)/k.curveStepCount,W=[];for(let q=F;q<=v;q+=U)W.push([w+_*Math.cos(q),T+L*Math.sin(q)]);return W.push([w+_*Math.cos(v),T+L*Math.sin(v)]),W.push([w,T]),Rr([W],k)}(t,r,i,s,a,o,c));return c.stroke!==ue&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=zh(t,i);if(i.fill&&i.fill!==ue)if(i.fillStyle==="solid"){const o=zh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Qa(Xh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Qa(Xh(c),10,(1+i.roughness)/2))}o.length&&s.push(Rr([o],i))}return i.stroke!==ue&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ns(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Ka([t],i)):s.push(Rr([t],i))),i.stroke!==ue&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ue,o=i.stroke!==ue,n=!!(i.simplification&&i.simplification<1),l=function(h,u,d){const f=Af(Mf(hl(h))),y=[];let m=[],C=[0,0],x=[];const k=()=>{x.length>=4&&m.push(...Qa(x,u)),x=[]},w=()=>{k(),m.length&&(y.push(m),m=[])};for(const{key:_,data:L}of f)switch(_){case"M":w(),C=[L[0],L[1]],m.push(C);break;case"L":k(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const F=m.length?m[m.length-1]:C;x.push([F[0],F[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":k(),m.push([C[0],C[1]])}if(w(),!d)return y;const T=[];for(const _ of y){const L=R2(_,d);L.length&&T.push(L)}return T}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Yh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Yh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Ka(l,i));else s.push(Rr(l,i));return o&&(n?l.forEach(h=>{s.push(Ns(h,!1,i))}):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ue};break;case"fillPath":o={d:this.opsToPath(a),stroke:ue,strokeWidth:0,fill:i.fill||ue};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ue,strokeWidth:i,fill:ue}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class q2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 Bs="http://www.w3.org/2000/svg";class N2{constructor(t,r){this.svg=t,this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Bs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Bs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Bs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Bs,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 nt={canvas:(e,t)=>new q2(e,t),svg:(e,t)=>new N2(e,t),generator:e=>new da(e),newSeed:()=>da.newSeed()},W2=1,z2=3;async function cl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ul(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const o=Et().fontSize?Et().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=vu.fontSize]=Sa(o),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}g(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}g(cl,"configureLabelImages");function ul(e){var r;return e.nodeType===z2?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==W2||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ul)}g(ul,"hasTextBesidesImages");var Vh=3,H2=32,Y2=g(async(e,t,r)=>{var C,x;const i=Et(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Xt(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(k=>({text:k,cssClass:"c4-descr"}))].filter(k=>k.text),l=t.width?Math.max(t.width-2*(t.padding??0),H2):((x=Et().flowchart)==null?void 0:x.wrappingWidth)??200,c=i.wrap?l:Number.POSITIVE_INFINITY,h=await Promise.all(n.map(async k=>{const w=a.append("g").attr("class",k.cssClass),T=await ve(w,pe(nr(k.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},i);return Ft(T).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Ft(T).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:w,box:w.node().getBBox()}})),u=Math.max(...h.map(({box:k})=>k.width),0);let d=0;for(const{el:k,box:w}of h)k.attr("transform",`translate(${u/2-w.x-w.width/2}, ${d-w.y})`),d+=w.height+Vh;const f=h.length>0?d-Vh:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-u/2}, ${-f/2})`);const y=a.node().getBBox(),m=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:m,label:a}},"c4LabelHelper"),mt=g(async(e,t,r)=>{var f,y;if(t.stereotype!==void 0)return Y2(e,t,r);let i;const s=t.useHtmlLabels||qe((f=Et())==null?void 0:f.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Xt(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 ve(o,pe(nr(n),Et()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((y=Et().flowchart)==null?void 0:y.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Et()),u=((t==null?void 0:t.padding)??0)/2;let d;if(s){const m=h.children[0],C=Ft(h);await cl(m),d=await Tr.measure(()=>m.getBoundingClientRect()),C.attr("width",d.width),C.attr("height",d.height)}else d=await Tr.measure(()=>h.getBBox());return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:u,label:o}},"labelHelper"),Ja=g(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??se(Et()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ve(s,pe(nr(t),Et()),{useHtmlLabels:i,width:r.width||((c=(l=Et())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2;let n;if(se(Et())){const h=a.children[0],u=Ft(a);n=await Tr.measure(()=>h.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await Tr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),ct=g((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),xt=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Dt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(Dt,"createPathFromPoints");function hr(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const y=f/50,m=e+y*l,C=d+s*Math.sin(u*(m-e));o.push({x:m,y:C})}return o}g(hr,"generateFullSineWavePoints");function $e(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:-f,y:-y})}return o}g($e,"generateCirclePoints");function ln(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=g((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"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}g(ln,"mergePaths");var j2=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),Fr=j2,me=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),U2=g(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=Et(),n=se(o);return await ve(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ir=U2;function Df(e,t){return e.intersect(t)}g(Df,"intersectNode");var G2=Df;function If(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}g(If,"intersectEllipse");var Rf=If;function qf(e,t,r){return Rf(e,t,t,r)}g(qf,"intersectCircle");var X2=qf;function Nf(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&hn(n,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,y=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(y)<c&&hn(f,y))return;const m=s*u-h*a;if(m===0)return;const C=Math.abs(m/2);let x=a*d-u*o;const k=x<0?(x-C)/m:(x+C)/m;x=h*o-s*d;const w=x<0?(x-C)/m:(x+C)/m;return{x:k,y:w}}}g(Nf,"intersectLine");function hn(e,t){return e*t>0}g(hn,"sameSign");var V2=Nf;function Wf(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=V2(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,y=Math.sqrt(d*d+f*f),m=u.x-r.x,C=u.y-r.y,x=Math.sqrt(m*m+C*C);return y<x?-1:y===x?0:1}),a[0]):e}g(Wf,"intersectPolygon");var Z2=Wf,st={node:G2,circle:X2,ellipse:Rf,polygon:Z2,rect:Fr};function zf(e,t){const{labelStyles:r}=dt(t);t.labelStyle=r;const i=xt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=nt.svg(a),c=ot(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Xt(n)),ct(t,u),t.intersect=function(d){return I.info("Circle intersect",t,o,d),st.circle(t,o,d)},a}g(zf,"anchor");function cn(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/s,y=d/a,m=Math.sqrt(f**2+y**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-m**2),x=l+C*a*Math.sin(h)*(o?-1:1),k=c-C*s*Math.cos(h)*(o?-1:1),w=Math.atan2((t-k)/a,(e-x)/s);let _=Math.atan2((i-k)/a,(r-x)/s)-w;o&&_<0&&(_+=2*Math.PI),!o&&_>0&&(_-=2*Math.PI);const L=[];for(let F=0;F<20;F++){const v=F/19,U=w+v*_,W=x+s*Math.cos(U),q=k+a*Math.sin(U);L.push({x:W,y:q})}return L}g(cn,"generateArcPoints");function Hf(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Hf,"calculateArcSagitta");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=g(U=>U+o,"calcTotalHeight"),l=g(U=>{const W=U/2;return[W/(2.5+U/50),W]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await mt(e,t,xt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[d,f]=l(u),y=Hf(u,d,f),C=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+y-y,x=u,{cssStyles:k}=t,w=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...cn(-C/2,-x/2,-C/2,x/2,d,f,!1),{x:C/2,y:x/2},...cn(C/2,x/2,C/2,-x/2,d,f,!0)],T=nt.svg(c),_=ot(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=Dt(w),F=T.path(L,_),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${d/2}, 0)`),ct(t,v),t.intersect=function(U){return st.polygon(t,w,U)},c}g(Yf,"bowTieRect");async function jf(e,t,{config:{themeVariables:r}}){var F;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await mt(e,t,xt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(o.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),d=Math.max(o.height+c*2+u,t.height??0),f=-d/2+u,y=d/2,m=h*.72,C=[`M${-h/2},${f}`,`L${-m/2},${y}`,`A${m/2},${u} 0 0 0 ${m/2},${y}`,`L${h/2},${f}`,`A${h/2},${u} 0 0 0 ${-h/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,k=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const U=nt.svg(a).path(C,ot(t,{}));(F=k.node())==null||F.appendChild(U),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),ct(t,k);const w=f+(y-f)/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${w-o.height/2-(o.y-(o.top??0))})`);const T=12,_=g((v,U,W)=>Array.from({length:T+1},(q,rt)=>{const Y=Math.PI-rt*Math.PI/T;return{x:v*Math.cos(Y),y:U+W*u*Math.sin(Y)}}),"arc"),L=[..._(h/2,f,-1),..._(m/2,y,1).reverse()];return t.intersect=function(v){return st.polygon(t,L,v)},a}g(jf,"bucket");var Zh=20,Kh=8,K2=80,to=8;async function Uf(e,t){const{themeVariables:r}=Et(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:a}=dt(t),{shapeSvg:o,bbox:n}=await mt(e,t,xt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,K2,(t==null?void 0:t.width)??0),u=Math.max(c+Kh+Zh+l*2,(t==null?void 0:t.height)??0),d=-h/2,f=-u/2,y=-28/2,m=o.select(".label");m&&(t.useHtmlLabels??se(Et())?m.attr("transform",`translate(${-n.width/2}, ${-n.height/2+y})`):m.attr("transform",`translate(0, ${-n.height/2+y})`));let C;if(t.look==="handDrawn"){const _=nt.svg(o),L=ot(t,{fill:i,stroke:s,fillStyle:"solid"}),F=_.path(me(d,f,h,u,to),L);C=o.insert(()=>F,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",Xt(t.cssStyles))}else C=o.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",to).attr("ry",to).attr("x",d).attr("y",f).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const x=f+l+c+Kh;o.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",x).attr("x2",d+h-8).attr("y2",x).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=x+Zh/2,w=2.5,T=10;for(let _=-1;_<=1;_++)o.append("circle").attr("class","collapsed-indicator").attr("cx",_*T).attr("cy",k).attr("r",w).attr("fill",s);return ct(t,C),t.calcIntersect=function(_,L){return st.rect(_,L)},t.intersect=function(_){return st.rect(t,_)},o}g(Uf,"collapsedGroup");function We(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(We,"insertPolygonShape");var Q2=["right","left","up","down"],dl="point",J2=g(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),tw=g(e=>Q2.filter(t=>e.has(t)).join("|")||dl,"getDirectionKey"),Qh={"right|left|up|down":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":g(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":g(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":g(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":g(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":g(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[dl]:()=>[{x:0,y:0}]},ew=g((e,t,r,i)=>{const s=J2(e),a=(r.padding??0)/2,o=t.height+4*a,n=o/2,l=i??t.width+2*n+2*a,c=tw(s);return(Qh[c]??Qh[dl])({height:o,midpoint:n,padding:a,width:l})},"getArrowPoints");async function Gf(e,t){const r=t,{shapeSvg:i,bbox:s}=await mt(e,r,xt(r)),a=r.padding??0,o=s.height+2*a,n=o/2,l=s.width+2*n+a,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,d=ew(r.directions??[],s,r,u),f=We(i,u,o,d);return f.attr("style",r.style??null),ct(r,f),r.intersect=function(y){return st.polygon(r,d,y)},i}g(Gf,"block_arrow");async function Xf(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await mt(e,t,xt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,d=Math.max(o.width+c*2,t.width??0,90),f=Math.max(o.height+c*2+h,t.height??0),y=-f/2,{cssStyles:m}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=nt.svg(a).path(me(-d/2,y,d,f,u),ot(t,{}));(k=C.node())==null||k.appendChild(T),m&&C.attr("style",m)}else C.append("rect").attr("x",-d/2).attr("y",y).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);C.append("line").attr("x1",-d/2).attr("y1",y+h).attr("x2",d/2).attr("y2",y+h).attr("style",`stroke:${l};stroke-width:1px`);for(let w=0;w<3;w++)C.append("circle").attr("cx",-d/2+12+w*9).attr("cy",y+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",y+4).attr("width",Math.max(d-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),ct(t,C);const x=y+h+(f-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(w){return st.rect(t,w)},a}g(Xf,"browser");var vs=12;async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+vs),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,d=c,f=-h,y=0,m=[{x:u+vs,y:f},{x:d,y:f},{x:d,y},{x:u,y},{x:u,y:f+vs},{x:u+vs,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=nt.svg(n),w=ot(t,{}),T=Dt(m),_=k.path(T,w);C=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=We(n,c,h,m);return i&&C.attr("style",i),ct(t,C),t.intersect=function(k){return st.polygon(t,m,k)},n}g(Vf,"card");function Zf(e,t){const{nodeStyles:r}=dt(t);t.label="";const i=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=nt.svg(i),l=ot(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Dt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return st.polygon(t,o,d)},i}g(Zf,"choice");async function fl(e,t,r){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await mt(e,t,xt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=nt.svg(a),y=ot(t,{}),m=f.circle(0,0,h*2,y);u=a.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Xt(d))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return ct(t,u),t.calcIntersect=function(f,y){const m=f.width/2;return st.circle(f,m,y)},t.intersect=function(f){return I.info("Circle intersect",t,h,f),st.circle(t,h,f)},a}g(fl,"circle");async function Kf(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:o}=await mt(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:a.width+l,h=r.positioned?r.height??0:a.height+l,u=r.positioned?-c/2:-a.width/2-o,d=r.positioned?-h/2:-a.height/2-o;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",c).attr("height",h),ct(r,n),r.intersect=function(f){return st.rect(r,f)},s}g(Kf,"composite");async function Qf(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await mt(e,t,xt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,d=Math.max(o.width+c*2,t.width??0,90),f=Math.max(o.height+c*2+h,t.height??0),y=-f/2,{cssStyles:m}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=nt.svg(a).path(me(-d/2,y,d,f,u),ot(t,{}));(k=C.node())==null||k.appendChild(T),m&&C.attr("style",m)}else C.append("rect").attr("x",-d/2).attr("y",y).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);C.append("text").attr("x",-d/2+12).attr("y",y+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),ct(t,C);const x=y+h+(f-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(w){return st.rect(t,w)},a}g(Qf,"consoleWindow");function Jf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
199
- M ${s.x},${s.y} L ${o.x},${o.y}`}g(Jf,"createLine");function tg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=nt.svg(s),l=ot(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=Jf(a),u=n.path(h,l),d=s.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),ct(t,d),t.intersect=function(f){return I.info("crossedCircle intersect",t,{radius:a,point:f}),st.circle(t,a,f)},s}g(tg,"crossedCircle");function Ye(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:-f,y:-y})}return o}g(Ye,"generateCirclePoints");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...Ye(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ye(c/2+u*2,-u,u,20,-180,-270),...Ye(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ye(c/2,h/2,u,20,0,90)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ye(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ye(c/2+c*.1,-u,u,20,-180,-270),...Ye(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ye(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],m=nt.svg(s),C=ot(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Dt(f).replace("Z",""),w=m.path(k,C),T=Dt(y),_=m.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>_,":first-child").attr("stroke-opacity",0),L.insert(()=>w,":first-child"),L.attr("class","text"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ct(t,L),t.intersect=function(F){return st.polygon(t,y,F)},s}g(eg,"curlyBraceLeft");function je(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:f,y})}return o}g(je,"generateCirclePoints");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90)],y=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],m=nt.svg(s),C=ot(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Dt(f).replace("Z",""),w=m.path(k,C),T=Dt(y),_=m.path(T,{...C}),L=s.insert("g",":first-child");return L.insert(()=>_,":first-child").attr("stroke-opacity",0),L.insert(()=>w,":first-child"),L.attr("class","text"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ct(t,L),t.intersect=function(F){return st.polygon(t,y,F)},s}g(rg,"curlyBraceRight");function Qt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:-f,y:-y})}return o}g(Qt,"generateCirclePoints");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...Qt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Qt(c/2+u*2,-u,u,20,-180,-270),...Qt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Qt(c/2,h/2,u,20,0,90)],y=[...Qt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Qt(-c/2-u/2,-u,u,20,0,90),...Qt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Qt(-c/2+u+u/2,h/2,u,30,-180,-270)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Qt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Qt(c/2+u*2,-u,u,20,-180,-270),...Qt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Qt(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...Qt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Qt(-c/2-u/2,-u,u,20,0,90),...Qt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Qt(-c/2+u+u/2,h/2,u,30,-180,-270)],C=nt.svg(s),x=ot(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=Dt(f).replace("Z",""),T=C.path(w,x),L=Dt(y).replace("Z",""),F=C.path(L,x),v=Dt(m),U=C.path(v,{...x}),W=s.insert("g",":first-child");return W.insert(()=>U,":first-child").attr("stroke-opacity",0),W.insert(()=>T,":first-child"),W.insert(()=>F,":first-child"),W.attr("class","text"),d&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ct(t,W),t.intersect=function(q){return st.polygon(t,m,q)},s}g(ig,"curlyBraces");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await mt(e,t,xt(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),d=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),f=d/2,{cssStyles:y}=t,m=nt.svg(c),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=u,k=d,w=x-f,T=k/4,_=[{x:w,y:0},{x:T,y:0},{x:0,y:k/2},{x:T,y:k},{x:w,y:k},...$e(-w,-k/2,f,50,270,90)],L=Dt(_),F=m.path(L,C),v=c.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-u/2}, ${-d/2})`),ct(t,v),t.intersect=function(U){return st.polygon(t,_,U)},c}g(sg,"curvedTrapezoid");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.padding??20,l=Math.max(a.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(a.height+n*2,t.height?t.height-(2*c-h):0),d=Math.min(l*.177,u*.45),f=u+2*c-h,y=-f/2,m=y+2*c-h,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const v=nt.svg(s),U=ot(t,{}),W=v.path(me(-l/2,m,l,u,d),U),q=v.circle(0,y+c,c*2,U);C.insert(()=>q,":first-child"),C.insert(()=>W,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",m).attr("width",l).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),C.append("circle").attr("cx",0).attr("cy",y+c).attr("r",c).attr("style",i);ct(t,C);const k=m+u/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const w=y+c,T=Math.asin(Math.min(1,(m-w)/c))*180/Math.PI,F=[...$e(0,-w,c,24,180+T,-T),...$e(-(-l/2+d),-(m+d),d,12,90,0),...$e(-(-l/2+d),-(f/2-d),d,12,360,270),...$e(-(l/2-d),-(f/2-d),d,12,270,180),...$e(-(l/2-d),-(m+d),d,12,180,90)];return t.intersect=function(v){return st.polygon(t,F,v)},s}g(ag,"person");var rw=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),iw=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),sw=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Jh=8,tc=8;async function og(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-o,t.width<tc&&(t.width=tc)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-a-k*3,t.height<Jh&&(t.height=Jh)}const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,xt(t)),u=Math.max(t.width??0,c.width)+o,d=u/2,f=d/(2.5+u/50),y=Math.max(t.height??0,c.height)+a+f;let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=nt.svg(l),k=iw(0,0,u,y,d,f),w=sw(0,f,u,y,d,f),T=ot(t,{}),_=x.path(k,T),L=x.path(w,ot(t,{fill:"none"}));m=l.insert(()=>L,":first-child"),m=l.insert(()=>_,":first-child"),m.attr("class","basic label-container"),C&&m.attr("style",C)}else{const x=rw(0,0,u,y,d,f);m=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Xt(C)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-u/2}, ${-(y/2+f)})`),ct(t,m),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=st.rect(t,x),w=k.x-(t.x??0);if(d!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-w*w/(d*d));T>0&&(T=Math.sqrt(T)),T=f-T,x.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},l}g(og,"cylinder");async function mi(e,t,r){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await mt(e,t,xt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=nt.svg(a),C=ot(t,{}),x=d||f?m.path(me(c,h,n,l,d||0),C):m.rectangle(c,h,n,l,C);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Xt(y))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Xt(d)).attr("ry",Xt(f)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(m,C){return st.rect(m,C)},t.intersect=function(m){return st.rect(t,m)},a}g(mi,"drawRect");async function ng(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await mi(e,t,l);if(t.look==="handDrawn"){const f=nt.svg(c),y=ot(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),C=m.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,y),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,y),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,d=(Number(h.attr("height"))||n)??0;return u>0&&d>0&&h.attr("stroke-dasharray",`${u} ${d}`),c}g(ng,"datastore");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=n.width+s,h=n.height+a,u=h*.2,d=-c/2,f=-h/2-u/2,{cssStyles:y}=t,m=nt.svg(o),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],k=m.polygon(x.map(T=>[T.x,T.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+u+(t.padding??0)/2-(n.y-(n.top??0))})`),ct(t,w),t.intersect=function(T){return st.rect(t,T)},o}g(lg,"dividedRectangle");async function hg(e,t){var f,y;const{labelStyles:r,nodeStyles:i}=dt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=nt.svg(n),C=ot(t,{roughness:.2,strokeWidth:2.5}),x=ot(t,{roughness:.2,strokeWidth:1.5}),k=m.circle(0,0,c*2,C),w=m.circle(0,0,h*2,x);u=n.insert("g",":first-child"),u.attr("class",Xt(t.cssClasses)).attr("style",Xt(d)),(f=u.node())==null||f.appendChild(k),(y=u.node())==null||y.appendChild(w)}else{u=n.insert("g",":first-child");const m=u.insert("circle",":first-child"),C=u.insert("circle");u.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return ct(t,u),t.intersect=function(m){return I.info("DoubleCircle intersect",t,c,m),st.circle(t,c,m)},n}g(hg,"doublecircle");function cg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=nt.svg(a),{nodeBorder:c}=r,h=ot(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),ct(t,d),t.intersect=function(f){return I.info("filledCircle intersect",t,{radius:o,point:f}),st.circle(t,o,f)},a}g(cg,"filledCircle");var ec=10,rc=10;async function ug(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<ec&&(t.height=ec),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<rc&&(t.width=rc));const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,d=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:f}=t,y=nt.svg(o),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Dt(d),x=y.path(C,m),k=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,ct(t,k),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(w){return I.info("Triangle intersect",t,d,w),st.polygon(t,d,w)},o}g(ug,"flippedTriangle");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.padding??12,l=Math.max(a.width+n*2,t.width??0,90),c=a.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),d=u-h,f=Math.max(l*.38,28),y=-u/2,m=[{x:-l/2,y},{x:-l/2+f,y},{x:-l/2+f,y:y+h},{x:l/2,y:y+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],C=[`M${m[0].x},${m[0].y}`,...m.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const _=nt.svg(s).path(C,ot(t,{}));k=s.insert(()=>_,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?ct(t,k):ct(t,k,{width:l,height:u});const w=y+h+d/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${w-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(T){return st.polygon(t,m,T)},s}g(dg,"folder");function fg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=dt(t);t.label="";const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,d=nt.svg(o),f=ot(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=d.rectangle(h,u,l,c,f),m=o.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),ct(t,m);const C=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return st.rect(t,x)},o}g(fg,"forkJoin");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,d=u/2,{cssStyles:f}=t,y=nt.svg(l),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-h/2,y:-u/2},{x:h/2-d,y:-u/2},...$e(-h/2+d,0,d,50,90,270),{x:h/2-d,y:u/2},{x:-h/2,y:u/2}],x=Dt(C),k=y.path(x,m),w=l.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),ct(t,w),t.intersect=function(T){return I.info("Pill intersect",t,{radius:d,point:T}),st.polygon(t,C,T)},l}g(gg,"halfRoundedRectangle");var aw=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const w=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*w-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await mt(e,t,xt(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,f=d/s,y=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*f+c,m=[{x:f,y:0},{x:y-f,y:0},{x:y,y:-d/2},{x:y-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=nt.svg(h),w=ot(t,{}),T=aw(0,0,y,d,f),_=k.path(T,w);C=h.insert(()=>_,":first-child").attr("transform",`translate(${-y/2}, ${d/2})`),x&&C.attr("style",x)}else C=We(h,y,d,m);return i&&C.attr("style",i),t.width=y,t.height=d,ct(t,C),t.intersect=function(k){return st.polygon(t,m,k)},h}g(pg,"hexagon");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await mt(e,t,xt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=nt.svg(s),c=ot(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=Dt(h),d=l.path(u,c),f=s.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-o/2})`),ct(t,f),t.intersect=function(y){return I.info("Pill intersect",t,{points:h}),st.polygon(t,h,y)},s}g(yg,"hourglass");async function mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),d=t.pos==="t",f=n,y=n,{nodeBorder:m}=r,{stylesMap:C}=yi(t),x=-y/2,k=-f/2,w=t.label?8:0,T=nt.svg(c),_=ot(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=T.rectangle(x,k,y,f,_),F=Math.max(y,h.width),v=f+h.height+w,U=T.rectangle(-F/2,-v/2,F,v,{..._,fill:"transparent",stroke:"none"}),W=c.insert(()=>L,":first-child"),q=c.insert(()=>U);if(t.icon){const rt=c.append("g");rt.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const Y=rt.node().getBBox(),A=Y.width,E=Y.height,B=Y.x,P=Y.y;rt.attr("transform",`translate(${-A/2-B},${d?h.height/2+w/2-E/2-P:-h.height/2-w/2-E/2-P})`),rt.attr("style",`color: ${C.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-v/2:v/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),ct(t,q),t.intersect=function(rt){if(I.info("iconSquare intersect",t,rt),!t.label)return st.rect(t,rt);const Y=t.x??0,A=t.y??0,E=t.height??0;let B=[];return d?B=[{x:Y-h.width/2,y:A-E/2},{x:Y+h.width/2,y:A-E/2},{x:Y+h.width/2,y:A-E/2+h.height+w},{x:Y+y/2,y:A-E/2+h.height+w},{x:Y+y/2,y:A+E/2},{x:Y-y/2,y:A+E/2},{x:Y-y/2,y:A-E/2+h.height+w},{x:Y-h.width/2,y:A-E/2+h.height+w}]:B=[{x:Y-y/2,y:A-E/2},{x:Y+y/2,y:A-E/2},{x:Y+y/2,y:A-E/2+f},{x:Y+h.width/2,y:A-E/2+f},{x:Y+h.width/2/2,y:A+E/2},{x:Y-h.width/2,y:A+E/2},{x:Y-h.width/2,y:A-E/2+f},{x:Y-y/2,y:A-E/2+f}],st.polygon(t,B,rt)},c}g(mg,"icon");async function xg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),d=20,f=t.label?8:0,y=t.pos==="t",{nodeBorder:m,mainBkg:C}=r,{stylesMap:x}=yi(t),k=nt.svg(c),w=ot(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=x.get("fill");w.stroke=T??C;const _=c.append("g");t.icon&&_.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=_.node().getBBox(),F=L.width,v=L.height,U=L.x,W=L.y,q=Math.max(F,v)*Math.SQRT2+d*2,rt=k.circle(0,0,q,w),Y=Math.max(q,h.width),A=q+h.height+f,E=k.rectangle(-Y/2,-A/2,Y,A,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>rt,":first-child"),P=c.insert(()=>E);return _.attr("transform",`translate(${-F/2-U},${y?h.height/2+f/2-v/2-W:-h.height/2-f/2-v/2-W})`),_.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${y?-A/2:A/2-h.height})`),B.attr("transform",`translate(0,${y?h.height/2+f/2:-h.height/2-f/2})`),ct(t,P),t.intersect=function($){return I.info("iconSquare intersect",t,$),st.rect(t,$)},c}g(xg,"iconCircle");async function Cg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await mt(e,t,"icon-shape default"),f=t.pos==="t",y=n+u*2,m=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=yi(t),w=-m/2,T=-y/2,_=t.label?8:0,L=nt.svg(c),F=ot(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=k.get("fill");F.stroke=v??x;const U=L.path(me(w,T,m,y,5),F),W=Math.max(m,h.width),q=y+h.height+_,rt=L.rectangle(-W/2,-q/2,W,q,{...F,fill:"transparent",stroke:"none"}),Y=c.insert(()=>U,":first-child").attr("class","icon-shape2"),A=c.insert(()=>rt);if(t.icon){const E=c.append("g");E.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=E.node().getBBox(),P=B.width,$=B.height,N=B.x,V=B.y;E.attr("transform",`translate(${-P/2-N},${f?h.height/2+_/2-$/2-V:-h.height/2-_/2-$/2-V})`),E.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),ct(t,A),t.intersect=function(E){if(I.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const B=t.x??0,P=t.y??0,$=t.height??0;let N=[];return f?N=[{x:B-h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2+h.height+_},{x:B+m/2,y:P-$/2+h.height+_},{x:B+m/2,y:P+$/2},{x:B-m/2,y:P+$/2},{x:B-m/2,y:P-$/2+h.height+_},{x:B-h.width/2,y:P-$/2+h.height+_}]:N=[{x:B-m/2,y:P-$/2},{x:B+m/2,y:P-$/2},{x:B+m/2,y:P-$/2+y},{x:B+h.width/2,y:P-$/2+y},{x:B+h.width/2/2,y:P+$/2},{x:B-h.width/2,y:P+$/2},{x:B-h.width/2,y:P-$/2+y},{x:B-m/2,y:P-$/2+y}],st.polygon(t,N,E)},c}g(Cg,"iconRounded");async function bg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await mt(e,t,"icon-shape default"),f=t.pos==="t",y=n+u*2,m=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=yi(t),w=-m/2,T=-y/2,_=t.label?8:0,L=nt.svg(c),F=ot(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const v=k.get("fill");F.stroke=v??x;const U=L.path(me(w,T,m,y,.1),F),W=Math.max(m,h.width),q=y+h.height+_,rt=L.rectangle(-W/2,-q/2,W,q,{...F,fill:"transparent",stroke:"none"}),Y=c.insert(()=>U,":first-child"),A=c.insert(()=>rt);if(t.icon){const E=c.append("g");E.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=E.node().getBBox(),P=B.width,$=B.height,N=B.x,V=B.y;E.attr("transform",`translate(${-P/2-N},${f?h.height/2+_/2-$/2-V:-h.height/2-_/2-$/2-V})`),E.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),ct(t,A),t.intersect=function(E){if(I.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const B=t.x??0,P=t.y??0,$=t.height??0;let N=[];return f?N=[{x:B-h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2+h.height+_},{x:B+m/2,y:P-$/2+h.height+_},{x:B+m/2,y:P+$/2},{x:B-m/2,y:P+$/2},{x:B-m/2,y:P-$/2+h.height+_},{x:B-h.width/2,y:P-$/2+h.height+_}]:N=[{x:B-m/2,y:P-$/2},{x:B+m/2,y:P-$/2},{x:B+m/2,y:P-$/2+y},{x:B+h.width/2,y:P-$/2+y},{x:B+h.width/2/2,y:P+$/2},{x:B-h.width/2,y:P+$/2},{x:B-h.width/2,y:P-$/2+y},{x:B-m/2,y:P-$/2+y}],st.polygon(t,N,E)},c}g(bg,"iconSquare");async function kg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=dt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:f}=await mt(e,t,"image-shape default"),y=t.pos==="t",m=-c/2,C=-h/2,x=t.label?8:0,k=nt.svg(u),w=ot(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=k.rectangle(m,C,c,h,w),_=Math.max(c,d.width),L=h+d.height+x,F=k.rectangle(-_/2,-L/2,_,L,{...w,fill:"none",stroke:"none"}),v=u.insert(()=>T,":first-child"),U=u.insert(()=>F);if(t.img){const W=u.append("image");W.attr("href",t.img),W.attr("width",c),W.attr("height",h),W.attr("preserveAspectRatio","none"),W.attr("transform",`translate(${-c/2},${y?L/2-h:-L/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${y?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),v.attr("transform",`translate(0,${y?d.height/2+x/2:-d.height/2-x/2})`),ct(t,U),t.intersect=function(W){if(I.info("iconSquare intersect",t,W),!t.label)return st.rect(t,W);const q=t.x??0,rt=t.y??0,Y=t.height??0;let A=[];return y?A=[{x:q-d.width/2,y:rt-Y/2},{x:q+d.width/2,y:rt-Y/2},{x:q+d.width/2,y:rt-Y/2+d.height+x},{x:q+c/2,y:rt-Y/2+d.height+x},{x:q+c/2,y:rt+Y/2},{x:q-c/2,y:rt+Y/2},{x:q-c/2,y:rt-Y/2+d.height+x},{x:q-d.width/2,y:rt-Y/2+d.height+x}]:A=[{x:q-c/2,y:rt-Y/2},{x:q+c/2,y:rt-Y/2},{x:q+c/2,y:rt-Y/2+h},{x:q+d.width/2,y:rt-Y/2+h},{x:q+d.width/2/2,y:rt+Y/2},{x:q-d.width/2,y:rt+Y/2},{x:q-d.width/2,y:rt-Y/2+h},{x:q-c/2,y:rt-Y/2+h}],st.polygon(t,A,W)},u}g(kg,"imageSquare");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+o*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(wg,"inv_trapezoid");async function Sg(e,t){const{shapeSvg:r,bbox:i,label:s}=await mt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ct(t,a),t.intersect=function(l){return st.rect(t,l)},r}g(Sg,"labelRect");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(Tg,"lean_left");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(_g,"lean_right");function Bg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=nt.svg(s),u=ot(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Dt(c),f=h.path(d,u),y=s.insert(()=>f,":first-child");return y.attr("class","outer-path"),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-n})`),ct(t,y),t.intersect=function(m){return I.info("lightningBolt intersect",t,m),st.polygon(t,c,m)},s}g(Bg,"lightningBolt");var ow=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),nw=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lw=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ic=10,sc=10;async function vg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-a,t.width<sc&&(t.width=sc);const w=x/2/(2.5+x/50);t.height=(t.height??0)-o-w*3,t.height<ic&&(t.height=ic)}const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,d=u/(2.5+h/50),f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+d+o*2,y=f*.1;let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=nt.svg(n),k=nw(0,0,h,f,u,d,y),w=lw(0,d,h,f,u,d),T=ot(t,{}),_=x.path(k,T),L=x.path(w,T);n.insert(()=>L,":first-child").attr("class","line"),m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container"),C&&m.attr("style",C)}else{const x=ow(0,0,h,f,u,d,y);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Xt(C)).attr("style",i)}return m.attr("label-offset-y",d),m.attr("transform",`translate(${-h/2}, ${-(f/2+d)})`),ct(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(x){const k=st.rect(t,x),w=k.x-(t.x??0);if(u!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-w*w/(u*u));T>0&&(T=Math.sqrt(T)),T=d-T,x.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},n}g(vg,"linedCylinder");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:y}=t,m=nt.svg(n),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:f/2},...hr(-h/2-h/2*.1,f/2,h/2+h/2*.1,f/2,d,.8),{x:h/2+h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:-f/2},{x:-h/2,y:-f/2},{x:-h/2,y:f/2*1.1},{x:-h/2,y:-f/2}],k=m.polygon(x.map(T=>[T.x,T.y]),C),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),ct(t,w),t.intersect=function(T){return st.polygon(t,x,T)},n}g(Lg,"linedWaveEdgedRect");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,xt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,f=u-2*n,y=d-2*n,m=-f/2,C=-y/2,{cssStyles:x}=t,k=nt.svg(l),w=ot(t,{}),T=[{x:m-n,y:C+n},{x:m-n,y:C+y+n},{x:m+f-n,y:C+y+n},{x:m+f-n,y:C+y},{x:m+f,y:C+y},{x:m+f,y:C+y-n},{x:m+f+n,y:C+y-n},{x:m+f+n,y:C-n},{x:m+n,y:C-n},{x:m+n,y:C},{x:m,y:C},{x:m,y:C+n}],_=[{x:m,y:C+n},{x:m+f-n,y:C+n},{x:m+f-n,y:C+y},{x:m+f,y:C+y},{x:m+f,y:C},{x:m,y:C}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=Dt(T);let F=k.path(L,w);const v=Dt(_);let U=k.path(v,w);t.look!=="handDrawn"&&(F=ln(F),U=ln(U));const W=l.insert("g",":first-child");return W.insert(()=>F),W.insert(()=>U),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.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))})`),ct(t,W),t.intersect=function(q){return st.polygon(t,T,q)},l}g(Fg,"multiRect");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(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==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,d=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,f=t.look==="neo"?d/4:d/8,y=d+(h?f/2:-f/2),m=-u/2,C=-y/2,x=10,{cssStyles:k}=t,w=hr(m-x,C+y+x,m+u-x,C+y+x,f,.8),T=w==null?void 0:w[w.length-1],_=[{x:m-x,y:C+x},{x:m-x,y:C+y+x},...w,{x:m+u-x,y:T.y-x},{x:m+u,y:T.y-x},{x:m+u,y:T.y-2*x},{x:m+u+x,y:T.y-2*x},{x:m+u+x,y:C-x},{x:m+x,y:C-x},{x:m+x,y:C},{x:m,y:C},{x:m,y:C+x}],L=[{x:m,y:C+x},{x:m+u-x,y:C+x},{x:m+u-x,y:T.y-x},{x:m+u,y:T.y-x},{x:m+u,y:C},{x:m,y:C}],F=nt.svg(s),v=ot(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const U=Dt(_),W=F.path(U,v),q=Dt(L),rt=F.path(q,v),Y=s.insert(()=>W,":first-child");return Y.insert(()=>rt),Y.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(0,${-f/2})`),o.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-f/2-(a.y-(a.top??0))})`),ct(t,Y),t.intersect=function(A){return st.polygon(t,_,A)},s}g(Mg,"multiWaveEdgedRectangle");async function Ag(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i,t.useHtmlLabels||se(Yt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,d=-h/2,{cssStyles:f}=t,y=nt.svg(o),m=ot(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=y.rectangle(u,d,c,h,m),x=o.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ct(t,x),t.intersect=function(k){return st.rect(t,k)},o}g(Ag,"note");var hw=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await mt(e,t,xt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+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 u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=nt.svg(s),y=ot(t,{}),m=hw(0,0,l),C=f.path(m,y);u=s.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=We(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),ct(t,u),t.calcIntersect=function(f,y){const m=f.width,C=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=st.polygon(f,C,y);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},s}g(Eg,"question");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?o*2:o),t.height??0),d=u/4,y=-Math.max(h,(t.width??0)-d)/2,m=-u/2,C=m/2,x=[{x:y+C,y:m},{x:y,y:0},{x:y+C,y:-m},{x:-y,y:-m},{x:-y,y:m}],{cssStyles:k}=t,w=nt.svg(n),T=ot(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=Dt(x),L=w.path(_,T),F=n.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ct(t,F),t.intersect=function(v){return st.polygon(t,x,v)},n}g($g,"rect_left_inv_arrow");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ir(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(se(Et())){const v=h.children[0],U=Ft(h);u=v.getBoundingClientRect(),U.attr("width",u.width),U.attr("height",u.height)}I.info("Text 2",l);const d=l||[],f=h.getBBox(),y=await ir(n,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),m=y.children[0],C=Ft(y);u=m.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;Ft(y).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),Ft(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const k=u.width+(t.padding||0),w=u.height+(t.padding||0),T=-u.width/2-x,_=-u.height/2-x;let L,F;if(t.look==="handDrawn"){const v=nt.svg(a),U=ot(t,{}),W=v.path(me(T,_,k,w,t.rx||0),U),q=v.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,U);F=a.insert(()=>(I.debug("Rough node insert CXC",W),q),":first-child"),L=a.insert(()=>(I.debug("Rough node insert CXC",W),W),":first-child")}else L=o.insert("rect",":first-child"),F=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return ct(t,L),t.intersect=function(v){return st.rect(t,v)},a}g(Og,"rectWithTitle");async function Pg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return mi(e,t,s)}g(Pg,"roundedRect");var cr=8;async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?cr:cr*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-cr,d=h,f=cr-c/2,y=-h/2,{cssStyles:m}=t,C=nt.svg(o),x=ot(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:f,y},{x:f+u,y},{x:f+u,y:y+d},{x:f-cr,y:y+d},{x:f-cr,y},{x:f,y},{x:f,y:y+d}],w=C.polygon(k.map(_=>[_.x,_.y]),x),T=o.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Xt(m)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${cr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ct(t,T),t.intersect=function(_){return st.rect(t,_)},o}g(Dg,"shadedProcess");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,d=h,f=u/1.5,y=-d/2,m=-f/2,{cssStyles:C}=t,x=nt.svg(n),k=ot(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=[{x:y,y:m},{x:y,y:m+f},{x:y+d,y:m+f},{x:y+d,y:m-f/2}],T=Dt(w),_=x.path(T,k),L=n.insert(()=>_,":first-child");return L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),ct(t,L),t.intersect=function(F){return st.polygon(t,w,F)},n}g(Ig,"slopedRect");async function Rg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return mi(e,t,a)}g(Rg,"squareRect");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:d}=t,f=nt.svg(n),y=ot(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...$e(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...$e(h/2-u,0,u,50,270,450)],C=Dt(m),x=f.path(C,y),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),ct(t,k),t.intersect=function(w){return st.polygon(t,m,w)},n}g(qg,"stadium");async function Ng(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return mi(e,t,r)}g(Ng,"state");function Wg(e,t,{config:{themeVariables:r}}){var k,w;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,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),u=nt.svg(h),d=ot(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:o,strokeWidth:2}),y=n??l,m=(t.width??0)*5/14,C=u.circle(0,0,m,{...d,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),a&&x.selectAll("path").attr("style",a),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const T=((w=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:w.id)??"",_=T?`${T}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${_})`)}return ct(t,x),t.intersect=function(T){return st.circle(t,(t.width??0)/2,T)},h}g(Wg,"stateEnd");function zg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=nt.svg(a).circle(0,0,t.width,h1(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return ct(t,o),t.intersect=function(c){return st.circle(t,(t.width??7)/2,c)},a}g(zg,"stateStart");var qr=8;async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.width+2*qr+a,t.width??0),h=Math.max(l.height+o,t.height??0),u=c-2*qr,d=h,f=-c/2,y=-h/2,m=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){const C=nt.svg(n),x=ot(t,{}),k=C.rectangle(f,y,u+16,d,x),w=C.line(f+qr,y,f+qr,y+d,x),T=C.line(f+qr+u,y,f+qr+u,y+d,x);n.insert(()=>w,":first-child"),n.insert(()=>T,":first-child");const _=n.insert(()=>k,":first-child"),{cssStyles:L}=t;_.attr("class","basic label-container").attr("style",Xt(L)),ct(t,_)}else{const C=We(n,u,d,m);i&&C.attr("style",i),ct(t,C)}return t.intersect=function(C){return st.polygon(t,m,C)},n}g(Hg,"subroutine");var eo=.2;async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-eo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=eo*c,u=eo*c,f=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,y=c,m=-f/2,C=-y/2,{cssStyles:x}=t,k=nt.svg(n),w=ot(t,{}),T=[{x:m-h/2,y:C},{x:m+f+h/2,y:C},{x:m+f+h/2,y:C+y},{x:m-h/2,y:C+y}],_=[{x:m+f-h/2,y:C+y},{x:m+f+h/2,y:C+y},{x:m+f+h/2,y:C+y-u}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=Dt(T),F=k.path(L,w),v=Dt(_),U=k.path(v,{...w,fillStyle:"solid"}),W=n.insert(()=>U,":first-child");return W.insert(()=>F,":first-child"),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),ct(t,W),t.intersect=function(q){return st.polygon(t,T,q)},n}g(Yg,"taggedRect");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,d=l+c,{cssStyles:f}=t,y=nt.svg(s),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:d/2},...hr(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,k=-d/2-u*.4,w=[{x:x+n-h,y:(k+l)*1.3},{x:x+n,y:k+l-u},{x:x+n,y:(k+l)*.9},...hr(x+n,(k+l)*1.25,x+n-h,(k+l)*1.3,-l*.02,.5)],T=Dt(C),_=y.path(T,m),L=Dt(w),F=y.path(L,{...m,fillStyle:"solid"}),v=s.insert(()=>F,":first-child");return v.insert(()=>_,":first-child"),v.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),ct(t,v),t.intersect=function(U){return st.polygon(t,C,U)},s}g(jg,"taggedWaveEdgedRectangle");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await mt(e,t,xt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),ct(t,h),t.intersect=function(u){return st.rect(t,u)},s}g(Ug,"text");var cw=g((e,t,r,i,s,a)=>`M${e},${t}
198
+ `),a):pe(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),rn(h,t.labelStyle),h.attr("class",`${c} ${i}`),rn(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"),s&&n.attr("class","labelBkg"),(await Tr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),o.node()}g(Bf,"addHtmlSpan");function Ba(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(Ba,"createTspan");function vf(e,t,r){const i=e.append("text"),s=Ba(i,1,t);va(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}g(vf,"computeWidthOfText");function T2(e,t,r){var o;const i=e.append("text"),s=Ba(i,1,t);va(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}g(T2,"computeDimensionOfText");function Lf(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=g(f=>vf(o,1.1,f)<=e,"checkWidth"),d=u(h)?[h]:_f(h,u);for(const f of d){const y=Ba(l,c,1.1,s);va(y,f),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}g(Lf,"createFormattedText");function sn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(sn,"decodeHTMLEntities");function va(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(sn(r.content)):s.text(" "+sn(r.content))})}g(va,"updateTextContentAndStyles");async function Ff(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await O1(n)?await ps(n,void 0,{class:"label-icon"}):`<i class='${pe(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(Ff,"replaceIconSubstring");var ve=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(I.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?wf(t,h):kf(t),d=await Ff(nr(u),h),f=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Ji(t)?f:d,labelStyle:r.replace("fill:","color:")};return await Bf(e,y,l,s,c,h)}else{const u=nr(t.replace(/<br\s*\/?>/g,"<br/>")),d=o?bf(u.replace("<br>","<br/>"),h):Cf(u),f=Lf(l,e,d,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ft(f).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ft(f).select("rect").attr("style",y.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ft(f).select("text").attr("style",m)}return i?Ft(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Ft(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function Xa(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function _2(e,t){return e[0]===t[0]&&e[1]===t[1]}function B2(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)Xa(c,n,s);const l=function(c,h,u){const d=[];for(const k of c){const w=[...k];_2(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const f=[];h=Math.max(h,.1);const y=[];for(const k of d)for(let w=0;w<k.length-1;w++){const T=k[w],_=k[w+1];if(T[1]!==_[1]){const v=Math.min(T[1],_[1]);y.push({ymin:v,ymax:Math.max(T[1],_[1]),x:v===T[1]?T[0]:_[0],islope:(_[0]-T[0])/(_[1]-T[1])})}}if(y.sort((k,w)=>k.ymin<w.ymin?-1:k.ymin>w.ymin?1:k.x<w.x?-1:k.x>w.x?1:k.ymax===w.ymax?0:(k.ymax-w.ymax)/Math.abs(k.ymax-w.ymax)),!y.length)return f;let m=[],C=y[0].ymin,x=0;for(;m.length||y.length;){if(y.length){let k=-1;for(let w=0;w<y.length&&!(y[w].ymin>C);w++)k=w;y.splice(0,k+1).forEach(w=>{m.push({s:C,edge:w})})}if(m=m.filter(k=>!(k.edge.ymax<=C)),m.sort((k,w)=>k.edge.x===w.edge.x?0:(k.edge.x-w.edge.x)/Math.abs(k.edge.x-w.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let k=0;k<m.length;k+=2){const w=k+1;if(w>=m.length)break;const T=m[k].edge,_=m[w].edge;f.push([[Math.round(T.x),C],[Math.round(_.x),C]])}C+=u,m.forEach(k=>{k.edge.x=k.edge.x+u*k.edge.islope}),x++}return f}(o,a,i);if(s){for(const c of o)Xa(c,n,-s);(function(c,h,u){const d=[];c.forEach(f=>d.push(...f)),Xa(d,h,u)})(l,n,-s)}return l}function xs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),B2(e,s,i,a||1)}class ll{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=xs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function La(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 v2 extends ll{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=xs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)La([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class L2 extends ll{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class F2{constructor(t){this.helper=t}fillPolygons(t,r){const i=xs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=La(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,d=(n[0][0]+n[1][0])/2-s/4,f=Math.min(n[0][1],n[1][1]);for(let y=0;y<h;y++){const m=f+u+y*s,C=d-o+2*Math.random()*o,x=m-o+2*Math.random()*o,k=this.helper.ellipse(C,x,a,a,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class M2{constructor(t){this.helper=t}fillPolygons(t,r){const i=xs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach(o=>{const n=La(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const y=f*(i+s),m=y+i,C=[h[0]+y*Math.cos(d)+c*Math.cos(d),h[1]+y*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],r))}}),a}}class A2{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=xs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(a=>{const o=La(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const d=2*u*r,f=2*(u+1)*r,y=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+y*Math.cos(h+Math.PI/4),m[1]+y*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],i))}}),s}}const ne={};class E2{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const $2=0,Va=1,Wh=2,Ts={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 Za(e,t){return e.type===t}function hl(e){const t=[],r=function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:$2,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Va,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Wh,text:""},n}(e);let i="BOD",s=0,a=r[s];for(;!Za(a,Wh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return hl("M0,0"+e);s++,o=Ts[a.text],i=a.text}else Za(a,Va)?o=Ts[i]:(s++,o=Ts[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!Za(c,Va))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Ts[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Mf(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.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);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.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);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.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);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Af(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=s+(s-l)):(u=i,d=s),t.push({key:"C",data:[u,d,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,d]=h;let f=0,y=0;r==="Q"||r==="T"?(f=i+(i-n),y=s+(s-l)):(f=i,y=s);const m=i+2*(f-i)/3,C=s+2*(y-s)/3,x=u+2*(f-u)/3,k=d+2*(y-d)/3;t.push({key:"C",data:[m,C,x,k,u,d]}),n=f,l=y,i=u,s=d;break}case"Q":{const[u,d,f,y]=h,m=i+2*(u-i)/3,C=s+2*(d-s)/3,x=f+2*(u-f)/3,k=y+2*(d-y)/3;t.push({key:"C",data:[m,C,x,k,f,y]}),n=u,l=d,i=f,s=y;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],y=h[3],m=h[4],C=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,s,C,x,C,x]}),i=C,s=x):(i!==C||s!==x)&&(Ef(i,s,C,x,u,d,f,y,m).forEach(function(k){t.push({key:"C",data:k})}),i=C,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Ai(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Ef(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],f=0,y=0,m=0,C=0;if(c)[f,y,m,C]=c;else{[e,t]=Ai(e,t,-h),[r,i]=Ai(r,i,-h);const Y=(e-r)/2,A=(t-i)/2;let E=Y*Y/(s*s)+A*A/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const B=s*s,P=a*a,$=B*P-B*A*A-P*Y*Y,N=B*A*A+P*Y*Y,V=(n===l?-1:1)*Math.sqrt(Math.abs($/N));m=V*s*A/a+(e+r)/2,C=V*-a*Y/s+(t+i)/2,f=Math.asin(parseFloat(((t-C)/a).toFixed(9))),y=Math.asin(parseFloat(((i-C)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(y=Math.PI-y),f<0&&(f=2*Math.PI+f),y<0&&(y=2*Math.PI+y),l&&f>y&&(f-=2*Math.PI),!l&&y>f&&(y-=2*Math.PI)}let x=y-f;if(Math.abs(x)>120*Math.PI/180){const Y=y,A=r,E=i;y=l&&y>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Ef(r=m+s*Math.cos(y),i=C+a*Math.sin(y),A,E,s,a,o,0,l,[y,Y,m,C])}x=y-f;const k=Math.cos(f),w=Math.sin(f),T=Math.cos(y),_=Math.sin(y),v=Math.tan(x/4),F=4/3*s*v,L=4/3*a*v,U=[e,t],W=[e+F*w,t-L*k],q=[r+F*_,i-L*T],rt=[r,i];if(W[0]=2*U[0]-W[0],W[1]=2*U[1]-W[1],c)return[W,q,rt].concat(d);{d=[W,q,rt].concat(d);const Y=[];for(let A=0;A<d.length;A+=3){const E=Ai(d[A][0],d[A][1],h),B=Ai(d[A+1][0],d[A+1][1],h),P=Ai(d[A+2][0],d[A+2][1],h);Y.push([E[0],E[1],B[0],B[1],P[0],P[1]])}return Y}}const O2={randOffset:function(e,t){return St(e,t)},randOffsetWithRange:function(e,t,r){return ha(e,t,r)},ellipse:function(e,t,r,i,s){const a=Of(r,i,s);return an(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return lr(e,t,r,i,s,!0)}};function $f(e,t,r,i,s){return{type:"path",ops:lr(e,t,r,i,s)}}function Ns(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...lr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?$f(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function P2(e,t,r,i,s){return function(a,o){return Ns(a,!0,o)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function zh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=_s(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:_s(r[0],1.5*(1+.22*t.roughness),jh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=_s(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:_s(o,1.5*(1+.22*t.roughness),jh(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Of(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=St(o*l,r),n+=St(n*l,r),{increment:a,rx:o,ry:n}}function an(e,t,r,i){const[s,a]=Uh(i.increment,e,t,i.rx,i.ry,1,i.increment*ha(.1,ha(.4,1,r),r),r);let o=ca(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Uh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ca(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Hh(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=St(.01*u,l),d+=St(.01*d,l);let f=s,y=a;for(;f<0;)f+=2*Math.PI,y+=2*Math.PI;y-f>2*Math.PI&&(f=0,y=2*Math.PI);const m=2*Math.PI/l.curveStepCount,C=Math.min(m/2,(y-f)/2),x=Gh(C,c,h,u,d,f,y,1,l);if(!l.disableMultiStroke){const k=Gh(C,c,h,u,d,f,y,1.5,l);x.push(...k)}return o&&(n?x.push(...lr(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...lr(c,h,c+u*Math.cos(y),h+d*Math.sin(y),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function Yh(e,t){const r=Af(Mf(hl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...lr(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,d,f]=n;i.push(...D2(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...lr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function Ka(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+St(s,t),i[0][1]+St(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+St(s,t),i[o][1]+St(s,t)]})}}return{type:"fillPath",ops:r}}function Rr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!ne[s])switch(s){case"zigzag":ne[s]||(ne[s]=new v2(i));break;case"cross-hatch":ne[s]||(ne[s]=new L2(i));break;case"dots":ne[s]||(ne[s]=new F2(i));break;case"dashed":ne[s]||(ne[s]=new M2(i));break;case"zigzag-line":ne[s]||(ne[s]=new A2(i));break;default:s="hachure",ne[s]||(ne[s]=new ll(i))}return ne[s]}(t,O2).fillPolygons(e,t)}function jh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Pf(e){return e.randomizer||(e.randomizer=new E2(e.seed||0)),e.randomizer.next()}function ha(e,t,r,i=1){return r.roughness*i*(Pf(r)*(t-e)+e)}function St(e,t,r=1){return ha(-e,e,t,r)}function lr(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=on(e,t,r,i,s,!0,!1);if(o)return n;const l=on(e,t,r,i,s,!0,!0);return n.concat(l)}function on(e,t,r,i,s,a,o){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=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,d=.2+.2*Pf(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=St(f,s,c),y=St(y,s,c);const m=[],C=()=>St(u,s,c),x=()=>St(h,s,c),k=s.preserveVertices;return o?m.push({op:"move",data:[e+(k?0:C()),t+(k?0:C())]}):m.push({op:"move",data:[e+(k?0:St(h,s,c)),t+(k?0:St(h,s,c))]}),o?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),y+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),y+t+2*(i-t)*d+C(),r+(k?0:C()),i+(k?0:C())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),y+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),y+t+2*(i-t)*d+x(),r+(k?0:x()),i+(k?0:x())]}),m}function _s(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+St(t,r),e[0][1]+St(t,r)]),i.push([e[0][0]+St(t,r),e[0][1]+St(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+St(t,r),e[s][1]+St(t,r)]),s===e.length-1&&i.push([e[s][0]+St(t,r),e[s][1]+St(t,r)]);return ca(i,null,r)}function ca(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...on(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Uh(e,t,r,i,s,a,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=St(.5,n)-Math.PI/2;c.push([St(a,n)+t+.9*i*Math.cos(h-e),St(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[St(a,n)+t+i*Math.cos(d),St(a,n)+r+s*Math.sin(d)];l.push(f),c.push(f)}c.push([St(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),St(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([St(a,n)+t+.98*i*Math.cos(h+o),St(a,n)+r+.98*s*Math.sin(h+o)]),c.push([St(a,n)+t+.9*i*Math.cos(h+.5*o),St(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function Gh(e,t,r,i,s,a,o,n,l){const c=a+St(.1,l),h=[];h.push([St(n,l)+t+.9*i*Math.cos(c-e),St(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([St(n,l)+t+i*Math.cos(u),St(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),ca(h,null,l)}function D2(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(d?0:St(c[0],n)),o[1]+(d?0:St(c[0],n))]}),h=d?[s,a]:[s+St(c[f],n),a+St(c[f],n)],l.push({op:"bcurveTo",data:[e+St(c[f],n),t+St(c[f],n),r+St(c[f],n),i+St(c[f],n),h[0],h[1]]});return l}function Ei(e){return[...e]}function Xh(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(Ei(e[0]),Ei(e[1]),Ei(e[2]),Ei(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Ei(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function Ws(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function I2(e,t,r){const i=Ws(t,r);if(i===0)return Ws(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Ws(e,gr(t,r,s))}function gr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function nn(e,t,r,i){const s=i||[];if(function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],d=n[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let y=3*h[1]-2*c[1]-d[1];y*=y;let m=3*u[0]-2*d[0]-c[0];m*=m;let C=3*u[1]-2*d[1]-c[1];return C*=C,f<m&&(f=m),y<C&&(y=C),f+y}(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(Ws(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=gr(l,c,.5),f=gr(c,h,.5),y=gr(h,u,.5),m=gr(d,f,.5),C=gr(f,y,.5),x=gr(m,C,.5);nn([l,d,m,x],0,r,s),nn([x,C,y,u],0,r,s)}var a,o;return s}function R2(e,t){return ua(e,0,e.length,t)}function ua(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=I2(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ua(e,t,c+1,i,a),ua(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function Qa(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)nn(e,3*a,t,i);return r&&r>0?ua(i,0,i.length,r):i}const ue="none";class da{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[$f(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=P2(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(Ka([c],o)):n.push(Rr([c],o))}return o.stroke!==ue&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Of(i,s,o),c=an(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=an(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Rr([c.estimatedPoints],o));return o.stroke!==ue&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ns(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=Hh(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Hh(t,r,i,s,a,o,!0,!1,d);f.type="fillPath",h.push(f)}else h.push(function(d,f,y,m,C,x,k){const w=d,T=f;let _=Math.abs(y/2),v=Math.abs(m/2);_+=St(.01*_,k),v+=St(.01*v,k);let F=C,L=x;for(;F<0;)F+=2*Math.PI,L+=2*Math.PI;L-F>2*Math.PI&&(F=0,L=2*Math.PI);const U=(L-F)/k.curveStepCount,W=[];for(let q=F;q<=L;q+=U)W.push([w+_*Math.cos(q),T+v*Math.sin(q)]);return W.push([w+_*Math.cos(L),T+v*Math.sin(L)]),W.push([w,T]),Rr([W],k)}(t,r,i,s,a,o,c));return c.stroke!==ue&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=zh(t,i);if(i.fill&&i.fill!==ue)if(i.fillStyle==="solid"){const o=zh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...Qa(Xh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...Qa(Xh(c),10,(1+i.roughness)/2))}o.length&&s.push(Rr([o],i))}return i.stroke!==ue&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ns(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Ka([t],i)):s.push(Rr([t],i))),i.stroke!==ue&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==ue,o=i.stroke!==ue,n=!!(i.simplification&&i.simplification<1),l=function(h,u,d){const f=Af(Mf(hl(h))),y=[];let m=[],C=[0,0],x=[];const k=()=>{x.length>=4&&m.push(...Qa(x,u)),x=[]},w=()=>{k(),m.length&&(y.push(m),m=[])};for(const{key:_,data:v}of f)switch(_){case"M":w(),C=[v[0],v[1]],m.push(C);break;case"L":k(),m.push([v[0],v[1]]);break;case"C":if(!x.length){const F=m.length?m[m.length-1]:C;x.push([F[0],F[1]])}x.push([v[0],v[1]]),x.push([v[2],v[3]]),x.push([v[4],v[5]]);break;case"Z":k(),m.push([C[0],C[1]])}if(w(),!d)return y;const T=[];for(const _ of y){const v=R2(_,d);v.length&&T.push(v)}return T}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Yh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Yh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Ka(l,i));else s.push(Rr(l,i));return o&&(n?l.forEach(h=>{s.push(Ns(h,!1,i))}):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:ue};break;case"fillPath":o={d:this.opsToPath(a),stroke:ue,strokeWidth:0,fill:i.fill||ue};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||ue,strokeWidth:i,fill:ue}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class q2{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(n=>+n.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 Bs="http://www.w3.org/2000/svg";class N2{constructor(t,r){this.svg=t,this.gen=new da(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Bs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Bs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Bs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Bs,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,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 nt={canvas:(e,t)=>new q2(e,t),svg:(e,t)=>new N2(e,t),generator:e=>new da(e),newSeed:()=>da.newSeed()},W2=1,z2=3;async function cl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ul(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const o=Et().fontSize?Et().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=vu.fontSize]=Sa(o),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}g(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}g(cl,"configureLabelImages");function ul(e){var r;return e.nodeType===z2?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==W2||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ul)}g(ul,"hasTextBesidesImages");var Vh=3,H2=32,Y2=g(async(e,t,r)=>{var x,k,w;const i=Et(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Xt(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((x=t.label)==null?void 0:x[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(T=>({text:T,cssClass:"c4-descr"}))].filter(T=>T.text),l=t.width?Math.max(t.width-2*(t.padding??0),H2):((k=Et().flowchart)==null?void 0:k.wrappingWidth)??200,h=((w=i.c4)==null?void 0:w.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async T=>{const _=a.append("g").attr("class",T.cssClass),v=await ve(_,pe(nr(T.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Ft(v).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Ft(v).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:_,box:_.node().getBBox()}})),d=Math.max(...u.map(({box:T})=>T.width),0);let f=0;for(const{el:T,box:_}of u)T.attr("transform",`translate(${d/2-_.x-_.width/2}, ${f-_.y})`),f+=_.height+Vh;const y=u.length>0?f-Vh:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-d/2}, ${-y/2})`);const m=a.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:m,halfPadding:C,label:a}},"c4LabelHelper"),mt=g(async(e,t,r)=>{var f,y;if(t.stereotype!==void 0)return Y2(e,t,r);let i;const s=t.useHtmlLabels||qe((f=Et())==null?void 0:f.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Xt(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 ve(o,pe(nr(n),Et()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((y=Et().flowchart)==null?void 0:y.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Et()),u=((t==null?void 0:t.padding)??0)/2;let d;if(s){const m=h.children[0],C=Ft(h);await cl(m),d=await Tr.measure(()=>m.getBoundingClientRect()),C.attr("width",d.width),C.attr("height",d.height)}else d=await Tr.measure(()=>h.getBBox());return s?o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):o.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:u,label:o}},"labelHelper"),Ja=g(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??se(Et()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ve(s,pe(nr(t),Et()),{useHtmlLabels:i,width:r.width||((c=(l=Et())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2;let n;if(se(Et())){const h=a.children[0],u=Ft(a);n=await Tr.measure(()=>h.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await Tr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),ct=g((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),xt=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Dt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(Dt,"createPathFromPoints");function hr(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const y=f/50,m=e+y*l,C=d+s*Math.sin(u*(m-e));o.push({x:m,y:C})}return o}g(hr,"generateFullSineWavePoints");function $e(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:-f,y:-y})}return o}g($e,"generateCirclePoints");function ln(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=g((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"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}g(ln,"mergePaths");var j2=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),Fr=j2,me=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),U2=g(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=Et(),n=se(o);return await ve(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ir=U2;function Df(e,t){return e.intersect(t)}g(Df,"intersectNode");var G2=Df;function If(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}g(If,"intersectEllipse");var Rf=If;function qf(e,t,r){return Rf(e,t,t,r)}g(qf,"intersectCircle");var X2=qf;function Nf(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&hn(n,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,y=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(y)<c&&hn(f,y))return;const m=s*u-h*a;if(m===0)return;const C=Math.abs(m/2);let x=a*d-u*o;const k=x<0?(x-C)/m:(x+C)/m;x=h*o-s*d;const w=x<0?(x-C)/m:(x+C)/m;return{x:k,y:w}}}g(Nf,"intersectLine");function hn(e,t){return e*t>0}g(hn,"sameSign");var V2=Nf;function Wf(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=V2(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,y=Math.sqrt(d*d+f*f),m=u.x-r.x,C=u.y-r.y,x=Math.sqrt(m*m+C*C);return y<x?-1:y===x?0:1}),a[0]):e}g(Wf,"intersectPolygon");var Z2=Wf,st={node:G2,circle:X2,ellipse:Rf,polygon:Z2,rect:Fr};function zf(e,t){const{labelStyles:r}=dt(t);t.labelStyle=r;const i=xt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=nt.svg(a),c=ot(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Xt(n)),ct(t,u),t.intersect=function(d){return I.info("Circle intersect",t,o,d),st.circle(t,o,d)},a}g(zf,"anchor");function cn(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/s,y=d/a,m=Math.sqrt(f**2+y**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const C=Math.sqrt(1-m**2),x=l+C*a*Math.sin(h)*(o?-1:1),k=c-C*s*Math.cos(h)*(o?-1:1),w=Math.atan2((t-k)/a,(e-x)/s);let _=Math.atan2((i-k)/a,(r-x)/s)-w;o&&_<0&&(_+=2*Math.PI),!o&&_>0&&(_-=2*Math.PI);const v=[];for(let F=0;F<20;F++){const L=F/19,U=w+L*_,W=x+s*Math.cos(U),q=k+a*Math.sin(U);v.push({x:W,y:q})}return v}g(cn,"generateArcPoints");function Hf(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Hf,"calculateArcSagitta");async function Yf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=g(U=>U+o,"calcTotalHeight"),l=g(U=>{const W=U/2;return[W/(2.5+U/50),W]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await mt(e,t,xt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[d,f]=l(u),y=Hf(u,d,f),C=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+y-y,x=u,{cssStyles:k}=t,w=[{x:C/2,y:-x/2},{x:-C/2,y:-x/2},...cn(-C/2,-x/2,-C/2,x/2,d,f,!1),{x:C/2,y:x/2},...cn(C/2,x/2,C/2,-x/2,d,f,!0)],T=nt.svg(c),_=ot(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=Dt(w),F=T.path(v,_),L=c.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d/2}, 0)`),ct(t,L),t.intersect=function(U){return st.polygon(t,w,U)},c}g(Yf,"bowTieRect");async function jf(e,t,{config:{themeVariables:r}}){var F;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await mt(e,t,xt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(o.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),d=Math.max(o.height+c*2+u,t.height??0),f=-d/2+u,y=d/2,m=h*.72,C=[`M${-h/2},${f}`,`L${-m/2},${y}`,`A${m/2},${u} 0 0 0 ${m/2},${y}`,`L${h/2},${f}`,`A${h/2},${u} 0 0 0 ${-h/2},${f}`,"Z"].join(" "),{cssStyles:x}=t,k=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const U=nt.svg(a).path(C,ot(t,{}));(F=k.node())==null||F.appendChild(U),x&&k.attr("style",x)}else k.append("path").attr("d",C).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),ct(t,k);const w=f+(y-f)/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${w-o.height/2-(o.y-(o.top??0))})`);const T=12,_=g((L,U,W)=>Array.from({length:T+1},(q,rt)=>{const Y=Math.PI-rt*Math.PI/T;return{x:L*Math.cos(Y),y:U+W*u*Math.sin(Y)}}),"arc"),v=[..._(h/2,f,-1),..._(m/2,y,1).reverse()];return t.intersect=function(L){return st.polygon(t,v,L)},a}g(jf,"bucket");var Zh=20,Kh=8,K2=80,to=8;async function Uf(e,t){const{themeVariables:r}=Et(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:a}=dt(t),{shapeSvg:o,bbox:n}=await mt(e,t,xt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,K2,(t==null?void 0:t.width)??0),u=Math.max(c+Kh+Zh+l*2,(t==null?void 0:t.height)??0),d=-h/2,f=-u/2,y=-28/2,m=o.select(".label");m&&(t.useHtmlLabels??se(Et())?m.attr("transform",`translate(${-n.width/2}, ${-n.height/2+y})`):m.attr("transform",`translate(0, ${-n.height/2+y})`));let C;if(t.look==="handDrawn"){const _=nt.svg(o),v=ot(t,{fill:i,stroke:s,fillStyle:"solid"}),F=_.path(me(d,f,h,u,to),v);C=o.insert(()=>F,":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",Xt(t.cssStyles))}else C=o.insert("rect",":first-child"),C.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",to).attr("ry",to).attr("x",d).attr("y",f).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const x=f+l+c+Kh;o.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",x).attr("x2",d+h-8).attr("y2",x).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=x+Zh/2,w=2.5,T=10;for(let _=-1;_<=1;_++)o.append("circle").attr("class","collapsed-indicator").attr("cx",_*T).attr("cy",k).attr("r",w).attr("fill",s);return ct(t,C),t.calcIntersect=function(_,v){return st.rect(_,v)},t.intersect=function(_){return st.rect(t,_)},o}g(Uf,"collapsedGroup");function We(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(We,"insertPolygonShape");var Q2=["right","left","up","down"],dl="point",J2=g(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),tw=g(e=>Q2.filter(t=>e.has(t)).join("|")||dl,"getDirectionKey"),Qh={"right|left|up|down":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":g(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":g(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":g(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":g(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":g(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[dl]:()=>[{x:0,y:0}]},ew=g((e,t,r,i)=>{const s=J2(e),a=(r.padding??0)/2,o=t.height+4*a,n=o/2,l=i??t.width+2*n+2*a,c=tw(s);return(Qh[c]??Qh[dl])({height:o,midpoint:n,padding:a,width:l})},"getArrowPoints");async function Gf(e,t){const r=t,{shapeSvg:i,bbox:s}=await mt(e,r,xt(r)),a=r.padding??0,o=s.height+2*a,n=o/2,l=s.width+2*n+a,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,d=ew(r.directions??[],s,r,u),f=We(i,u,o,d);return f.attr("style",r.style??null),ct(r,f),r.intersect=function(y){return st.polygon(r,d,y)},i}g(Gf,"block_arrow");async function Xf(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await mt(e,t,xt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,d=Math.max(o.width+c*2,t.width??0,90),f=Math.max(o.height+c*2+h,t.height??0),y=-f/2,{cssStyles:m}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=nt.svg(a).path(me(-d/2,y,d,f,u),ot(t,{}));(k=C.node())==null||k.appendChild(T),m&&C.attr("style",m)}else C.append("rect").attr("x",-d/2).attr("y",y).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);C.append("line").attr("x1",-d/2).attr("y1",y+h).attr("x2",d/2).attr("y2",y+h).attr("style",`stroke:${l};stroke-width:1px`);for(let w=0;w<3;w++)C.append("circle").attr("cx",-d/2+12+w*9).attr("cy",y+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);C.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",y+4).attr("width",Math.max(d-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),ct(t,C);const x=y+h+(f-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(w){return st.rect(t,w)},a}g(Xf,"browser");var vs=12;async function Vf(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+vs),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,d=c,f=-h,y=0,m=[{x:u+vs,y:f},{x:d,y:f},{x:d,y},{x:u,y},{x:u,y:f+vs},{x:u+vs,y:f}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=nt.svg(n),w=ot(t,{}),T=Dt(m),_=k.path(T,w);C=n.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&C.attr("style",x)}else C=We(n,c,h,m);return i&&C.attr("style",i),ct(t,C),t.intersect=function(k){return st.polygon(t,m,k)},n}g(Vf,"card");function Zf(e,t){const{nodeStyles:r}=dt(t);t.label="";const i=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=nt.svg(i),l=ot(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Dt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return st.polygon(t,o,d)},i}g(Zf,"choice");async function fl(e,t,r){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await mt(e,t,xt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=nt.svg(a),y=ot(t,{}),m=f.circle(0,0,h*2,y);u=a.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Xt(d))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return ct(t,u),t.calcIntersect=function(f,y){const m=f.width/2;return st.circle(f,m,y)},t.intersect=function(f){return I.info("Circle intersect",t,h,f),st.circle(t,h,f)},a}g(fl,"circle");async function Kf(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:o}=await mt(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:a.width+l,h=r.positioned?r.height??0:a.height+l,u=r.positioned?-c/2:-a.width/2-o,d=r.positioned?-h/2:-a.height/2-o;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",c).attr("height",h),ct(r,n),r.intersect=function(f){return st.rect(r,f)},s}g(Kf,"composite");async function Qf(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await mt(e,t,xt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,d=Math.max(o.width+c*2,t.width??0,90),f=Math.max(o.height+c*2+h,t.height??0),y=-f/2,{cssStyles:m}=t,C=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=nt.svg(a).path(me(-d/2,y,d,f,u),ot(t,{}));(k=C.node())==null||k.appendChild(T),m&&C.attr("style",m)}else C.append("rect").attr("x",-d/2).attr("y",y).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);C.append("text").attr("x",-d/2+12).attr("y",y+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),ct(t,C);const x=y+h+(f-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(w){return st.rect(t,w)},a}g(Qf,"consoleWindow");function Jf(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
199
+ M ${s.x},${s.y} L ${o.x},${o.y}`}g(Jf,"createLine");function tg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=nt.svg(s),l=ot(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=Jf(a),u=n.path(h,l),d=s.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),ct(t,d),t.intersect=function(f){return I.info("crossedCircle intersect",t,{radius:a,point:f}),st.circle(t,a,f)},s}g(tg,"crossedCircle");function Ye(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:-f,y:-y})}return o}g(Ye,"generateCirclePoints");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...Ye(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ye(c/2+u*2,-u,u,20,-180,-270),...Ye(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ye(c/2,h/2,u,20,0,90)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ye(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ye(c/2+c*.1,-u,u,20,-180,-270),...Ye(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ye(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],m=nt.svg(s),C=ot(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Dt(f).replace("Z",""),w=m.path(k,C),T=Dt(y),_=m.path(T,{...C}),v=s.insert("g",":first-child");return v.insert(()=>_,":first-child").attr("stroke-opacity",0),v.insert(()=>w,":first-child"),v.attr("class","text"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ct(t,v),t.intersect=function(F){return st.polygon(t,y,F)},s}g(eg,"curlyBraceLeft");function je(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:f,y})}return o}g(je,"generateCirclePoints");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90)],y=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...je(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...je(c/2+u*2,-u,u,20,-180,-270),...je(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...je(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],m=nt.svg(s),C=ot(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Dt(f).replace("Z",""),w=m.path(k,C),T=Dt(y),_=m.path(T,{...C}),v=s.insert("g",":first-child");return v.insert(()=>_,":first-child").attr("stroke-opacity",0),v.insert(()=>w,":first-child"),v.attr("class","text"),d&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ct(t,v),t.intersect=function(F){return st.polygon(t,y,F)},s}g(rg,"curlyBraceRight");function Qt(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*h,f=e+r*Math.cos(d),y=t+r*Math.sin(d);o.push({x:-f,y:-y})}return o}g(Qt,"generateCirclePoints");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,f=[...Qt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Qt(c/2+u*2,-u,u,20,-180,-270),...Qt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Qt(c/2,h/2,u,20,0,90)],y=[...Qt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Qt(-c/2-u/2,-u,u,20,0,90),...Qt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Qt(-c/2+u+u/2,h/2,u,30,-180,-270)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Qt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Qt(c/2+u*2,-u,u,20,-180,-270),...Qt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Qt(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...Qt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Qt(-c/2-u/2,-u,u,20,0,90),...Qt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Qt(-c/2+u+u/2,h/2,u,30,-180,-270)],C=nt.svg(s),x=ot(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const w=Dt(f).replace("Z",""),T=C.path(w,x),v=Dt(y).replace("Z",""),F=C.path(v,x),L=Dt(m),U=C.path(L,{...x}),W=s.insert("g",":first-child");return W.insert(()=>U,":first-child").attr("stroke-opacity",0),W.insert(()=>T,":first-child"),W.insert(()=>F,":first-child"),W.attr("class","text"),d&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ct(t,W),t.intersect=function(q){return st.polygon(t,m,q)},s}g(ig,"curlyBraces");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await mt(e,t,xt(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),d=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),f=d/2,{cssStyles:y}=t,m=nt.svg(c),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=u,k=d,w=x-f,T=k/4,_=[{x:w,y:0},{x:T,y:0},{x:0,y:k/2},{x:T,y:k},{x:w,y:k},...$e(-w,-k/2,f,50,270,90)],v=Dt(_),F=m.path(v,C),L=c.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-u/2}, ${-d/2})`),ct(t,L),t.intersect=function(U){return st.polygon(t,_,U)},c}g(sg,"curvedTrapezoid");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.padding??20,l=Math.max(a.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(a.height+n*2,t.height?t.height-(2*c-h):0),d=Math.min(l*.177,u*.45),f=u+2*c-h,y=-f/2,m=y+2*c-h,C=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:x}=t;if(t.look==="handDrawn"){const L=nt.svg(s),U=ot(t,{}),W=L.path(me(-l/2,m,l,u,d),U),q=L.circle(0,y+c,c*2,U);C.insert(()=>q,":first-child"),C.insert(()=>W,":first-child"),x&&C.attr("style",x)}else C.append("rect").attr("x",-l/2).attr("y",m).attr("width",l).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),C.append("circle").attr("cx",0).attr("cy",y+c).attr("r",c).attr("style",i);ct(t,C);const k=m+u/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const w=y+c,T=Math.asin(Math.min(1,(m-w)/c))*180/Math.PI,F=[...$e(0,-w,c,24,180+T,-T),...$e(-(-l/2+d),-(m+d),d,12,90,0),...$e(-(-l/2+d),-(f/2-d),d,12,360,270),...$e(-(l/2-d),-(f/2-d),d,12,270,180),...$e(-(l/2-d),-(m+d),d,12,180,90)];return t.intersect=function(L){return st.polygon(t,F,L)},s}g(ag,"person");var rw=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),iw=g((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),sw=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Jh=8,tc=8;async function og(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-o,t.width<tc&&(t.width=tc)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-a-k*3,t.height<Jh&&(t.height=Jh)}const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,xt(t)),u=Math.max(t.width??0,c.width)+o,d=u/2,f=d/(2.5+u/50),y=Math.max(t.height??0,c.height)+a+f;let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=nt.svg(l),k=iw(0,0,u,y,d,f),w=sw(0,f,u,y,d,f),T=ot(t,{}),_=x.path(k,T),v=x.path(w,ot(t,{fill:"none"}));m=l.insert(()=>v,":first-child"),m=l.insert(()=>_,":first-child"),m.attr("class","basic label-container"),C&&m.attr("style",C)}else{const x=rw(0,0,u,y,d,f);m=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Xt(C)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-u/2}, ${-(y/2+f)})`),ct(t,m),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(x){const k=st.rect(t,x),w=k.x-(t.x??0);if(d!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-w*w/(d*d));T>0&&(T=Math.sqrt(T)),T=f-T,x.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},l}g(og,"cylinder");async function mi(e,t,r){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await mt(e,t,xt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=nt.svg(a),C=ot(t,{}),x=d||f?m.path(me(c,h,n,l,d||0),C):m.rectangle(c,h,n,l,C);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Xt(y))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Xt(d)).attr("ry",Xt(f)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(m,C){return st.rect(m,C)},t.intersect=function(m){return st.rect(t,m)},a}g(mi,"drawRect");async function ng(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await mi(e,t,l);if(t.look==="handDrawn"){const f=nt.svg(c),y=ot(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),C=m.node();if(!C)return c;let x=null;if(C instanceof SVGGraphicsElement)x=C.getBBox();else return c;return c.insert(()=>f.line(x.x,x.y,x.x+x.width,x.y,y),".basic.label-container g.label"),c.insert(()=>f.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,y),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,d=(Number(h.attr("height"))||n)??0;return u>0&&d>0&&h.attr("stroke-dasharray",`${u} ${d}`),c}g(ng,"datastore");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=n.width+s,h=n.height+a,u=h*.2,d=-c/2,f=-h/2-u/2,{cssStyles:y}=t,m=nt.svg(o),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],k=m.polygon(x.map(T=>[T.x,T.y]),C),w=o.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+u+(t.padding??0)/2-(n.y-(n.top??0))})`),ct(t,w),t.intersect=function(T){return st.rect(t,T)},o}g(lg,"dividedRectangle");async function hg(e,t){var f,y;const{labelStyles:r,nodeStyles:i}=dt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=nt.svg(n),C=ot(t,{roughness:.2,strokeWidth:2.5}),x=ot(t,{roughness:.2,strokeWidth:1.5}),k=m.circle(0,0,c*2,C),w=m.circle(0,0,h*2,x);u=n.insert("g",":first-child"),u.attr("class",Xt(t.cssClasses)).attr("style",Xt(d)),(f=u.node())==null||f.appendChild(k),(y=u.node())==null||y.appendChild(w)}else{u=n.insert("g",":first-child");const m=u.insert("circle",":first-child"),C=u.insert("circle");u.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return ct(t,u),t.intersect=function(m){return I.info("DoubleCircle intersect",t,c,m),st.circle(t,c,m)},n}g(hg,"doublecircle");function cg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=nt.svg(a),{nodeBorder:c}=r,h=ot(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),ct(t,d),t.intersect=function(f){return I.info("filledCircle intersect",t,{radius:o,point:f}),st.circle(t,o,f)},a}g(cg,"filledCircle");var ec=10,rc=10;async function ug(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<ec&&(t.height=ec),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<rc&&(t.width=rc));const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,d=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:f}=t,y=nt.svg(o),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Dt(d),x=y.path(C,m),k=o.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,ct(t,k),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(w){return I.info("Triangle intersect",t,d,w),st.polygon(t,d,w)},o}g(ug,"flippedTriangle");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=t.padding??12,l=Math.max(a.width+n*2,t.width??0,90),c=a.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),d=u-h,f=Math.max(l*.38,28),y=-u/2,m=[{x:-l/2,y},{x:-l/2+f,y},{x:-l/2+f,y:y+h},{x:l/2,y:y+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],C=[`M${m[0].x},${m[0].y}`,...m.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:x}=t;let k;if(t.look==="handDrawn"){const _=nt.svg(s).path(C,ot(t,{}));k=s.insert(()=>_,":first-child").attr("class","basic label-container"),x&&k.attr("style",x)}else k=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?ct(t,k):ct(t,k,{width:l,height:u});const w=y+h+d/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${w-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(T){return st.polygon(t,m,T)},s}g(dg,"folder");function fg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=dt(t);t.label="";const o=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,d=nt.svg(o),f=ot(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const y=d.rectangle(h,u,l,c,f),m=o.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),ct(t,m);const C=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=C/2||0,t.height+=C/2||0),t.intersect=function(x){return st.rect(t,x)},o}g(fg,"forkJoin");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,d=u/2,{cssStyles:f}=t,y=nt.svg(l),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-h/2,y:-u/2},{x:h/2-d,y:-u/2},...$e(-h/2+d,0,d,50,90,270),{x:h/2-d,y:u/2},{x:-h/2,y:u/2}],x=Dt(C),k=y.path(x,m),w=l.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),ct(t,w),t.intersect=function(T){return I.info("Pill intersect",t,{radius:d,point:T}),st.polygon(t,C,T)},l}g(gg,"halfRoundedRectangle");var aw=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const w=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*w-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await mt(e,t,xt(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,f=d/s,y=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*f+c,m=[{x:f,y:0},{x:y-f,y:0},{x:y,y:-d/2},{x:y-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const k=nt.svg(h),w=ot(t,{}),T=aw(0,0,y,d,f),_=k.path(T,w);C=h.insert(()=>_,":first-child").attr("transform",`translate(${-y/2}, ${d/2})`),x&&C.attr("style",x)}else C=We(h,y,d,m);return i&&C.attr("style",i),t.width=y,t.height=d,ct(t,C),t.intersect=function(k){return st.polygon(t,m,k)},h}g(pg,"hexagon");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await mt(e,t,xt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=nt.svg(s),c=ot(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=Dt(h),d=l.path(u,c),f=s.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-o/2})`),ct(t,f),t.intersect=function(y){return I.info("Pill intersect",t,{points:h}),st.polygon(t,h,y)},s}g(yg,"hourglass");async function mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),d=t.pos==="t",f=n,y=n,{nodeBorder:m}=r,{stylesMap:C}=yi(t),x=-y/2,k=-f/2,w=t.label?8:0,T=nt.svg(c),_=ot(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=T.rectangle(x,k,y,f,_),F=Math.max(y,h.width),L=f+h.height+w,U=T.rectangle(-F/2,-L/2,F,L,{..._,fill:"transparent",stroke:"none"}),W=c.insert(()=>v,":first-child"),q=c.insert(()=>U);if(t.icon){const rt=c.append("g");rt.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const Y=rt.node().getBBox(),A=Y.width,E=Y.height,B=Y.x,P=Y.y;rt.attr("transform",`translate(${-A/2-B},${d?h.height/2+w/2-E/2-P:-h.height/2-w/2-E/2-P})`),rt.attr("style",`color: ${C.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-L/2:L/2-h.height})`),W.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),ct(t,q),t.intersect=function(rt){if(I.info("iconSquare intersect",t,rt),!t.label)return st.rect(t,rt);const Y=t.x??0,A=t.y??0,E=t.height??0;let B=[];return d?B=[{x:Y-h.width/2,y:A-E/2},{x:Y+h.width/2,y:A-E/2},{x:Y+h.width/2,y:A-E/2+h.height+w},{x:Y+y/2,y:A-E/2+h.height+w},{x:Y+y/2,y:A+E/2},{x:Y-y/2,y:A+E/2},{x:Y-y/2,y:A-E/2+h.height+w},{x:Y-h.width/2,y:A-E/2+h.height+w}]:B=[{x:Y-y/2,y:A-E/2},{x:Y+y/2,y:A-E/2},{x:Y+y/2,y:A-E/2+f},{x:Y+h.width/2,y:A-E/2+f},{x:Y+h.width/2/2,y:A+E/2},{x:Y-h.width/2,y:A+E/2},{x:Y-h.width/2,y:A-E/2+f},{x:Y-y/2,y:A-E/2+f}],st.polygon(t,B,rt)},c}g(mg,"icon");async function xg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),d=20,f=t.label?8:0,y=t.pos==="t",{nodeBorder:m,mainBkg:C}=r,{stylesMap:x}=yi(t),k=nt.svg(c),w=ot(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=x.get("fill");w.stroke=T??C;const _=c.append("g");t.icon&&_.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=_.node().getBBox(),F=v.width,L=v.height,U=v.x,W=v.y,q=Math.max(F,L)*Math.SQRT2+d*2,rt=k.circle(0,0,q,w),Y=Math.max(q,h.width),A=q+h.height+f,E=k.rectangle(-Y/2,-A/2,Y,A,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>rt,":first-child"),P=c.insert(()=>E);return _.attr("transform",`translate(${-F/2-U},${y?h.height/2+f/2-L/2-W:-h.height/2-f/2-L/2-W})`),_.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${y?-A/2:A/2-h.height})`),B.attr("transform",`translate(0,${y?h.height/2+f/2:-h.height/2-f/2})`),ct(t,P),t.intersect=function($){return I.info("iconSquare intersect",t,$),st.rect(t,$)},c}g(xg,"iconCircle");async function Cg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await mt(e,t,"icon-shape default"),f=t.pos==="t",y=n+u*2,m=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=yi(t),w=-m/2,T=-y/2,_=t.label?8:0,v=nt.svg(c),F=ot(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const L=k.get("fill");F.stroke=L??x;const U=v.path(me(w,T,m,y,5),F),W=Math.max(m,h.width),q=y+h.height+_,rt=v.rectangle(-W/2,-q/2,W,q,{...F,fill:"transparent",stroke:"none"}),Y=c.insert(()=>U,":first-child").attr("class","icon-shape2"),A=c.insert(()=>rt);if(t.icon){const E=c.append("g");E.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=E.node().getBBox(),P=B.width,$=B.height,N=B.x,V=B.y;E.attr("transform",`translate(${-P/2-N},${f?h.height/2+_/2-$/2-V:-h.height/2-_/2-$/2-V})`),E.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),ct(t,A),t.intersect=function(E){if(I.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const B=t.x??0,P=t.y??0,$=t.height??0;let N=[];return f?N=[{x:B-h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2+h.height+_},{x:B+m/2,y:P-$/2+h.height+_},{x:B+m/2,y:P+$/2},{x:B-m/2,y:P+$/2},{x:B-m/2,y:P-$/2+h.height+_},{x:B-h.width/2,y:P-$/2+h.height+_}]:N=[{x:B-m/2,y:P-$/2},{x:B+m/2,y:P-$/2},{x:B+m/2,y:P-$/2+y},{x:B+h.width/2,y:P-$/2+y},{x:B+h.width/2/2,y:P+$/2},{x:B-h.width/2,y:P+$/2},{x:B-h.width/2,y:P-$/2+y},{x:B-m/2,y:P-$/2+y}],st.polygon(t,N,E)},c}g(Cg,"iconRounded");async function bg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=dt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await mt(e,t,"icon-shape default"),f=t.pos==="t",y=n+u*2,m=n+u*2,{nodeBorder:C,mainBkg:x}=r,{stylesMap:k}=yi(t),w=-m/2,T=-y/2,_=t.label?8:0,v=nt.svg(c),F=ot(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const L=k.get("fill");F.stroke=L??x;const U=v.path(me(w,T,m,y,.1),F),W=Math.max(m,h.width),q=y+h.height+_,rt=v.rectangle(-W/2,-q/2,W,q,{...F,fill:"transparent",stroke:"none"}),Y=c.insert(()=>U,":first-child"),A=c.insert(()=>rt);if(t.icon){const E=c.append("g");E.html(`<g>${await ps(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=E.node().getBBox(),P=B.width,$=B.height,N=B.x,V=B.y;E.attr("transform",`translate(${-P/2-N},${f?h.height/2+_/2-$/2-V:-h.height/2-_/2-$/2-V})`),E.attr("style",`color: ${k.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-q/2:q/2-h.height})`),Y.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),ct(t,A),t.intersect=function(E){if(I.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const B=t.x??0,P=t.y??0,$=t.height??0;let N=[];return f?N=[{x:B-h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2},{x:B+h.width/2,y:P-$/2+h.height+_},{x:B+m/2,y:P-$/2+h.height+_},{x:B+m/2,y:P+$/2},{x:B-m/2,y:P+$/2},{x:B-m/2,y:P-$/2+h.height+_},{x:B-h.width/2,y:P-$/2+h.height+_}]:N=[{x:B-m/2,y:P-$/2},{x:B+m/2,y:P-$/2},{x:B+m/2,y:P-$/2+y},{x:B+h.width/2,y:P-$/2+y},{x:B+h.width/2/2,y:P+$/2},{x:B-h.width/2,y:P+$/2},{x:B-h.width/2,y:P-$/2+y},{x:B-m/2,y:P-$/2+y}],st.polygon(t,N,E)},c}g(bg,"iconSquare");async function kg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=dt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:f}=await mt(e,t,"image-shape default"),y=t.pos==="t",m=-c/2,C=-h/2,x=t.label?8:0,k=nt.svg(u),w=ot(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=k.rectangle(m,C,c,h,w),_=Math.max(c,d.width),v=h+d.height+x,F=k.rectangle(-_/2,-v/2,_,v,{...w,fill:"none",stroke:"none"}),L=u.insert(()=>T,":first-child"),U=u.insert(()=>F);if(t.img){const W=u.append("image");W.attr("href",t.img),W.attr("width",c),W.attr("height",h),W.attr("preserveAspectRatio","none"),W.attr("transform",`translate(${-c/2},${y?v/2-h:-v/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${y?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),L.attr("transform",`translate(0,${y?d.height/2+x/2:-d.height/2-x/2})`),ct(t,U),t.intersect=function(W){if(I.info("iconSquare intersect",t,W),!t.label)return st.rect(t,W);const q=t.x??0,rt=t.y??0,Y=t.height??0;let A=[];return y?A=[{x:q-d.width/2,y:rt-Y/2},{x:q+d.width/2,y:rt-Y/2},{x:q+d.width/2,y:rt-Y/2+d.height+x},{x:q+c/2,y:rt-Y/2+d.height+x},{x:q+c/2,y:rt+Y/2},{x:q-c/2,y:rt+Y/2},{x:q-c/2,y:rt-Y/2+d.height+x},{x:q-d.width/2,y:rt-Y/2+d.height+x}]:A=[{x:q-c/2,y:rt-Y/2},{x:q+c/2,y:rt-Y/2},{x:q+c/2,y:rt-Y/2+h},{x:q+d.width/2,y:rt-Y/2+h},{x:q+d.width/2/2,y:rt+Y/2},{x:q-d.width/2,y:rt+Y/2},{x:q-d.width/2,y:rt-Y/2+h},{x:q-c/2,y:rt-Y/2+h}],st.polygon(t,A,W)},u}g(kg,"imageSquare");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+o*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(wg,"inv_trapezoid");async function Sg(e,t){const{shapeSvg:r,bbox:i,label:s}=await mt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ct(t,a),t.intersect=function(l){return st.rect(t,l)},r}g(Sg,"labelRect");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(Tg,"lean_left");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(_g,"lean_right");function Bg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",xt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=nt.svg(s),u=ot(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Dt(c),f=h.path(d,u),y=s.insert(()=>f,":first-child");return y.attr("class","outer-path"),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${o/2},${-n})`),ct(t,y),t.intersect=function(m){return I.info("lightningBolt intersect",t,m),st.polygon(t,c,m)},s}g(Bg,"lightningBolt");var ow=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),nw=g((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lw=g((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ic=10,sc=10;async function vg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-a,t.width<sc&&(t.width=sc);const w=x/2/(2.5+x/50);t.height=(t.height??0)-o-w*3,t.height<ic&&(t.height=ic)}const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,d=u/(2.5+h/50),f=(t!=null&&t.height?t==null?void 0:t.height:l.height)+d+o*2,y=f*.1;let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const x=nt.svg(n),k=nw(0,0,h,f,u,d,y),w=lw(0,d,h,f,u,d),T=ot(t,{}),_=x.path(k,T),v=x.path(w,T);n.insert(()=>v,":first-child").attr("class","line"),m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container"),C&&m.attr("style",C)}else{const x=ow(0,0,h,f,u,d,y);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Xt(C)).attr("style",i)}return m.attr("label-offset-y",d),m.attr("transform",`translate(${-h/2}, ${-(f/2+d)})`),ct(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+d-(l.y-(l.top??0))})`),t.intersect=function(x){const k=st.rect(t,x),w=k.x-(t.x??0);if(u!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-w*w/(u*u));T>0&&(T=Math.sqrt(T)),T=d-T,x.y-(t.y??0)>0&&(T=-T),k.y+=T}return k},n}g(vg,"linedCylinder");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:y}=t,m=nt.svg(n),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:f/2},...hr(-h/2-h/2*.1,f/2,h/2+h/2*.1,f/2,d,.8),{x:h/2+h/2*.1,y:-f/2},{x:-h/2-h/2*.1,y:-f/2},{x:-h/2,y:-f/2},{x:-h/2,y:f/2*1.1},{x:-h/2,y:-f/2}],k=m.polygon(x.map(T=>[T.x,T.y]),C),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-d/2-(l.y-(l.top??0))})`),ct(t,w),t.intersect=function(T){return st.polygon(t,x,T)},n}g(Lg,"linedWaveEdgedRect");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,xt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,f=u-2*n,y=d-2*n,m=-f/2,C=-y/2,{cssStyles:x}=t,k=nt.svg(l),w=ot(t,{}),T=[{x:m-n,y:C+n},{x:m-n,y:C+y+n},{x:m+f-n,y:C+y+n},{x:m+f-n,y:C+y},{x:m+f,y:C+y},{x:m+f,y:C+y-n},{x:m+f+n,y:C+y-n},{x:m+f+n,y:C-n},{x:m+n,y:C-n},{x:m+n,y:C},{x:m,y:C},{x:m,y:C+n}],_=[{x:m,y:C+n},{x:m+f-n,y:C+n},{x:m+f-n,y:C+y},{x:m+f,y:C+y},{x:m+f,y:C},{x:m,y:C}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=Dt(T);let F=k.path(v,w);const L=Dt(_);let U=k.path(L,w);t.look!=="handDrawn"&&(F=ln(F),U=ln(U));const W=l.insert("g",":first-child");return W.insert(()=>F),W.insert(()=>U),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.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))})`),ct(t,W),t.intersect=function(q){return st.polygon(t,T,q)},l}g(Fg,"multiRect");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(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==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,d=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,f=t.look==="neo"?d/4:d/8,y=d+(h?f/2:-f/2),m=-u/2,C=-y/2,x=10,{cssStyles:k}=t,w=hr(m-x,C+y+x,m+u-x,C+y+x,f,.8),T=w==null?void 0:w[w.length-1],_=[{x:m-x,y:C+x},{x:m-x,y:C+y+x},...w,{x:m+u-x,y:T.y-x},{x:m+u,y:T.y-x},{x:m+u,y:T.y-2*x},{x:m+u+x,y:T.y-2*x},{x:m+u+x,y:C-x},{x:m+x,y:C-x},{x:m+x,y:C},{x:m,y:C},{x:m,y:C+x}],v=[{x:m,y:C+x},{x:m+u-x,y:C+x},{x:m+u-x,y:T.y-x},{x:m+u,y:T.y-x},{x:m+u,y:C},{x:m,y:C}],F=nt.svg(s),L=ot(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const U=Dt(_),W=F.path(U,L),q=Dt(v),rt=F.path(q,L),Y=s.insert(()=>W,":first-child");return Y.insert(()=>rt),Y.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&Y.selectAll("path").attr("style",i),Y.attr("transform",`translate(0,${-f/2})`),o.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-f/2-(a.y-(a.top??0))})`),ct(t,Y),t.intersect=function(A){return st.polygon(t,_,A)},s}g(Mg,"multiWaveEdgedRectangle");async function Ag(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i,t.useHtmlLabels||se(Yt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,d=-h/2,{cssStyles:f}=t,y=nt.svg(o),m=ot(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=y.rectangle(u,d,c,h,m),x=o.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ct(t,x),t.intersect=function(k){return st.rect(t,k)},o}g(Ag,"note");var hw=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await mt(e,t,xt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+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 u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=nt.svg(s),y=ot(t,{}),m=hw(0,0,l),C=f.path(m,y);u=s.insert(()=>C,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=We(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),ct(t,u),t.calcIntersect=function(f,y){const m=f.width,C=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=st.polygon(f,C,y);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},s}g(Eg,"question");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?o*2:o),t.height??0),d=u/4,y=-Math.max(h,(t.width??0)-d)/2,m=-u/2,C=m/2,x=[{x:y+C,y:m},{x:y,y:0},{x:y+C,y:-m},{x:-y,y:-m},{x:-y,y:m}],{cssStyles:k}=t,w=nt.svg(n),T=ot(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=Dt(x),v=w.path(_,T),F=n.insert(()=>v,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-C/2},0)`),c.attr("transform",`translate(${-C/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ct(t,F),t.intersect=function(L){return st.polygon(t,x,L)},n}g($g,"rect_left_inv_arrow");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ir(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(se(Et())){const L=h.children[0],U=Ft(h);u=L.getBoundingClientRect(),U.attr("width",u.width),U.attr("height",u.height)}I.info("Text 2",l);const d=l||[],f=h.getBBox(),y=await ir(n,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),m=y.children[0],C=Ft(y);u=m.getBoundingClientRect(),C.attr("width",u.width),C.attr("height",u.height);const x=(t.padding||0)/2;Ft(y).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),Ft(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const k=u.width+(t.padding||0),w=u.height+(t.padding||0),T=-u.width/2-x,_=-u.height/2-x;let v,F;if(t.look==="handDrawn"){const L=nt.svg(a),U=ot(t,{}),W=L.path(me(T,_,k,w,t.rx||0),U),q=L.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,U);F=a.insert(()=>(I.debug("Rough node insert CXC",W),q),":first-child"),v=a.insert(()=>(I.debug("Rough node insert CXC",W),W),":first-child")}else v=o.insert("rect",":first-child"),F=o.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return ct(t,v),t.intersect=function(L){return st.rect(t,L)},a}g(Og,"rectWithTitle");async function Pg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return mi(e,t,s)}g(Pg,"roundedRect");var cr=8;async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?cr:cr*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-cr,d=h,f=cr-c/2,y=-h/2,{cssStyles:m}=t,C=nt.svg(o),x=ot(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=[{x:f,y},{x:f+u,y},{x:f+u,y:y+d},{x:f-cr,y:y+d},{x:f-cr,y},{x:f,y},{x:f,y:y+d}],w=C.polygon(k.map(_=>[_.x,_.y]),x),T=o.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Xt(m)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${cr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ct(t,T),t.intersect=function(_){return st.rect(t,_)},o}g(Dg,"shadedProcess");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,d=h,f=u/1.5,y=-d/2,m=-f/2,{cssStyles:C}=t,x=nt.svg(n),k=ot(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=[{x:y,y:m},{x:y,y:m+f},{x:y+d,y:m+f},{x:y+d,y:m-f/2}],T=Dt(w),_=x.path(T,k),v=n.insert(()=>_,":first-child");return v.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",C),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-f/4+(t.padding??0)-(l.y-(l.top??0))})`),ct(t,v),t.intersect=function(F){return st.polygon(t,w,F)},n}g(Ig,"slopedRect");async function Rg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return mi(e,t,a)}g(Rg,"squareRect");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:d}=t,f=nt.svg(n),y=ot(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...$e(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...$e(h/2-u,0,u,50,270,450)],C=Dt(m),x=f.path(C,y),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),ct(t,k),t.intersect=function(w){return st.polygon(t,m,w)},n}g(qg,"stadium");async function Ng(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return mi(e,t,r)}g(Ng,"state");function Wg(e,t,{config:{themeVariables:r}}){var k,w;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,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),u=nt.svg(h),d=ot(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:o,strokeWidth:2}),y=n??l,m=(t.width??0)*5/14,C=u.circle(0,0,m,{...d,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>f,":first-child");if(x.insert(()=>C),t.look!=="handDrawn"&&x.attr("class","outer-path"),a&&x.selectAll("path").attr("style",a),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const T=((w=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:w.id)??"",_=T?`${T}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${_})`)}return ct(t,x),t.intersect=function(T){return st.circle(t,(t.width??0)/2,T)},h}g(Wg,"stateEnd");function zg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=nt.svg(a).circle(0,0,t.width,h1(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return ct(t,o),t.intersect=function(c){return st.circle(t,(t.width??7)/2,c)},a}g(zg,"stateStart");var qr=8;async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.width+2*qr+a,t.width??0),h=Math.max(l.height+o,t.height??0),u=c-2*qr,d=h,f=-c/2,y=-h/2,m=[{x:0,y:0},{x:u,y:0},{x:u,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if(t.look==="handDrawn"){const C=nt.svg(n),x=ot(t,{}),k=C.rectangle(f,y,u+16,d,x),w=C.line(f+qr,y,f+qr,y+d,x),T=C.line(f+qr+u,y,f+qr+u,y+d,x);n.insert(()=>w,":first-child"),n.insert(()=>T,":first-child");const _=n.insert(()=>k,":first-child"),{cssStyles:v}=t;_.attr("class","basic label-container").attr("style",Xt(v)),ct(t,_)}else{const C=We(n,u,d,m);i&&C.attr("style",i),ct(t,C)}return t.intersect=function(C){return st.polygon(t,m,C)},n}g(Hg,"subroutine");var eo=.2;async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-eo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=eo*c,u=eo*c,f=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,y=c,m=-f/2,C=-y/2,{cssStyles:x}=t,k=nt.svg(n),w=ot(t,{}),T=[{x:m-h/2,y:C},{x:m+f+h/2,y:C},{x:m+f+h/2,y:C+y},{x:m-h/2,y:C+y}],_=[{x:m+f-h/2,y:C+y},{x:m+f+h/2,y:C+y},{x:m+f+h/2,y:C+y-u}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=Dt(T),F=k.path(v,w),L=Dt(_),U=k.path(L,{...w,fillStyle:"solid"}),W=n.insert(()=>U,":first-child");return W.insert(()=>F,":first-child"),W.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),ct(t,W),t.intersect=function(q){return st.polygon(t,T,q)},n}g(Yg,"taggedRect");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await mt(e,t,xt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,d=l+c,{cssStyles:f}=t,y=nt.svg(s),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-n/2-n/2*.1,y:d/2},...hr(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],x=-n/2+n/2*.1,k=-d/2-u*.4,w=[{x:x+n-h,y:(k+l)*1.3},{x:x+n,y:k+l-u},{x:x+n,y:(k+l)*.9},...hr(x+n,(k+l)*1.25,x+n-h,(k+l)*1.3,-l*.02,.5)],T=Dt(C),_=y.path(T,m),v=Dt(w),F=y.path(v,{...m,fillStyle:"solid"}),L=s.insert(()=>F,":first-child");return L.insert(()=>_,":first-child"),L.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),ct(t,L),t.intersect=function(U){return st.polygon(t,C,U)},s}g(jg,"taggedWaveEdgedRectangle");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await mt(e,t,xt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),ct(t,h),t.intersect=function(u){return st.rect(t,u)},s}g(Ug,"text");var cw=g((e,t,r,i,s,a)=>`M${e},${t}
200
200
  a${s},${a} 0,0,1 0,${-i}
201
201
  l${r},0
202
202
  a${s},${a} 0,0,1 0,${i}
203
203
  M${r},${-i}
204
204
  a${s},${a} 0,0,0 0,${i}
205
- l${-r},0`,"createCylinderPathD"),uw=g((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dw=g((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),ac=5,oc=10;async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,o=t.height??0;if(t.height&&(t.height=t.height-a,t.height<ac&&(t.height=ac)),t.width){const x=o/2/(2.5+o/50);t.width=t.width-a-x*3,t.width<oc&&(t.width=oc)}const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=Math.max(t.height??0,l.height)+a,u=h/2,d=u/(2.5+h/50),f=Math.max(t.width??0,l.width)+d+a,{cssStyles:y}=t;let m;if(t.look==="handDrawn"){const C=nt.svg(n),x=uw(0,0,f,h,d,u),k=dw(0,0,f,h,d,u),w=C.path(x,ot(t,{})),T=C.path(k,ot(t,{fill:"none"}));m=n.insert(()=>T,":first-child"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const C=cw(0,0,f,h,d,u);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Xt(y)).attr("style",i),m.attr("class","basic label-container outer-path"),y&&m.selectAll("path").attr("style",y),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",d),m.attr("transform",`translate(${-f/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ct(t,m),t.intersect=function(C){const x=st.rect(t,C),k=x.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let w=d*d*(1-k*k/(u*u));w!=0&&(w=Math.sqrt(Math.abs(w))),w=d-w,C.x-(t.x??0)>0&&(w=-w),x.x+=w}return x},n}g(Gg,"tiltedCylinder");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(Xg,"trapezoid");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await mt(e,t,xt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:f}=t,y=nt.svg(c),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],x=Dt(C),k=y.path(x,m),w=c.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),ct(t,w),t.intersect=function(T){return st.polygon(t,C,T)},c}g(Vg,"trapezoidalPentagon");var nc=10,lc=10;async function Zg(e,t){var T;const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<lc&&(t.width=lc),t.height=(t==null?void 0:t.height)??0,t.height<nc&&(t.height=nc));const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=qe((T=Et().flowchart)==null?void 0:T.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:y}=t,m=nt.svg(o),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Dt(f),k=m.path(x,C),w=o.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=h,t.height=u,ct(t,w),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(_){return I.info("Triangle intersect",t,f,_),st.polygon(t,f,_)},o}g(Zg,"triangle");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,xt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,f=t.look==="neo"?d/4:d/8,y=d+(n?f:-f),{cssStyles:m}=t,x=14-u,k=x>0?x/2:0,w=nt.svg(l),T=ot(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:-u/2-k,y:y/2},...hr(-u/2-k,y/2,u/2+k,y/2,f,.8),{x:u/2+k,y:-y/2},{x:-u/2-k,y:-y/2}],L=Dt(_),F=w.path(L,T),v=l.insert(()=>F,":first-child");return v.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),ct(t,v),t.intersect=function(U){return st.polygon(t,_,U)},l}g(Kg,"waveEdgedRectangle");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=h/8,d=h+u*2,{cssStyles:f}=t,y=nt.svg(n),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2,y:d/2},...hr(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...hr(c/2,-d/2,-c/2,-d/2,u,-1)],x=Dt(C),k=y.path(x,m),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),ct(t,w),t.intersect=function(T){return st.polygon(t,C,T)},n}g(Qg,"waveRectangle");var jt=10;async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-jt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-jt,10));const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+jt,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+jt,u=c-jt,d=h-jt,f=-u/2,y=-d/2,{cssStyles:m}=t,C=nt.svg(o),x=ot(t,{}),k=[{x:f-jt,y:y-jt},{x:f-jt,y:y+d},{x:f+u,y:y+d},{x:f+u,y:y-jt}],w=`M${f-jt},${y-jt} L${f+u},${y-jt} L${f+u},${y+d} L${f-jt},${y+d} L${f-jt},${y-jt}
205
+ l${-r},0`,"createCylinderPathD"),uw=g((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dw=g((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),ac=5,oc=10;async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,o=t.height??0;if(t.height&&(t.height=t.height-a,t.height<ac&&(t.height=ac)),t.width){const x=o/2/(2.5+o/50);t.width=t.width-a-x*3,t.width<oc&&(t.width=oc)}const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=Math.max(t.height??0,l.height)+a,u=h/2,d=u/(2.5+h/50),f=Math.max(t.width??0,l.width)+d+a,{cssStyles:y}=t;let m;if(t.look==="handDrawn"){const C=nt.svg(n),x=uw(0,0,f,h,d,u),k=dw(0,0,f,h,d,u),w=C.path(x,ot(t,{})),T=C.path(k,ot(t,{fill:"none"}));m=n.insert(()=>T,":first-child"),m=n.insert(()=>w,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const C=cw(0,0,f,h,d,u);m=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Xt(y)).attr("style",i),m.attr("class","basic label-container outer-path"),y&&m.selectAll("path").attr("style",y),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",d),m.attr("transform",`translate(${-f/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ct(t,m),t.intersect=function(C){const x=st.rect(t,C),k=x.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(x.x-(t.x??0))>(t.width??0)/2-d)){let w=d*d*(1-k*k/(u*u));w!=0&&(w=Math.sqrt(Math.abs(w))),w=d-w,C.x-(t.x??0)>0&&(w=-w),x.x+=w}return x},n}g(Gg,"tiltedCylinder");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const y=nt.svg(n),m=ot(t,{}),C=Dt(u),x=y.path(C,m);d=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),f&&d.attr("style",f)}else d=We(n,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,ct(t,d),t.intersect=function(y){return st.polygon(t,u,y)},n}g(Xg,"trapezoid");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await mt(e,t,xt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:f}=t,y=nt.svg(c),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],x=Dt(C),k=y.path(x,m),w=c.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),ct(t,w),t.intersect=function(T){return st.polygon(t,C,T)},c}g(Vg,"trapezoidalPentagon");var nc=10,lc=10;async function Zg(e,t){var T;const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<lc&&(t.width=lc),t.height=(t==null?void 0:t.height)??0,t.height<nc&&(t.height=nc));const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=qe((T=Et().flowchart)==null?void 0:T.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:y}=t,m=nt.svg(o),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Dt(f),k=m.path(x,C),w=o.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=h,t.height=u,ct(t,w),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(_){return I.info("Triangle intersect",t,f,_),st.polygon(t,f,_)},o}g(Zg,"triangle");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,xt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,f=t.look==="neo"?d/4:d/8,y=d+(n?f:-f),{cssStyles:m}=t,x=14-u,k=x>0?x/2:0,w=nt.svg(l),T=ot(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:-u/2-k,y:y/2},...hr(-u/2-k,y/2,u/2+k,y/2,f,.8),{x:u/2+k,y:-y/2},{x:-u/2-k,y:-y/2}],v=Dt(_),F=w.path(v,T),L=l.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-f/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),ct(t,L),t.intersect=function(U){return st.polygon(t,_,U)},l}g(Kg,"waveEdgedRectangle");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=h/8,d=h+u*2,{cssStyles:f}=t,y=nt.svg(n),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2,y:d/2},...hr(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...hr(c/2,-d/2,-c/2,-d/2,u,-1)],x=Dt(C),k=y.path(x,m),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),ct(t,w),t.intersect=function(T){return st.polygon(t,C,T)},n}g(Qg,"waveRectangle");var jt=10;async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-jt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-jt,10));const{shapeSvg:o,bbox:n,label:l}=await mt(e,t,xt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+jt,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+jt,u=c-jt,d=h-jt,f=-u/2,y=-d/2,{cssStyles:m}=t,C=nt.svg(o),x=ot(t,{}),k=[{x:f-jt,y:y-jt},{x:f-jt,y:y+d},{x:f+u,y:y+d},{x:f+u,y:y-jt}],w=`M${f-jt},${y-jt} L${f+u},${y-jt} L${f+u},${y+d} L${f-jt},${y+d} L${f-jt},${y-jt}
206
206
  M${f-jt},${y} L${f+u},${y}
207
- M${f},${y-jt} L${f},${y+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=C.path(w,x),_=o.insert(()=>T,":first-child");return _.attr("transform",`translate(${jt/2}, ${jt/2})`),_.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+jt/2-(n.x-(n.left??0))}, ${-(n.height/2)+jt/2-(n.y-(n.top??0))})`),ct(t,_),t.intersect=function(L){return st.polygon(t,k,L)},o}g(Jg,"windowPane");var hc=new Set(["redux-color","redux-dark-color"]),fw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function gl(e,t){var _t,wt,$t,bt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Yt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:it}=Yt(),{background:ut}=it,Bt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ut}`]};await gl(e,Bt)}const c=Yt();t.useHtmlLabels=c.htmlLabels;let h=((_t=c.er)==null?void 0:_t.diagramPadding)??10,u=((wt=c.er)==null?void 0:wt.entityPadding)??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:y}=dt(t);if(r.attributes.length===0&&t.label){const it={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ze(t.label,c)+it.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ut=await mi(e,t,it);if(i!=null&&hc.has(i)){const Bt=r.colorIndex??0;ut.attr("data-color-id",`color-${Bt%l.length}`)}if(!qe(c.htmlLabels)){const Bt=ut.select("text"),At=($t=Bt.node())==null?void 0:$t.getBBox();Bt.attr("transform",`translate(${-At.width/2}, 0)`)}return ut}c.htmlLabels||(h*=1.25,u*=1.25);let m=xt(t);m||(m="node default");const C=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await Nr(C,t.label??"",c,0,0,["name"],f);x.height+=u;let k=0;const w=[],T=[];let _=0,L=0,F=0,v=0,U=!0,W=!0;for(const it of r.attributes){const ut=await Nr(C,it.type,c,0,k,["attribute-type"],f);_=Math.max(_,ut.width+h);const Bt=await Nr(C,it.name,c,0,k,["attribute-name"],f);L=Math.max(L,Bt.width+h);const At=await Nr(C,it.keys.join(),c,0,k,["attribute-keys"],f);F=Math.max(F,At.width+h);const qt=await Nr(C,it.comment,c,0,k,["attribute-comment"],f);v=Math.max(v,qt.width+h);const R=Math.max(ut.height,Bt.height,At.height,qt.height)+u;T.push({yOffset:k,rowHeight:R}),k+=R}let q=4;F<=h&&(U=!1,F=0,q--),v<=h&&(W=!1,v=0,q--);const rt=C.node().getBBox();if(x.width+h*2-(_+L+F+v)>0){const it=x.width+h*2-(_+L+F+v);_+=it/q,L+=it/q,F>0&&(F+=it/q),v>0&&(v+=it/q)}const Y=_+L+F+v,A=nt.svg(C),E=ot(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let B=0;T.length>0&&(B=T.reduce((it,ut)=>it+((ut==null?void 0:ut.rowHeight)??0),0));const P=Math.max(rt.width+h*2,(t==null?void 0:t.width)||0,Y),$=Math.max((B??0)+x.height,(t==null?void 0:t.height)||0),N=-P/2,V=-$/2;if(C.selectAll("g:not(:first-child)").each((it,ut,Bt)=>{const At=Ft(Bt[ut]),qt=At.attr("transform");let R=0,vt=0;if(qt){const Le=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);Le&&(R=parseFloat(Le[1]),vt=parseFloat(Le[2]),At.attr("class").includes("attribute-name")?R+=_:At.attr("class").includes("attribute-keys")?R+=_+L:At.attr("class").includes("attribute-comment")&&(R+=_+L+F))}At.attr("transform",`translate(${N+h/2+R}, ${vt+V+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(V+u/2)+")"),i!=null&&hc.has(i)){const it=r.colorIndex??0;C.attr("data-color-id",`color-${it%l.length}`)}const at=A.rectangle(N,V,P,$,E),ht=C.insert(()=>at,":first-child").attr("class","outer-path").attr("style",d.join(""));w.push(0);for(const[it,ut]of T.entries()){const At=(it+1)%2===0&&ut.yOffset!==0,qt=A.rectangle(N,x.height+V+(ut==null?void 0:ut.yOffset),P,ut==null?void 0:ut.rowHeight,{...E,fill:At?a:o,stroke:n});C.insert(()=>qt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${At?"even":"odd"}`)}const gt=1e-4;let yt=Wr(N,x.height+V,P+N,x.height+V,gt),pt=A.polygon(yt.map(it=>[it.x,it.y]),E);if(C.insert(()=>pt).attr("class","divider"),yt=Wr(_+N,x.height+V,_+N,$+V,gt),pt=A.polygon(yt.map(it=>[it.x,it.y]),E),C.insert(()=>pt).attr("class","divider"),U){const it=_+L+N;yt=Wr(it,x.height+V,it,$+V,gt),pt=A.polygon(yt.map(ut=>[ut.x,ut.y]),E),C.insert(()=>pt).attr("class","divider")}if(W){const it=_+L+F+N;yt=Wr(it,x.height+V,it,$+V,gt),pt=A.polygon(yt.map(ut=>[ut.x,ut.y]),E),C.insert(()=>pt).attr("class","divider")}for(const it of w){const ut=x.height+V+it;yt=Wr(N,ut,P+N,ut,gt),pt=A.polygon(yt.map(Bt=>[Bt.x,Bt.y]),E),C.insert(()=>pt).attr("class","divider")}if(ct(t,ht),y&&t.look!=="handDrawn")if(i!=null&&fw.has(i))C.selectAll("path").attr("style",y);else{const it=y.split(";"),ut=(bt=it==null?void 0:it.filter(Bt=>Bt.includes("stroke")))==null?void 0:bt.map(Bt=>`${Bt}`).join("; ");C.selectAll("path").attr("style",ut??""),C.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(it){return st.rect(t,it)},C}g(gl,"erBox");async function Nr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Jl(t)&&(t=Jl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ve(n,t,{width:Ze(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(qe(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=Ft(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}g(Nr,"addText");function Wr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(Wr,"lineToPolygon");async function tp(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",xt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,d=0,f=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Wi(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Wi(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();d=y.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const k of t.members){const w=await Wi(c,k,m,[k.parseClassifier()]);m+=w+a}f=c.node().getBBox().height,f<=0&&(f=s/2),h=o.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const w=await Wi(h,k,C,[k.parseClassifier()]);C+=w+a}let x=o.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+s*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+s*4:s*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}g(tp,"textHelper");async function Wi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Yt();let o="useHtmlLabels"in t?t.useHtmlLabels:qe(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Ji(n)&&(o=!0);const l=await ve(s,Fn(nr(n)),{width:Ze(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],d=Ft(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await cl(u),c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Ft(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(Wi,"addText");async function ep(e,t){var A,E;const r=Et(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??qe(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await tp(e,t,r,n,o),{labelStyles:u,nodeStyles:d}=dt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const f=((A=l.styles)==null?void 0:A.join(";"))||d||"";t.cssStyles||(t.cssStyles=f.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),m=nt.svg(c),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const w=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=o:l.members.length>0&&l.methods.length===0&&(k+=o*2);const T=-x/2,_=-k/2;let L=y?a*2:l.members.length===0&&l.methods.length===0?-a:0;w&&(L=a*2);const F=m.rectangle(T-a,_-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0),x+2*a,k+2*a+L,C),v=c.insert(()=>F,":first-child");v.attr("class","basic label-container outer-path");const U=v.node().getBBox(),W=c.select(".annotation-group").node().getBBox().height-(y?a/2:0)||0,q=c.select(".label-group").node().getBBox().height-(y?a/2:0)||0,rt=c.select(".members-group").node().getBBox().height-(y?a/2:0)||0,Y=(W+q+_+a-(_-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((B,P,$)=>{var yt,pt;const N=Ft($[P]),V=N.attr("transform");let at=0;if(V){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(V);wt&&(at=parseFloat(wt[2]))}let ht=at+_+a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(N.attr("class").includes("methods-group")){const _t=Math.max(rt,o/2);w?ht=Math.max(Y,W+q+_t+_+o*2+a)+o*2:ht=W+q+_t+_+o*4+a}l.members.length===0&&l.methods.length===0&&((yt=r.class)!=null&&yt.hideEmptyMembersBox)&&(l.annotations.length>0?ht=at-o:ht=at),n||(ht-=4);let gt=T;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(gt=-((pt=N.node())==null?void 0:pt.getBBox().width)/2||0,c.selectAll("text").each(function(_t,wt,$t){window.getComputedStyle($t[wt]).textAnchor==="middle"&&(gt=0)})),N.attr("transform",`translate(${gt}, ${ht})`)}),l.members.length>0||l.methods.length>0||y){const B=W+q+_+a,P=m.line(U.x,B,U.x+U.width,B+.001,C);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(y||l.members.length>0||l.methods.length>0){const B=W+q+rt+_+o*2+a,P=m.line(U.x,w?Math.max(Y,B):B,U.x+U.width,(w?Math.max(Y,B):B)+.001,C);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",f),v.select(":nth-child(2)").attr("style",f),c.selectAll(".divider").select("path").attr("style",f),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",f),!n){const B=RegExp(/color\s*:\s*([^;]*)/),P=B.exec(f);if(P){const $=P[0].replace("color","fill");c.selectAll("tspan").attr("style",$)}else if(u){const $=B.exec(u);if($){const N=$[0].replace("color","fill");c.selectAll("tspan").attr("style",N)}}}return ct(t,v),t.intersect=function(B){return st.rect(t,B)},c}g(ep,"classBox");async function rp(e,t){var q,rt;const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=xt(t),h=Et(),{themeVariables:u}=h,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,y=h.layout==="elk"?"start":"center",m=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await Me(m,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await Me(m,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const k=await Me(m,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,l){const Y=await Me(m,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,y);x+=Y;const A=await Me(m,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,y);x+=A;const E=await Me(m,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,y);x+=E,await Me(m,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,y)}else{const Y=await Me(m,`${a.type?`Type: ${a.type}`:""}`,x,t.labelStyle,y);x+=Y,await Me(m,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,x,t.labelStyle,y)}const w=(((q=m.node())==null?void 0:q.getBBox().width)??200)+o,T=(((rt=m.node())==null?void 0:rt.getBBox().height)??200)+o,_=-w/2,L=-T/2,F=nt.svg(m),v=ot(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const U=F.rectangle(_,L,w,T,v),W=m.insert(()=>U,":first-child");if(W.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const Y=t.colorIndex??0;m.attr("data-color-id",`color-${Y%d.length}`)}if(m.selectAll(".label").each((Y,A,E)=>{const B=Ft(E[A]),P=B.attr("transform");let $=0,N=0;if(P){const gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);gt&&($=parseFloat(gt[1]),N=parseFloat(gt[2]))}const V=N-T/2;let at=_+o/2;(A===0||A===1)&&(at=$),B.attr("transform",`translate(${at}, ${V+o})`)}),x>C+k+n){const Y=L+C+k+n;let A;if(t.look==="neo"){const P=[[_,Y],[_+w,Y],[_+w,Y+.001],[_,Y+.001]];A=F.polygon(P,v)}else A=F.line(_,Y,_+w,Y,v);m.insert(()=>A).attr("class","divider")}return ct(t,W),t.intersect=function(Y){return st.rect(t,Y)},i&&t.look!=="handDrawn"&&(f||d!=null&&d.length)&&m.selectAll("path").attr("style",i),m}g(rp,"requirementBox");async function Me(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=Et(),n=o.htmlLabels??!0,l=await ve(a,Fn(nr(t)),{width:Ze(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let c;if(n){const h=l.children[0],u=Ft(l);s==="start"&&Ft(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}g(Me,"addText");var gw=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ip(e,t,{config:r}){var rt,Y;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((rt=r==null?void 0:r.kanban)!=null&&rt.ticketBaseUrl)&&(u=(Y=r==null?void 0:r.kanban)==null?void 0:Y.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,m;d?{label:y,bbox:m}=await Ja(d,"ticket"in t&&t.ticket||"",f):{label:y,bbox:m}=await Ja(n,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await Ja(n,"assigned"in t&&t.assigned||"",f);t.width=o;const k=10,w=(t==null?void 0:t.width)||0,T=Math.max(m.height,x.height)/2,_=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+T,L=-w/2,F=-_/2;c.attr("transform","translate("+(h-w/2)+", "+(-T-l.height/2)+")"),y.attr("transform","translate("+(h-w/2)+", "+(-T+l.height/2)+")"),C.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-T+l.height/2)+")");let v;const{rx:U,ry:W}=t,{cssStyles:q}=t;if(t.look==="handDrawn"){const A=nt.svg(n),E=ot(t,{}),B=U||W?A.path(me(L,F,w,_,U||0),E):A.rectangle(L,F,w,_,E);v=n.insert(()=>B,":first-child"),v.attr("class","basic label-container").attr("style",q||null)}else{v=n.insert("rect",":first-child"),v.attr("class","basic label-container __APA__").attr("style",s).attr("rx",U??5).attr("ry",W??5).attr("x",L).attr("y",F).attr("width",w).attr("height",_);const A="priority"in t&&t.priority;if(A){const E=n.append("line"),B=L+2,P=F+Math.floor((U??0)/2),$=F+_-Math.floor((U??0)/2);E.attr("x1",B).attr("y1",P).attr("x2",B).attr("y2",$).attr("stroke-width","4").attr("stroke",gw(A))}}return ct(t,v),t.height=_,t.intersect=function(A){return st.rect(t,A)},n}g(ip,"kanbanItem");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await mt(e,t,xt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,y=Math.max(l,d),m=Math.max(c,f);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let C;const x=`M0 0
207
+ M${f},${y-jt} L${f},${y+d}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const T=C.path(w,x),_=o.insert(()=>T,":first-child");return _.attr("transform",`translate(${jt/2}, ${jt/2})`),_.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+jt/2-(n.x-(n.left??0))}, ${-(n.height/2)+jt/2-(n.y-(n.top??0))})`),ct(t,_),t.intersect=function(v){return st.polygon(t,k,v)},o}g(Jg,"windowPane");var hc=new Set(["redux-color","redux-dark-color"]),fw=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function gl(e,t){var _t,wt,$t,bt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Yt(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:it}=Yt(),{background:ut}=it,Bt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ut}`]};await gl(e,Bt)}const c=Yt();t.useHtmlLabels=c.htmlLabels;let h=((_t=c.er)==null?void 0:_t.diagramPadding)??10,u=((wt=c.er)==null?void 0:wt.entityPadding)??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:y}=dt(t);if(r.attributes.length===0&&t.label){const it={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ze(t.label,c)+it.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ut=await mi(e,t,it);if(i!=null&&hc.has(i)){const Bt=r.colorIndex??0;ut.attr("data-color-id",`color-${Bt%l.length}`)}if(!qe(c.htmlLabels)){const Bt=ut.select("text"),At=($t=Bt.node())==null?void 0:$t.getBBox();Bt.attr("transform",`translate(${-At.width/2}, 0)`)}return ut}c.htmlLabels||(h*=1.25,u*=1.25);let m=xt(t);m||(m="node default");const C=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await Nr(C,t.label??"",c,0,0,["name"],f);x.height+=u;let k=0;const w=[],T=[];let _=0,v=0,F=0,L=0,U=!0,W=!0;for(const it of r.attributes){const ut=await Nr(C,it.type,c,0,k,["attribute-type"],f);_=Math.max(_,ut.width+h);const Bt=await Nr(C,it.name,c,0,k,["attribute-name"],f);v=Math.max(v,Bt.width+h);const At=await Nr(C,it.keys.join(),c,0,k,["attribute-keys"],f);F=Math.max(F,At.width+h);const qt=await Nr(C,it.comment,c,0,k,["attribute-comment"],f);L=Math.max(L,qt.width+h);const R=Math.max(ut.height,Bt.height,At.height,qt.height)+u;T.push({yOffset:k,rowHeight:R}),k+=R}let q=4;F<=h&&(U=!1,F=0,q--),L<=h&&(W=!1,L=0,q--);const rt=C.node().getBBox();if(x.width+h*2-(_+v+F+L)>0){const it=x.width+h*2-(_+v+F+L);_+=it/q,v+=it/q,F>0&&(F+=it/q),L>0&&(L+=it/q)}const Y=_+v+F+L,A=nt.svg(C),E=ot(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let B=0;T.length>0&&(B=T.reduce((it,ut)=>it+((ut==null?void 0:ut.rowHeight)??0),0));const P=Math.max(rt.width+h*2,(t==null?void 0:t.width)||0,Y),$=Math.max((B??0)+x.height,(t==null?void 0:t.height)||0),N=-P/2,V=-$/2;if(C.selectAll("g:not(:first-child)").each((it,ut,Bt)=>{const At=Ft(Bt[ut]),qt=At.attr("transform");let R=0,vt=0;if(qt){const Le=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);Le&&(R=parseFloat(Le[1]),vt=parseFloat(Le[2]),At.attr("class").includes("attribute-name")?R+=_:At.attr("class").includes("attribute-keys")?R+=_+v:At.attr("class").includes("attribute-comment")&&(R+=_+v+F))}At.attr("transform",`translate(${N+h/2+R}, ${vt+V+x.height+u/2})`)}),C.select(".name").attr("transform","translate("+-x.width/2+", "+(V+u/2)+")"),i!=null&&hc.has(i)){const it=r.colorIndex??0;C.attr("data-color-id",`color-${it%l.length}`)}const at=A.rectangle(N,V,P,$,E),ht=C.insert(()=>at,":first-child").attr("class","outer-path").attr("style",d.join(""));w.push(0);for(const[it,ut]of T.entries()){const At=(it+1)%2===0&&ut.yOffset!==0,qt=A.rectangle(N,x.height+V+(ut==null?void 0:ut.yOffset),P,ut==null?void 0:ut.rowHeight,{...E,fill:At?a:o,stroke:n});C.insert(()=>qt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${At?"even":"odd"}`)}const gt=1e-4;let yt=Wr(N,x.height+V,P+N,x.height+V,gt),pt=A.polygon(yt.map(it=>[it.x,it.y]),E);if(C.insert(()=>pt).attr("class","divider"),yt=Wr(_+N,x.height+V,_+N,$+V,gt),pt=A.polygon(yt.map(it=>[it.x,it.y]),E),C.insert(()=>pt).attr("class","divider"),U){const it=_+v+N;yt=Wr(it,x.height+V,it,$+V,gt),pt=A.polygon(yt.map(ut=>[ut.x,ut.y]),E),C.insert(()=>pt).attr("class","divider")}if(W){const it=_+v+F+N;yt=Wr(it,x.height+V,it,$+V,gt),pt=A.polygon(yt.map(ut=>[ut.x,ut.y]),E),C.insert(()=>pt).attr("class","divider")}for(const it of w){const ut=x.height+V+it;yt=Wr(N,ut,P+N,ut,gt),pt=A.polygon(yt.map(Bt=>[Bt.x,Bt.y]),E),C.insert(()=>pt).attr("class","divider")}if(ct(t,ht),y&&t.look!=="handDrawn")if(i!=null&&fw.has(i))C.selectAll("path").attr("style",y);else{const it=y.split(";"),ut=(bt=it==null?void 0:it.filter(Bt=>Bt.includes("stroke")))==null?void 0:bt.map(Bt=>`${Bt}`).join("; ");C.selectAll("path").attr("style",ut??""),C.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(it){return st.rect(t,it)},C}g(gl,"erBox");async function Nr(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Jl(t)&&(t=Jl(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ve(n,t,{width:Ze(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(qe(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=Ft(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}g(Nr,"addText");function Wr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(Wr,"lineToPolygon");async function tp(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",xt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,d=0,f=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await Wi(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await Wi(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();d=y.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const k of t.members){const w=await Wi(c,k,m,[k.parseClassifier()]);m+=w+a}f=c.node().getBBox().height,f<=0&&(f=s/2),h=o.insert("g").attr("class","methods-group text");let C=0;for(const k of t.methods){const w=await Wi(h,k,C,[k.parseClassifier()]);C+=w+a}let x=o.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+s*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+s*4:s*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}g(tp,"textHelper");async function Wi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Yt();let o="useHtmlLabels"in t?t.useHtmlLabels:qe(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),Ji(n)&&(o=!0);const l=await ve(s,Fn(nr(n)),{width:Ze(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],d=Ft(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await cl(u),c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Ft(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(Wi,"addText");async function ep(e,t){var A,E;const r=Et(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??qe(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await tp(e,t,r,n,o),{labelStyles:u,nodeStyles:d}=dt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const f=((A=l.styles)==null?void 0:A.join(";"))||d||"";t.cssStyles||(t.cssStyles=f.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),m=nt.svg(c),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const w=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=o:l.members.length>0&&l.methods.length===0&&(k+=o*2);const T=-x/2,_=-k/2;let v=y?a*2:l.members.length===0&&l.methods.length===0?-a:0;w&&(v=a*2);const F=m.rectangle(T-a,_-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0),x+2*a,k+2*a+v,C),L=c.insert(()=>F,":first-child");L.attr("class","basic label-container outer-path");const U=L.node().getBBox(),W=c.select(".annotation-group").node().getBBox().height-(y?a/2:0)||0,q=c.select(".label-group").node().getBBox().height-(y?a/2:0)||0,rt=c.select(".members-group").node().getBBox().height-(y?a/2:0)||0,Y=(W+q+_+a-(_-a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((B,P,$)=>{var yt,pt;const N=Ft($[P]),V=N.attr("transform");let at=0;if(V){const wt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(V);wt&&(at=parseFloat(wt[2]))}let ht=at+_+a-(y?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(N.attr("class").includes("methods-group")){const _t=Math.max(rt,o/2);w?ht=Math.max(Y,W+q+_t+_+o*2+a)+o*2:ht=W+q+_t+_+o*4+a}l.members.length===0&&l.methods.length===0&&((yt=r.class)!=null&&yt.hideEmptyMembersBox)&&(l.annotations.length>0?ht=at-o:ht=at),n||(ht-=4);let gt=T;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(gt=-((pt=N.node())==null?void 0:pt.getBBox().width)/2||0,c.selectAll("text").each(function(_t,wt,$t){window.getComputedStyle($t[wt]).textAnchor==="middle"&&(gt=0)})),N.attr("transform",`translate(${gt}, ${ht})`)}),l.members.length>0||l.methods.length>0||y){const B=W+q+_+a,P=m.line(U.x,B,U.x+U.width,B+.001,C);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(y||l.members.length>0||l.methods.length>0){const B=W+q+rt+_+o*2+a,P=m.line(U.x,w?Math.max(Y,B):B,U.x+U.width,(w?Math.max(Y,B):B)+.001,C);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",f)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",f),L.select(":nth-child(2)").attr("style",f),c.selectAll(".divider").select("path").attr("style",f),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",f),!n){const B=RegExp(/color\s*:\s*([^;]*)/),P=B.exec(f);if(P){const $=P[0].replace("color","fill");c.selectAll("tspan").attr("style",$)}else if(u){const $=B.exec(u);if($){const N=$[0].replace("color","fill");c.selectAll("tspan").attr("style",N)}}}return ct(t,L),t.intersect=function(B){return st.rect(t,B)},c}g(ep,"classBox");async function rp(e,t){var q,rt;const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=xt(t),h=Et(),{themeVariables:u}=h,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,y=h.layout==="elk"?"start":"center",m=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let C;l?C=await Me(m,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):C=await Me(m,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let x=C;const k=await Me(m,s.name,x,t.labelStyle+"; font-weight: bold;");if(x+=k+n,l){const Y=await Me(m,`${s.requirementId?`ID: ${s.requirementId}`:""}`,x,t.labelStyle,y);x+=Y;const A=await Me(m,`${s.text?`Text: ${s.text}`:""}`,x,t.labelStyle,y);x+=A;const E=await Me(m,`${s.risk?`Risk: ${s.risk}`:""}`,x,t.labelStyle,y);x+=E,await Me(m,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,x,t.labelStyle,y)}else{const Y=await Me(m,`${a.type?`Type: ${a.type}`:""}`,x,t.labelStyle,y);x+=Y,await Me(m,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,x,t.labelStyle,y)}const w=(((q=m.node())==null?void 0:q.getBBox().width)??200)+o,T=(((rt=m.node())==null?void 0:rt.getBBox().height)??200)+o,_=-w/2,v=-T/2,F=nt.svg(m),L=ot(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const U=F.rectangle(_,v,w,T,L),W=m.insert(()=>U,":first-child");if(W.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const Y=t.colorIndex??0;m.attr("data-color-id",`color-${Y%d.length}`)}if(m.selectAll(".label").each((Y,A,E)=>{const B=Ft(E[A]),P=B.attr("transform");let $=0,N=0;if(P){const gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);gt&&($=parseFloat(gt[1]),N=parseFloat(gt[2]))}const V=N-T/2;let at=_+o/2;(A===0||A===1)&&(at=$),B.attr("transform",`translate(${at}, ${V+o})`)}),x>C+k+n){const Y=v+C+k+n;let A;if(t.look==="neo"){const P=[[_,Y],[_+w,Y],[_+w,Y+.001],[_,Y+.001]];A=F.polygon(P,L)}else A=F.line(_,Y,_+w,Y,L);m.insert(()=>A).attr("class","divider")}return ct(t,W),t.intersect=function(Y){return st.rect(t,Y)},i&&t.look!=="handDrawn"&&(f||d!=null&&d.length)&&m.selectAll("path").attr("style",i),m}g(rp,"requirementBox");async function Me(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=Et(),n=o.htmlLabels??!0,l=await ve(a,Fn(nr(t)),{width:Ze(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let c;if(n){const h=l.children[0],u=Ft(l);s==="start"&&Ft(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}g(Me,"addText");var gw=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ip(e,t,{config:r}){var rt,Y;const{labelStyles:i,nodeStyles:s}=dt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await mt(e,t,xt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((rt=r==null?void 0:r.kanban)!=null&&rt.ticketBaseUrl)&&(u=(Y=r==null?void 0:r.kanban)==null?void 0:Y.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,m;d?{label:y,bbox:m}=await Ja(d,"ticket"in t&&t.ticket||"",f):{label:y,bbox:m}=await Ja(n,"ticket"in t&&t.ticket||"",f);const{label:C,bbox:x}=await Ja(n,"assigned"in t&&t.assigned||"",f);t.width=o;const k=10,w=(t==null?void 0:t.width)||0,T=Math.max(m.height,x.height)/2,_=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+T,v=-w/2,F=-_/2;c.attr("transform","translate("+(h-w/2)+", "+(-T-l.height/2)+")"),y.attr("transform","translate("+(h-w/2)+", "+(-T+l.height/2)+")"),C.attr("transform","translate("+(h+w/2-x.width-2*a)+", "+(-T+l.height/2)+")");let L;const{rx:U,ry:W}=t,{cssStyles:q}=t;if(t.look==="handDrawn"){const A=nt.svg(n),E=ot(t,{}),B=U||W?A.path(me(v,F,w,_,U||0),E):A.rectangle(v,F,w,_,E);L=n.insert(()=>B,":first-child"),L.attr("class","basic label-container").attr("style",q||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",U??5).attr("ry",W??5).attr("x",v).attr("y",F).attr("width",w).attr("height",_);const A="priority"in t&&t.priority;if(A){const E=n.append("line"),B=v+2,P=F+Math.floor((U??0)/2),$=F+_-Math.floor((U??0)/2);E.attr("x1",B).attr("y1",P).attr("x2",B).attr("y2",$).attr("stroke-width","4").attr("stroke",gw(A))}}return ct(t,L),t.height=_,t.intersect=function(A){return st.rect(t,A)},n}g(ip,"kanbanItem");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=dt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await mt(e,t,xt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,y=Math.max(l,d),m=Math.max(c,f);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let C;const x=`M0 0
208
208
  a${h},${h} 1 0,0 ${y*.25},${-1*m*.1}
209
209
  a${h},${h} 1 0,0 ${y*.25},0
210
210
  a${h},${h} 1 0,0 ${y*.25},0
@@ -256,35 +256,35 @@ ${a.join(`
256
256
  h${-(l-2*h)}
257
257
  q${-h},0 ${-h},${-h}
258
258
  Z
259
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),ct(t,d),t.calcIntersect=function(f,y){return st.rect(f,y)},t.intersect=function(f){return st.rect(t,f)},s}g(op,"defaultMindmapNode");async function np(e,t){const r={padding:t.padding??0};return fl(e,t,r)}g(np,"mindmapCircle");var pw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Rg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:qg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Hg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:og},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ng},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:dg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:jf},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Qf},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Xf},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ag},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:fl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:sp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ap},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Eg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_g},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Tg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Xg},{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:wg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:hg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ug},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Vf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Dg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:zg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Wg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:fg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:yg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ig},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Bg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Kg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:gg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Gg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:vg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Zg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Jg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:cg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Vg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ug},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ig},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Mg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Fg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Yf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Yg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Qg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:$g},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Lg}],yw=g(()=>{const t=[...Object.entries({state:Ng,choice:Zf,note:Ag,composite:Kf,rectWithTitle:Og,labelRect:Sg,block_arrow:Gf,collapsedGroup:Uf,iconSquare:bg,iconCircle:xg,icon:mg,iconRounded:Cg,imageSquare:kg,anchor:zf,kanbanItem:ip,mindmapCircle:np,defaultMindmapNode:op,classBox:ep,erBox:gl,requirementBox:rp}),...pw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),lp=yw();function mw(e){return e in lp}g(mw,"isValidShape");var Fa=g(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Ma=new Map;async function pl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?lp[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Xt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ma.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(pl,"insertNode");var pM=g((e,t)=>{Ma.set(t.id,e)},"setNodeElem"),xw=g(()=>{Ma.clear()},"clear"),cc=g(e=>{const t=Ma.get(e.id);I.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"),Cw=g(async(e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=dt(t),d=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),f=qe(r.flowchart.htmlLabels),y=t.direction==="LR",m=d.insert("g").attr("class","cluster-label swimlane-label"),C=await ve(m,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let x=C.getBBox();if(f){const Y=C.children[0],A=Ft(C);x=Y.getBoundingClientRect(),A.attr("width",x.width),A.attr("height",x.height)}const k=t.padding??0,w=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(w-t.width)/2-k:t.diff=-k;const T=t.height,_=t.y-T/2,L=t.y+T/2,F=t.x-w/2,v=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:_+T/3,U=y?4:0,W=x.height+2*U;let q,rt;if(y){const Y=Math.max(W,x.height+2*U),A=F+Y,E=Math.max(0,w-Y);if(t.look==="handDrawn"){const $=nt.svg(d),N=ot(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),V=ot(t,{roughness:.7,fill:"none",stroke:n,seed:s}),at=$.rectangle(F,_,Y,T,N);q=d.insert(()=>at,":first-child");const ht=$.rectangle(A,_,E,T,V);rt=d.insert(()=>ht,":first-child"),q.select("path:nth-child(2)").attr("style",h.join(";")),q.select("path").attr("style",u.join(";").replace("fill","stroke"))}else q=d.insert("rect",":first-child"),rt=d.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",_).attr("width",Y).attr("height",T).attr("fill",a).attr("stroke",n),rt.attr("class","swimlane-body").attr("style",c).attr("x",A).attr("y",_).attr("width",E).attr("height",T).attr("fill","none").attr("stroke",n);const B=F+Y/2,P=t.y;m.attr("transform",`translate(${B}, ${P}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const Y=Math.max(0,v-_),A=Math.min(W,Y),E=_+A,B=Math.max(0,L-E),P=t.x-w/2;if(t.look==="handDrawn"){const V=nt.svg(d),at=ot(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),ht=ot(t,{roughness:.7,fill:"none",stroke:n,seed:s}),gt=V.rectangle(P,_,w,A,at);q=d.insert(()=>gt,":first-child");const yt=V.rectangle(P,E,w,B,ht);rt=d.insert(()=>yt,":first-child"),q.select("path:nth-child(2)").attr("style",h.join(";")),q.select("path").attr("style",u.join(";").replace("fill","stroke"))}else q=d.insert("rect",":first-child"),rt=d.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",c).attr("x",P).attr("y",_).attr("width",w).attr("height",A).attr("fill",a).attr("stroke",n),rt.attr("class","swimlane-body").attr("style",c).attr("x",P).attr("y",E).attr("width",w).attr("height",B).attr("fill","none").attr("stroke",n);const $=t.x-x.width/2,N=_+(A-x.height)/2;m.attr("transform",`translate(${$}, ${N})`)}if(I.trace("Swimlane data ",t,JSON.stringify(t)),l){const Y=m.select("span");Y&&Y.attr("style",l)}return t.offsetX=0,t.width=w,t.height=T,t.offsetY=x.height-k/2,t.intersect=function(Y){return Fr(t,Y)},{cluster:d,labelBBox:x}},"swimlane"),hp=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=dt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=se(r),f=u.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ve(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):y=await ir(f,t.label,t.labelStyle||"",!1,!0);let m=y.getBBox();if(se(r)){const F=y.children[0],v=Ft(y);m=F.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}const C=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const F=nt.svg(u),v=ot(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),U=F.path(me(k,w,C,x,0),v);T=u.insert(()=>(I.debug("Rough node insert CXC",U),U),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:_}=Fa(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const F=f.select("span");F&&F.attr("style",n)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return Fr(t,F)},{cluster:u,labelBBox:m}},"rect"),bw=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Fr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),kw=g(async(e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,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"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=await ir(u,t.label,t.labelStyle,void 0,!0);let y=f.getBBox();if(se(r)){const U=f.children[0],W=Ft(f);y=U.getBoundingClientRect(),W.attr("width",y.width),W.attr("height",y.height)}const m=0*t.padding,C=m/2,x=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+m;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+m,w=t.height+m-y.height-6,T=t.x-x/2,_=t.y-k/2;t.width=x;const L=t.y-t.height/2-C+y.height+2;let F;if(t.look==="handDrawn"){const U=t.cssClasses.includes("statediagram-cluster-alt"),W=nt.svg(c),q=t.rx||t.ry?W.path(me(T,_,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):W.rectangle(T,_,x,k,{seed:s});F=c.insert(()=>q,":first-child");const rt=W.rectangle(T,L,x,w,{fill:U?a:o,fillStyle:U?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>q,":first-child"),d=c.insert(()=>rt)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",T).attr("y",_).attr("width",x).attr("height",k).attr("data-look",t.look),d.attr("class","inner").attr("x",T).attr("y",L).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-y.width/2}, ${_+1-(se(r)?0:3)})`);const v=F.node().getBBox();return t.height=v.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(U){return Fr(t,U)},{cluster:c,labelBBox:y}},"roundedWithTitle"),ww=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=dt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=se(r),f=u.insert("g").attr("class","cluster-label "),y=await ve(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=y.getBBox();if(se(r)){const F=y.children[0],v=Ft(y);m=F.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}const C=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const F=nt.svg(u),v=ot(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),U=F.path(me(k,w,C,x,t.rx),v);T=u.insert(()=>(I.debug("Rough node insert CXC",U),U),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:_}=Fa(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const F=f.select("span");F&&F.attr("style",n)}const L=T.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return Fr(t,F)},{cluster:u,labelBBox:m}},"kanbanSection"),Sw=g((e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const C=nt.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});f=o.insert(()=>C,":first-child")}else{f=n.insert("rect",":first-child");let m="outer";t.look,m="divider",f.attr("class",m).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look)}const y=f.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Fr(t,m)},{cluster:o,labelBBox:{}}},"divider"),Tw=hp,_w={rect:hp,squareRect:Tw,roundedWithTitle:kw,noteGroup:bw,divider:Sw,kanbanSection:ww,swimlane:Cw},cp=new Map,up=g(async(e,t)=>{const r=t.shape||"rect",i=await _w[r](e,t);return cp.set(t.id,i),i},"insertCluster"),Bw=g(()=>{cp=new Map},"clear"),$i=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),re={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},uc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function zi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ht(e),t=Ht(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}g(zi,"calculateDeltaAndAngle");var Ht=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vw=g(e=>({x:g(function(t,r,i){let s=0;const a=Ht(i[0]).x<Ht(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(re,e.arrowTypeStart)){const{angle:f,deltaX:y}=zi(i[0],i[1]);s=re[e.arrowTypeStart]*Math.cos(f)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(re,e.arrowTypeEnd)){const{angle:f,deltaX:y}=zi(i[i.length-1],i[i.length-2]);s=re[e.arrowTypeEnd]*Math.cos(f)*(y>=0?1:-1)}const o=Math.abs(Ht(t).x-Ht(i[i.length-1]).x),n=Math.abs(Ht(t).y-Ht(i[i.length-1]).y),l=Math.abs(Ht(t).x-Ht(i[0]).x),c=Math.abs(Ht(t).y-Ht(i[0]).y),h=re[e.arrowTypeStart],u=re[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let f=u+d-o;f*=a==="right"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,s+=f}return Ht(t).x+s},"x"),y:g(function(t,r,i){let s=0;const a=Ht(i[0]).y<Ht(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(re,e.arrowTypeStart)){const{angle:f,deltaY:y}=zi(i[0],i[1]);s=re[e.arrowTypeStart]*Math.abs(Math.sin(f))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(re,e.arrowTypeEnd)){const{angle:f,deltaY:y}=zi(i[i.length-1],i[i.length-2]);s=re[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(y>=0?1:-1)}const o=Math.abs(Ht(t).y-Ht(i[i.length-1]).y),n=Math.abs(Ht(t).x-Ht(i[i.length-1]).x),l=Math.abs(Ht(t).y-Ht(i[0]).y),c=Math.abs(Ht(t).x-Ht(i[0]).x),h=re[e.arrowTypeStart],u=re[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let f=u+d-o;f*=a==="up"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,s+=f}return Ht(t).y+s},"y")}),"getLineFunctionsWithOffset"),Lw=g((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&dc(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&dc(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),Fw={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}},Mw=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],dc=g((e,t,r,i,s,a,o=!1,n)=>{var y;if(!r||r==="none")return;const l=Fw[r],c=l&&Mw.includes(l.type);if(!l){I.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),C=`${f}_${m}`;if(!document.getElementById(C)){const x=document.getElementById(f);if(x){const k=x.cloneNode(!0);k.id=C,k.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",n),l.fill&&T.setAttribute("fill",n)}),(y=x.parentNode)==null||y.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${C})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),Aw=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=Et())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),fi=new Map,Ut=new Map,Ew=g(()=>{fi.clear(),Ut.clear()},"clear"),dp=g(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Oi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),yl=g(async(e,t)=>{const r=Et();let i=se(r);const{labelStyles:s}=dt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ve(e,t.label,{style:Oi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),I.info("abc82",t,t.labelType);let h,u;if(i){const f=c.children[0],y=Ft(c);h=await Tr.measure(()=>f.getBoundingClientRect()),u=h,y.attr("width",h.width),y.attr("height",h.height)}else{const f=Ft(c).select("text").node();await Tr.measure(()=>{h=c.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=h})}o.attr("transform",$i(u,i)),fi.set(t.id,a),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(y,t.startLabelLeft,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startLeft=f,Hi(d,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(y,t.startLabelRight,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startRight=f,Hi(d,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(f,t.endLabelLeft,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endLeft=f,Hi(d,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(f,t.endLabelRight,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endRight=f,Hi(d,t.endLabelRight)}return c},"insertEdgeLabel");function Hi(e,t){se(Et())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Hi,"setTerminalWidth");var $w=g((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,fi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Et(),{subGraphTitleTotalMargin:s}=Fa(i);if(e.label){const a=fi.get(e.id);let o=e.x,n=e.y;if(r){const l=ie.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ut.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Ow=g((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Pw=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),Dw=g((e,t,r)=>{I.debug(`intersection calc abc89:
259
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),ct(t,d),t.calcIntersect=function(f,y){return st.rect(f,y)},t.intersect=function(f){return st.rect(t,f)},s}g(op,"defaultMindmapNode");async function np(e,t){const r={padding:t.padding??0};return fl(e,t,r)}g(np,"mindmapCircle");var pw=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Rg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:qg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Hg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:og},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:ng},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:dg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:jf},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Qf},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Xf},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ag},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:fl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:sp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ap},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Eg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:_g},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Tg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Xg},{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:wg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:hg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ug},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Vf},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Dg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:zg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Wg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:fg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:yg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:eg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:rg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ig},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Bg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Kg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:gg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Gg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:vg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Zg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Jg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:cg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Vg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ug},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ig},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Mg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Fg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Yf},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:jg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Yg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Qg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:$g},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Lg}],yw=g(()=>{const t=[...Object.entries({state:Ng,choice:Zf,note:Ag,composite:Kf,rectWithTitle:Og,labelRect:Sg,block_arrow:Gf,collapsedGroup:Uf,iconSquare:bg,iconCircle:xg,icon:mg,iconRounded:Cg,imageSquare:kg,anchor:zf,kanbanItem:ip,mindmapCircle:np,defaultMindmapNode:op,classBox:ep,erBox:gl,requirementBox:rp}),...pw.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),lp=yw();function mw(e){return e in lp}g(mw,"isValidShape");var Fa=g(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Ma=new Map;async function pl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?lp[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Xt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Ma.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(pl,"insertNode");var pM=g((e,t)=>{Ma.set(t.id,e)},"setNodeElem"),xw=g(()=>{Ma.clear()},"clear"),cc=g(e=>{const t=Ma.get(e.id);I.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"),Cw=g(async(e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=dt(t),d=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),f=qe(r.flowchart.htmlLabels),y=t.direction==="LR",m=d.insert("g").attr("class","cluster-label swimlane-label"),C=await ve(m,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let x=C.getBBox();if(f){const Y=C.children[0],A=Ft(C);x=Y.getBoundingClientRect(),A.attr("width",x.width),A.attr("height",x.height)}const k=t.padding??0,w=t.width<=x.width+k?x.width+k:t.width;t.width<=x.width+k?t.diff=(w-t.width)/2-k:t.diff=-k;const T=t.height,_=t.y-T/2,v=t.y+T/2,F=t.x-w/2,L=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:_+T/3,U=y?4:0,W=x.height+2*U;let q,rt;if(y){const Y=Math.max(W,x.height+2*U),A=F+Y,E=Math.max(0,w-Y);if(t.look==="handDrawn"){const $=nt.svg(d),N=ot(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),V=ot(t,{roughness:.7,fill:"none",stroke:n,seed:s}),at=$.rectangle(F,_,Y,T,N);q=d.insert(()=>at,":first-child");const ht=$.rectangle(A,_,E,T,V);rt=d.insert(()=>ht,":first-child"),q.select("path:nth-child(2)").attr("style",h.join(";")),q.select("path").attr("style",u.join(";").replace("fill","stroke"))}else q=d.insert("rect",":first-child"),rt=d.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",_).attr("width",Y).attr("height",T).attr("fill",a).attr("stroke",n),rt.attr("class","swimlane-body").attr("style",c).attr("x",A).attr("y",_).attr("width",E).attr("height",T).attr("fill","none").attr("stroke",n);const B=F+Y/2,P=t.y;m.attr("transform",`translate(${B}, ${P}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const Y=Math.max(0,L-_),A=Math.min(W,Y),E=_+A,B=Math.max(0,v-E),P=t.x-w/2;if(t.look==="handDrawn"){const V=nt.svg(d),at=ot(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),ht=ot(t,{roughness:.7,fill:"none",stroke:n,seed:s}),gt=V.rectangle(P,_,w,A,at);q=d.insert(()=>gt,":first-child");const yt=V.rectangle(P,E,w,B,ht);rt=d.insert(()=>yt,":first-child"),q.select("path:nth-child(2)").attr("style",h.join(";")),q.select("path").attr("style",u.join(";").replace("fill","stroke"))}else q=d.insert("rect",":first-child"),rt=d.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",c).attr("x",P).attr("y",_).attr("width",w).attr("height",A).attr("fill",a).attr("stroke",n),rt.attr("class","swimlane-body").attr("style",c).attr("x",P).attr("y",E).attr("width",w).attr("height",B).attr("fill","none").attr("stroke",n);const $=t.x-x.width/2,N=_+(A-x.height)/2;m.attr("transform",`translate(${$}, ${N})`)}if(I.trace("Swimlane data ",t,JSON.stringify(t)),l){const Y=m.select("span");Y&&Y.attr("style",l)}return t.offsetX=0,t.width=w,t.height=T,t.offsetY=x.height-k/2,t.intersect=function(Y){return Fr(t,Y)},{cluster:d,labelBBox:x}},"swimlane"),hp=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=dt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=se(r),f=u.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await ve(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):y=await ir(f,t.label,t.labelStyle||"",!1,!0);let m=y.getBBox();if(se(r)){const F=y.children[0],L=Ft(y);m=F.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const C=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const F=nt.svg(u),L=ot(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),U=F.path(me(k,w,C,x,0),L);T=u.insert(()=>(I.debug("Rough node insert CXC",U),U),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:_}=Fa(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const F=f.select("span");F&&F.attr("style",n)}const v=T.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return Fr(t,F)},{cluster:u,labelBBox:m}},"rect"),bw=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Fr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),kw=g(async(e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,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"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=await ir(u,t.label,t.labelStyle,void 0,!0);let y=f.getBBox();if(se(r)){const U=f.children[0],W=Ft(f);y=U.getBoundingClientRect(),W.attr("width",y.width),W.attr("height",y.height)}const m=0*t.padding,C=m/2,x=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+m;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+m,w=t.height+m-y.height-6,T=t.x-x/2,_=t.y-k/2;t.width=x;const v=t.y-t.height/2-C+y.height+2;let F;if(t.look==="handDrawn"){const U=t.cssClasses.includes("statediagram-cluster-alt"),W=nt.svg(c),q=t.rx||t.ry?W.path(me(T,_,x,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):W.rectangle(T,_,x,k,{seed:s});F=c.insert(()=>q,":first-child");const rt=W.rectangle(T,v,x,w,{fill:U?a:o,fillStyle:U?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>q,":first-child"),d=c.insert(()=>rt)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",T).attr("y",_).attr("width",x).attr("height",k).attr("data-look",t.look),d.attr("class","inner").attr("x",T).attr("y",v).attr("width",x).attr("height",w);u.attr("transform",`translate(${t.x-y.width/2}, ${_+1-(se(r)?0:3)})`);const L=F.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(U){return Fr(t,U)},{cluster:c,labelBBox:y}},"roundedWithTitle"),ww=g(async(e,t)=>{I.info("Creating subgraph rect for ",t.id,t);const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=dt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=se(r),f=u.insert("g").attr("class","cluster-label "),y=await ve(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=y.getBBox();if(se(r)){const F=y.children[0],L=Ft(y);m=F.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const C=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,k=t.x-C/2,w=t.y-x/2;I.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const F=nt.svg(u),L=ot(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),U=F.path(me(k,w,C,x,t.rx),L);T=u.insert(()=>(I.debug("Rough node insert CXC",U),U),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",h.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",w).attr("width",C).attr("height",x);const{subGraphTitleTopMargin:_}=Fa(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const F=f.select("span");F&&F.attr("style",n)}const v=T.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return Fr(t,F)},{cluster:u,labelBBox:m}},"kanbanSection"),Sw=g((e,t)=>{const r=Et(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const C=nt.svg(o).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});f=o.insert(()=>C,":first-child")}else{f=n.insert("rect",":first-child");let m="outer";t.look,m="divider",f.attr("class",m).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look)}const y=f.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Fr(t,m)},{cluster:o,labelBBox:{}}},"divider"),Tw=hp,_w={rect:hp,squareRect:Tw,roundedWithTitle:kw,noteGroup:bw,divider:Sw,kanbanSection:ww,swimlane:Cw},cp=new Map,up=g(async(e,t)=>{const r=t.shape||"rect",i=await _w[r](e,t);return cp.set(t.id,i),i},"insertCluster"),Bw=g(()=>{cp=new Map},"clear"),$i=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),re={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},uc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function zi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Ht(e),t=Ht(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}g(zi,"calculateDeltaAndAngle");var Ht=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),vw=g(e=>({x:g(function(t,r,i){let s=0;const a=Ht(i[0]).x<Ht(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(re,e.arrowTypeStart)){const{angle:f,deltaX:y}=zi(i[0],i[1]);s=re[e.arrowTypeStart]*Math.cos(f)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(re,e.arrowTypeEnd)){const{angle:f,deltaX:y}=zi(i[i.length-1],i[i.length-2]);s=re[e.arrowTypeEnd]*Math.cos(f)*(y>=0?1:-1)}const o=Math.abs(Ht(t).x-Ht(i[i.length-1]).x),n=Math.abs(Ht(t).y-Ht(i[i.length-1]).y),l=Math.abs(Ht(t).x-Ht(i[0]).x),c=Math.abs(Ht(t).y-Ht(i[0]).y),h=re[e.arrowTypeStart],u=re[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let f=u+d-o;f*=a==="right"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,s+=f}return Ht(t).x+s},"x"),y:g(function(t,r,i){let s=0;const a=Ht(i[0]).y<Ht(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(re,e.arrowTypeStart)){const{angle:f,deltaY:y}=zi(i[0],i[1]);s=re[e.arrowTypeStart]*Math.abs(Math.sin(f))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(re,e.arrowTypeEnd)){const{angle:f,deltaY:y}=zi(i[i.length-1],i[i.length-2]);s=re[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(y>=0?1:-1)}const o=Math.abs(Ht(t).y-Ht(i[i.length-1]).y),n=Math.abs(Ht(t).x-Ht(i[i.length-1]).x),l=Math.abs(Ht(t).y-Ht(i[0]).y),c=Math.abs(Ht(t).x-Ht(i[0]).x),h=re[e.arrowTypeStart],u=re[e.arrowTypeEnd],d=1;if(o<u&&o>0&&n<u){let f=u+d-o;f*=a==="up"?-1:1,s-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,s+=f}return Ht(t).y+s},"y")}),"getLineFunctionsWithOffset"),Lw=g((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&dc(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&dc(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),Fw={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}},Mw=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],dc=g((e,t,r,i,s,a,o=!1,n)=>{var y;if(!r||r==="none")return;const l=Fw[r],c=l&&Mw.includes(l.type);if(!l){I.warn(`Unknown arrow type: ${r}`);return}const h=l.type,f=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),C=`${f}_${m}`;if(!document.getElementById(C)){const x=document.getElementById(f);if(x){const k=x.cloneNode(!0);k.id=C,k.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",n),l.fill&&T.setAttribute("fill",n)}),(y=x.parentNode)==null||y.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${C})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),Aw=g(e=>{var t,r;return typeof e=="string"?e:(r=(t=Et())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),fi=new Map,Ut=new Map,Ew=g(()=>{fi.clear(),Ut.clear()},"clear"),dp=g(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Oi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),yl=g(async(e,t)=>{const r=Et();let i=se(r);const{labelStyles:s}=dt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await ve(e,t.label,{style:Oi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),I.info("abc82",t,t.labelType);let h,u;if(i){const f=c.children[0],y=Ft(c);h=await Tr.measure(()=>f.getBoundingClientRect()),u=h,y.attr("width",h.width),y.attr("height",h.height)}else{const f=Ft(c).select("text").node();await Tr.measure(()=>{h=c.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=h})}o.attr("transform",$i(u,i)),fi.set(t.id,a),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(y,t.startLabelLeft,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startLeft=f,Hi(d,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(y,t.startLabelRight,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startRight=f,Hi(d,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(f,t.endLabelLeft,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endLeft=f,Hi(d,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),y=f.insert("g").attr("class","inner"),m=await ir(f,t.endLabelRight,Oi(t.labelStyle)||"",!1,!1);d=m;let C=m.getBBox();if(i){const x=m.children[0],k=Ft(m);C=x.getBoundingClientRect(),k.attr("width",C.width),k.attr("height",C.height)}y.attr("transform",$i(C,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endRight=f,Hi(d,t.endLabelRight)}return c},"insertEdgeLabel");function Hi(e,t){se(Et())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Hi,"setTerminalWidth");var $w=g((e,t)=>{I.debug("Moving label abc88 ",e.id,e.label,fi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Et(),{subGraphTitleTotalMargin:s}=Fa(i);if(e.label){const a=fi.get(e.id);let o=e.x,n=e.y;if(r){const l=ie.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=Ut.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Ow=g((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Pw=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),Dw=g((e,t,r)=>{I.debug(`intersection calc abc89:
260
260
  outsidePoint: ${JSON.stringify(t)}
261
261
  insidePoint : ${JSON.stringify(r)}
262
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const d={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),I.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,d),d}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,d=r.x<t.x?r.x+h-n:r.x-h+n,f=r.y<t.y?r.y+u:r.y-u;return I.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:d,_y:f}),n===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),fc=g((e,t)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(I.info("abc88 checking point",a,t),!Pw(t,a)&&!s){const o=Dw(t,i,a);I.debug("abc88 inside",a,i,o),I.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?I.warn("abc88 no intersect",o,r):r.push(o),s=!0}else I.warn("abc88 outside",a,i),i=a,s||r.push(a)}),I.debug("returning points",r),r},"cutPathAtIntersect");function fp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(fp,"extractCornerPoints");var gc=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),Iw=g(function(e){const{cornerPointPositions:t}=fp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=gc(s,o,5),l=gc(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){I.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const f=5;o.x===n.x?d={x:c<0?n.x-f+u:n.x+f-u,y:h<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:h<0?n.y-f+u:n.y+f-u}}else I.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),Rw=g((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),gp=g(function(e,t,r,i,s,a,o,n=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Et();let h=t.points,u=!1;const d=s;var f=a;const y=[];for(const N in t.cssCompiledStyles)Id(N)||y.push(t.cssCompiledStyles[N]);if(c==="swimlane"){if(f.intersect&&d.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[d.intersect(h[0]),f.intersect(h[1])];else{const N=h.slice(1,-1),V=N[0],at=N[N.length-1],ht=.5,gt=Math.abs(h[h.length-1].x-at.x)<ht&&Math.abs(h[h.length-1].y-at.y)<ht,yt=d.intersect(V),pt=gt?at:f.intersect(at),_t=Math.abs(pt.x-at.x)<ht&&Math.abs(pt.y-at.y)<ht,$t=Math.abs(yt.x-V.x)<ht&&Math.abs(yt.y-V.y)<ht?[]:[yt],bt=_t?[]:[pt];h=[...$t,...N,...bt]}h=Ow(t,h)}else f.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),h.push(f.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(I.info("to cluster abc88",r.get(t.toCluster)),h=fc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(I.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=fc(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=h.filter(N=>!Number.isNaN(N.y));const x=Aw(t.curve);x!=="rounded"&&(C=Iw(C));let k=Vi;switch(x){case"linear":k=Vi;break;case"basis":k=Xo;break;case"cardinal":k=wd;break;case"bumpX":k=md;break;case"bumpY":k=xd;break;case"catmullRom":k=Td;break;case"monotoneX":k=Md;break;case"monotoneY":k=Ad;break;case"natural":k=$d;break;case"step":k=Od;break;case"stepAfter":k=Dd;break;case"stepBefore":k=Pd;break;case"rounded":k=Vi;break;default:k=Xo}const{x:w,y:T}=vw(t),_=Jb().x(w).y(T).curve(k);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let F,v=x==="rounded"?pp(yp(C,t),5):_(C);const U=Array.isArray(t.style)?t.style:[t.style];let W=U.find(N=>N==null?void 0:N.startsWith("stroke:")),q="";t.animate&&(q="edge-animation-fast"),t.animation&&(q="edge-animation-"+t.animation);let rt=!1;if(t.look==="handDrawn"){const N=nt.svg(e);Object.assign([],C);const V=N.path(v,{roughness:.3,seed:l});L+=" transition",F=Ft(V).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",U?U.reduce((ht,gt)=>ht+";"+gt,""):"");let at=F.attr("d");F.attr("d",at),e.node().appendChild(F.node())}else{const N=y.join(";"),V=U?U.reduce((_t,wt)=>_t+wt+";",""):"",at=(N?N+";"+V+";":V)+";"+(U?U.reduce((_t,wt)=>_t+";"+wt,""):"");F=e.append("path").attr("d",v).attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",at),W=($=at.match(/stroke:([^;]+)/))==null?void 0:$[1],rt=t.animate===!0||!!t.animation||N.includes("animation");const ht=F.node(),gt=typeof ht.getTotalLength=="function"?ht.getTotalLength():0,yt=uc[t.arrowTypeStart]||0,pt=uc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!rt){const wt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Rw(gt,yt,pt):`0 ${yt} ${gt-yt-pt} ${pt}`}; stroke-dashoffset: 0;`;F.attr("style",wt+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",m),F.attr("data-look",Xt(t.look)),t.showPoints&&C.forEach(N=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",N.x).attr("cy",N.y)});let Y="";(Et().flowchart.arrowMarkerAbsolute||Et().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd);const A=!rt&&(t==null?void 0:t.look)==="neo";Lw(F,t,Y,o,i,A,W);const E=Math.floor(h.length/2),B=h[E];ie.isLabelCoordinateInPath(B,F.attr("d"))||(u=!0);let P={};return u&&(P.updatedPath=h),P.originalPath=t.points,P},"insertEdge");function pp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,d=l.y-o.y,f=Math.hypot(c,h),y=Math.hypot(u,d);if(f<s||y<s){r+=`L${o.x},${o.y}`;continue}const m=c/f,C=h/f,x=u/y,k=d/y,w=m*x+C*k,T=Math.max(-1,Math.min(1,w)),_=Math.acos(T);if(_<s||Math.abs(Math.PI-_)<s){r+=`L${o.x},${o.y}`;continue}const L=Math.min(t/Math.sin(_/2),f/2,y/2),F=o.x-m*L,v=o.y-C*L,U=o.x+x*L,W=o.y+k*L;r+=`L${F},${v}`,r+=`Q${o.x},${o.y} ${U},${W}`}}return r}g(pp,"generateRoundedPath");function un(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(un,"calculateDeltaAndAngle");function yp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&re[t.arrowTypeStart]){const s=re[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=un(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&re[t.arrowTypeEnd]){const s=re[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=un(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}g(yp,"applyMarkerOffsetsToPoints");var qw=g((e,t,r,i)=>{t.forEach(s=>{lS[s](e,r,i)})},"insertMarkers"),Nw=g((e,t,r)=>{I.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"),Ww=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),zw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Hw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Yw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),jw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Uw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Gw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Xw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Vw=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Zw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Kw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Qw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Jw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),tS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),eS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),rS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),iS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),sS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
262
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const d={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),I.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,d),d}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,d=r.x<t.x?r.x+h-n:r.x-h+n,f=r.y<t.y?r.y+u:r.y-u;return I.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:d,_y:f}),n===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),fc=g((e,t)=>{I.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(I.info("abc88 checking point",a,t),!Pw(t,a)&&!s){const o=Dw(t,i,a);I.debug("abc88 inside",a,i,o),I.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?I.warn("abc88 no intersect",o,r):r.push(o),s=!0}else I.warn("abc88 outside",a,i),i=a,s||r.push(a)}),I.debug("returning points",r),r},"cutPathAtIntersect");function fp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(fp,"extractCornerPoints");var gc=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),Iw=g(function(e){const{cornerPointPositions:t}=fp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=gc(s,o,5),l=gc(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){I.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const f=5;o.x===n.x?d={x:c<0?n.x-f+u:n.x+f-u,y:h<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:h<0?n.y-f+u:n.y+f-u}}else I.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),Rw=g((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),gp=g(function(e,t,r,i,s,a,o,n=!1){var $;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Et();let h=t.points,u=!1;const d=s;var f=a;const y=[];for(const N in t.cssCompiledStyles)Id(N)||y.push(t.cssCompiledStyles[N]);if(c==="swimlane"){if(f.intersect&&d.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[d.intersect(h[0]),f.intersect(h[1])];else{const N=h.slice(1,-1),V=N[0],at=N[N.length-1],ht=.5,gt=Math.abs(h[h.length-1].x-at.x)<ht&&Math.abs(h[h.length-1].y-at.y)<ht,yt=d.intersect(V),pt=gt?at:f.intersect(at),_t=Math.abs(pt.x-at.x)<ht&&Math.abs(pt.y-at.y)<ht,$t=Math.abs(yt.x-V.x)<ht&&Math.abs(yt.y-V.y)<ht?[]:[yt],bt=_t?[]:[pt];h=[...$t,...N,...bt]}h=Ow(t,h)}else f.intersect&&d.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),h.push(f.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(I.info("to cluster abc88",r.get(t.toCluster)),h=fc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(I.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=fc(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let C=h.filter(N=>!Number.isNaN(N.y));const x=Aw(t.curve);x!=="rounded"&&(C=Iw(C));let k=Vi;switch(x){case"linear":k=Vi;break;case"basis":k=Xo;break;case"cardinal":k=wd;break;case"bumpX":k=md;break;case"bumpY":k=xd;break;case"catmullRom":k=Td;break;case"monotoneX":k=Md;break;case"monotoneY":k=Ad;break;case"natural":k=$d;break;case"step":k=Od;break;case"stepAfter":k=Dd;break;case"stepBefore":k=Pd;break;case"rounded":k=Vi;break;default:k=Xo}const{x:w,y:T}=vw(t),_=Jb().x(w).y(T).curve(k);let v;switch(t.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(t.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let F,L=x==="rounded"?pp(yp(C,t),5):_(C);const U=Array.isArray(t.style)?t.style:[t.style];let W=U.find(N=>N==null?void 0:N.startsWith("stroke:")),q="";t.animate&&(q="edge-animation-fast"),t.animation&&(q="edge-animation-"+t.animation);let rt=!1;if(t.look==="handDrawn"){const N=nt.svg(e);Object.assign([],C);const V=N.path(L,{roughness:.3,seed:l});v+=" transition",F=Ft(V).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",U?U.reduce((ht,gt)=>ht+";"+gt,""):"");let at=F.attr("d");F.attr("d",at),e.node().appendChild(F.node())}else{const N=y.join(";"),V=U?U.reduce((_t,wt)=>_t+wt+";",""):"",at=(N?N+";"+V+";":V)+";"+(U?U.reduce((_t,wt)=>_t+";"+wt,""):"");F=e.append("path").attr("d",L).attr("id",`${o}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(q?" "+q:"")).attr("style",at),W=($=at.match(/stroke:([^;]+)/))==null?void 0:$[1],rt=t.animate===!0||!!t.animation||N.includes("animation");const ht=F.node(),gt=typeof ht.getTotalLength=="function"?ht.getTotalLength():0,yt=uc[t.arrowTypeStart]||0,pt=uc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!rt){const wt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Rw(gt,yt,pt):`0 ${yt} ${gt-yt-pt} ${pt}`}; stroke-dashoffset: 0;`;F.attr("style",wt+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",m),F.attr("data-look",Xt(t.look)),t.showPoints&&C.forEach(N=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",N.x).attr("cy",N.y)});let Y="";(Et().flowchart.arrowMarkerAbsolute||Et().state.arrowMarkerAbsolute)&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),I.info("arrowTypeStart",t.arrowTypeStart),I.info("arrowTypeEnd",t.arrowTypeEnd);const A=!rt&&(t==null?void 0:t.look)==="neo";Lw(F,t,Y,o,i,A,W);const E=Math.floor(h.length/2),B=h[E];ie.isLabelCoordinateInPath(B,F.attr("d"))||(u=!0);let P={};return u&&(P.updatedPath=h),P.originalPath=t.points,P},"insertEdge");function pp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,d=l.y-o.y,f=Math.hypot(c,h),y=Math.hypot(u,d);if(f<s||y<s){r+=`L${o.x},${o.y}`;continue}const m=c/f,C=h/f,x=u/y,k=d/y,w=m*x+C*k,T=Math.max(-1,Math.min(1,w)),_=Math.acos(T);if(_<s||Math.abs(Math.PI-_)<s){r+=`L${o.x},${o.y}`;continue}const v=Math.min(t/Math.sin(_/2),f/2,y/2),F=o.x-m*v,L=o.y-C*v,U=o.x+x*v,W=o.y+k*v;r+=`L${F},${L}`,r+=`Q${o.x},${o.y} ${U},${W}`}}return r}g(pp,"generateRoundedPath");function un(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(un,"calculateDeltaAndAngle");function yp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&re[t.arrowTypeStart]){const s=re[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=un(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&re[t.arrowTypeEnd]){const s=re[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=un(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}g(yp,"applyMarkerOffsetsToPoints");var qw=g((e,t,r,i)=>{t.forEach(s=>{lS[s](e,r,i)})},"insertMarkers"),Nw=g((e,t,r)=>{I.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").attr("markerUnits","userSpaceOnUse").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"),Ww=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),zw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),Hw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),Yw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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").attr("markerUnits","userSpaceOnUse").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"),jw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Uw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Gw=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Xw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Vw=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Zw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Kw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Qw=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Jw=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),tS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),eS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),rS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),iS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,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",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),sS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
263
263
  L20,10
264
264
  M20,10
265
265
  L0,20`)},"requirement_arrow"),aS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
266
266
  L20,10
267
267
  M20,10
268
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),oS=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),nS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=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");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),lS={extension:Nw,composition:Ww,aggregation:zw,dependency:Hw,lollipop:Yw,point:jw,circle:Uw,cross:Gw,barb:Xw,barbNeo:Vw,only_one:Zw,zero_or_one:Kw,one_or_more:Qw,zero_or_more:Jw,only_one_neo:tS,zero_or_one_neo:eS,one_or_more_neo:rS,zero_or_more_neo:iS,requirement_arrow:sS,requirement_contains:oS,requirement_arrow_neo:aS,requirement_contains_neo:nS},mp=qw,xp=typeof global=="object"&&global&&global.Object===Object&&global,hS=typeof self=="object"&&self&&self.Object===Object&&self,Ke=xp||hS||Function("return this")(),De=Ke.Symbol,Cp=Object.prototype,cS=Cp.hasOwnProperty,uS=Cp.toString,Pi=De?De.toStringTag:void 0;function dS(e){var t=cS.call(e,Pi),r=e[Pi];try{e[Pi]=void 0;var i=!0}catch{}var s=uS.call(e);return i&&(t?e[Pi]=r:delete e[Pi]),s}var fS=Object.prototype,gS=fS.toString;function pS(e){return gS.call(e)}var yS="[object Null]",mS="[object Undefined]",pc=De?De.toStringTag:void 0;function xi(e){return e==null?e===void 0?mS:yS:pc&&pc in Object(e)?dS(e):pS(e)}function _r(e){return e!=null&&typeof e=="object"}var xS="[object Symbol]";function ml(e){return typeof e=="symbol"||_r(e)&&xi(e)==xS}function bp(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var ce=Array.isArray,yc=De?De.prototype:void 0,mc=yc?yc.toString:void 0;function kp(e){if(typeof e=="string")return e;if(ce(e))return bp(e,kp)+"";if(ml(e))return mc?mc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function xl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Aa(e){return e}var CS="[object AsyncFunction]",bS="[object Function]",kS="[object GeneratorFunction]",wS="[object Proxy]";function fa(e){if(!xl(e))return!1;var t=xi(e);return t==bS||t==kS||t==CS||t==wS}var ro=Ke["__core-js_shared__"],xc=function(){var e=/[^.]+$/.exec(ro&&ro.keys&&ro.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function SS(e){return!!xc&&xc in e}var TS=Function.prototype,_S=TS.toString;function Mr(e){if(e!=null){try{return _S.call(e)}catch{}try{return e+""}catch{}}return""}var BS=/[\\^$.*+?()[\]{}|]/g,vS=/^\[object .+?Constructor\]$/,LS=Function.prototype,FS=Object.prototype,MS=LS.toString,AS=FS.hasOwnProperty,ES=RegExp("^"+MS.call(AS).replace(BS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $S(e){if(!xl(e)||SS(e))return!1;var t=fa(e)?ES:vS;return t.test(Mr(e))}function OS(e,t){return e==null?void 0:e[t]}function Ar(e,t){var r=OS(e,t);return $S(r)?r:void 0}var dn=Ar(Ke,"WeakMap");function PS(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function DS(){}var IS=800,RS=16,qS=Date.now;function NS(e){var t=0,r=0;return function(){var i=qS(),s=RS-(i-r);if(r=i,s>0){if(++t>=IS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Yi(e){return function(){return e}}var Cc=function(){try{var e=Ar(Object,"defineProperty");return e({},"",{}),e}catch{}}(),WS=Cc?function(e,t){return Cc(e,"toString",{configurable:!0,enumerable:!1,value:Yi(t),writable:!0})}:Aa,zS=NS(WS);function HS(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function YS(e,t,r,i){for(var s=e.length,a=r+-1;++a<s;)if(t(e[a],a,e))return a;return-1}function jS(e){return e!==e}function US(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function GS(e,t,r){return t===t?US(e,t,r):YS(e,jS,r)}function XS(e,t){var r=e==null?0:e.length;return!!r&&GS(e,t,0)>-1}var VS=9007199254740991,ZS=/^(?:0|[1-9]\d*)$/;function wp(e,t){var r=typeof e;return t=t??VS,!!t&&(r=="number"||r!="symbol"&&ZS.test(e))&&e>-1&&e%1==0&&e<t}function Sp(e,t){return e===t||e!==e&&t!==t}var bc=Math.max;function KS(e,t,r){return t=bc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=bc(i.length-t,0),o=Array(a);++s<a;)o[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(o),PS(e,this,n)}}function QS(e,t){return zS(KS(e,t,Aa),e+"")}var JS=9007199254740991;function Cl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JS}function Ea(e){return e!=null&&Cl(e.length)&&!fa(e)}var tT=Object.prototype;function Tp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||tT;return e===r}function eT(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var rT="[object Arguments]";function kc(e){return _r(e)&&xi(e)==rT}var _p=Object.prototype,iT=_p.hasOwnProperty,sT=_p.propertyIsEnumerable,$a=kc(function(){return arguments}())?kc:function(e){return _r(e)&&iT.call(e,"callee")&&!sT.call(e,"callee")};function aT(){return!1}var Bp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wc=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,oT=wc&&wc.exports===Bp,Sc=oT?Ke.Buffer:void 0,nT=Sc?Sc.isBuffer:void 0,ga=nT||aT,lT="[object Arguments]",hT="[object Array]",cT="[object Boolean]",uT="[object Date]",dT="[object Error]",fT="[object Function]",gT="[object Map]",pT="[object Number]",yT="[object Object]",mT="[object RegExp]",xT="[object Set]",CT="[object String]",bT="[object WeakMap]",kT="[object ArrayBuffer]",wT="[object DataView]",ST="[object Float32Array]",TT="[object Float64Array]",_T="[object Int8Array]",BT="[object Int16Array]",vT="[object Int32Array]",LT="[object Uint8Array]",FT="[object Uint8ClampedArray]",MT="[object Uint16Array]",AT="[object Uint32Array]",zt={};zt[ST]=zt[TT]=zt[_T]=zt[BT]=zt[vT]=zt[LT]=zt[FT]=zt[MT]=zt[AT]=!0;zt[lT]=zt[hT]=zt[kT]=zt[cT]=zt[wT]=zt[uT]=zt[dT]=zt[fT]=zt[gT]=zt[pT]=zt[yT]=zt[mT]=zt[xT]=zt[CT]=zt[bT]=!1;function ET(e){return _r(e)&&Cl(e.length)&&!!zt[xi(e)]}function $T(e){return function(t){return e(t)}}var vp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ki=vp&&typeof module=="object"&&module&&!module.nodeType&&module,OT=Ki&&Ki.exports===vp,io=OT&&xp.process,Tc=function(){try{var e=Ki&&Ki.require&&Ki.require("util").types;return e||io&&io.binding&&io.binding("util")}catch{}}(),_c=Tc&&Tc.isTypedArray,bl=_c?$T(_c):ET,PT=Object.prototype,DT=PT.hasOwnProperty;function IT(e,t){var r=ce(e),i=!r&&$a(e),s=!r&&!i&&ga(e),a=!r&&!i&&!s&&bl(e),o=r||i||s||a,n=o?eT(e.length,String):[],l=n.length;for(var c in e)(t||DT.call(e,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wp(c,l)))&&n.push(c);return n}function RT(e,t){return function(r){return e(t(r))}}var qT=RT(Object.keys,Object),NT=Object.prototype,WT=NT.hasOwnProperty;function Lp(e){if(!Tp(e))return qT(e);var t=[];for(var r in Object(e))WT.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ee(e){return Ea(e)?IT(e):Lp(e)}var zT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HT=/^\w*$/;function kl(e,t){if(ce(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ml(e)?!0:HT.test(e)||!zT.test(e)||t!=null&&e in Object(t)}var ss=Ar(Object,"create");function YT(){this.__data__=ss?ss(null):{},this.size=0}function jT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var UT="__lodash_hash_undefined__",GT=Object.prototype,XT=GT.hasOwnProperty;function VT(e){var t=this.__data__;if(ss){var r=t[e];return r===UT?void 0:r}return XT.call(t,e)?t[e]:void 0}var ZT=Object.prototype,KT=ZT.hasOwnProperty;function QT(e){var t=this.__data__;return ss?t[e]!==void 0:KT.call(t,e)}var JT="__lodash_hash_undefined__";function t_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ss&&t===void 0?JT:t,this}function Br(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Br.prototype.clear=YT;Br.prototype.delete=jT;Br.prototype.get=VT;Br.prototype.has=QT;Br.prototype.set=t_;function e_(){this.__data__=[],this.size=0}function Oa(e,t){for(var r=e.length;r--;)if(Sp(e[r][0],t))return r;return-1}var r_=Array.prototype,i_=r_.splice;function s_(e){var t=this.__data__,r=Oa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():i_.call(t,r,1),--this.size,!0}function a_(e){var t=this.__data__,r=Oa(t,e);return r<0?void 0:t[r][1]}function o_(e){return Oa(this.__data__,e)>-1}function n_(e,t){var r=this.__data__,i=Oa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Qe.prototype.clear=e_;Qe.prototype.delete=s_;Qe.prototype.get=a_;Qe.prototype.has=o_;Qe.prototype.set=n_;var as=Ar(Ke,"Map");function l_(){this.size=0,this.__data__={hash:new Br,map:new(as||Qe),string:new Br}}function h_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pa(e,t){var r=e.__data__;return h_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function c_(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t}function u_(e){return Pa(this,e).get(e)}function d_(e){return Pa(this,e).has(e)}function f_(e,t){var r=Pa(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Je(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Je.prototype.clear=l_;Je.prototype.delete=c_;Je.prototype.get=u_;Je.prototype.has=d_;Je.prototype.set=f_;var g_="Expected a function";function wl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(g_);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(wl.Cache||Je),r}wl.Cache=Je;var p_=500;function y_(e){var t=wl(e,function(i){return r.size===p_&&r.clear(),i}),r=t.cache;return t}var m_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x_=/\\(\\)?/g,C_=y_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(m_,function(r,i,s,a){t.push(s?a.replace(x_,"$1"):i||r)}),t});function b_(e){return e==null?"":kp(e)}function Fp(e,t){return ce(e)?e:kl(e,t)?[e]:C_(b_(e))}function Da(e){if(typeof e=="string"||ml(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Mp(e,t){t=Fp(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Da(t[r++])];return r&&r==i?e:void 0}function k_(e,t,r){var i=e==null?void 0:Mp(e,t);return i===void 0?r:i}function Ap(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var Bc=De?De.isConcatSpreadable:void 0;function w_(e){return ce(e)||$a(e)||!!(Bc&&e&&e[Bc])}function S_(e,t,r,i,s){var a=-1,o=e.length;for(r||(r=w_),s||(s=[]);++a<o;){var n=e[a];r(n)?Ap(s,n):i||(s[s.length]=n)}return s}function T_(e,t,r,i){var s=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++s]);++s<a;)r=t(r,e[s],s,e);return r}function __(){this.__data__=new Qe,this.size=0}function B_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function v_(e){return this.__data__.get(e)}function L_(e){return this.__data__.has(e)}var F_=200;function M_(e,t){var r=this.__data__;if(r instanceof Qe){var i=r.__data__;if(!as||i.length<F_-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Je(i)}return r.set(e,t),this.size=r.size,this}function Xe(e){var t=this.__data__=new Qe(e);this.size=t.size}Xe.prototype.clear=__;Xe.prototype.delete=B_;Xe.prototype.get=v_;Xe.prototype.has=L_;Xe.prototype.set=M_;function Ep(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var o=e[r];t(o,r,e)&&(a[s++]=o)}return a}function A_(){return[]}var E_=Object.prototype,$_=E_.propertyIsEnumerable,vc=Object.getOwnPropertySymbols,O_=vc?function(e){return e==null?[]:(e=Object(e),Ep(vc(e),function(t){return $_.call(e,t)}))}:A_;function P_(e,t,r){var i=t(e);return ce(e)?i:Ap(i,r(e))}function Lc(e){return P_(e,Ee,O_)}var fn=Ar(Ke,"DataView"),gn=Ar(Ke,"Promise"),Ur=Ar(Ke,"Set"),Fc="[object Map]",D_="[object Object]",Mc="[object Promise]",Ac="[object Set]",Ec="[object WeakMap]",$c="[object DataView]",I_=Mr(fn),R_=Mr(as),q_=Mr(gn),N_=Mr(Ur),W_=Mr(dn),Ue=xi;(fn&&Ue(new fn(new ArrayBuffer(1)))!=$c||as&&Ue(new as)!=Fc||gn&&Ue(gn.resolve())!=Mc||Ur&&Ue(new Ur)!=Ac||dn&&Ue(new dn)!=Ec)&&(Ue=function(e){var t=xi(e),r=t==D_?e.constructor:void 0,i=r?Mr(r):"";if(i)switch(i){case I_:return $c;case R_:return Fc;case q_:return Mc;case N_:return Ac;case W_:return Ec}return t});var Oc=Ke.Uint8Array,z_="__lodash_hash_undefined__";function H_(e){return this.__data__.set(e,z_),this}function Y_(e){return this.__data__.has(e)}function os(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Je;++t<r;)this.add(e[t])}os.prototype.add=os.prototype.push=H_;os.prototype.has=Y_;function j_(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function $p(e,t){return e.has(t)}var U_=1,G_=2;function Op(e,t,r,i,s,a){var o=r&U_,n=e.length,l=t.length;if(n!=l&&!(o&&l>n))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var u=-1,d=!0,f=r&G_?new os:void 0;for(a.set(e,t),a.set(t,e);++u<n;){var y=e[u],m=t[u];if(i)var C=o?i(m,y,u,t,e,a):i(y,m,u,e,t,a);if(C!==void 0){if(C)continue;d=!1;break}if(f){if(!j_(t,function(x,k){if(!$p(f,k)&&(y===x||s(y,x,r,i,a)))return f.push(k)})){d=!1;break}}else if(!(y===m||s(y,m,r,i,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function X_(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function Sl(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var V_=1,Z_=2,K_="[object Boolean]",Q_="[object Date]",J_="[object Error]",tB="[object Map]",eB="[object Number]",rB="[object RegExp]",iB="[object Set]",sB="[object String]",aB="[object Symbol]",oB="[object ArrayBuffer]",nB="[object DataView]",Pc=De?De.prototype:void 0,so=Pc?Pc.valueOf:void 0;function lB(e,t,r,i,s,a,o){switch(r){case nB:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oB:return!(e.byteLength!=t.byteLength||!a(new Oc(e),new Oc(t)));case K_:case Q_:case eB:return Sp(+e,+t);case J_:return e.name==t.name&&e.message==t.message;case rB:case sB:return e==t+"";case tB:var n=X_;case iB:var l=i&V_;if(n||(n=Sl),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;i|=Z_,o.set(e,t);var h=Op(n(e),n(t),i,s,a,o);return o.delete(e),h;case aB:if(so)return so.call(e)==so.call(t)}return!1}var hB=1,cB=Object.prototype,uB=cB.hasOwnProperty;function dB(e,t,r,i,s,a){var o=r&hB,n=Lc(e),l=n.length,c=Lc(t),h=c.length;if(l!=h&&!o)return!1;for(var u=l;u--;){var d=n[u];if(!(o?d in t:uB.call(t,d)))return!1}var f=a.get(e),y=a.get(t);if(f&&y)return f==t&&y==e;var m=!0;a.set(e,t),a.set(t,e);for(var C=o;++u<l;){d=n[u];var x=e[d],k=t[d];if(i)var w=o?i(k,x,d,t,e,a):i(x,k,d,e,t,a);if(!(w===void 0?x===k||s(x,k,r,i,a):w)){m=!1;break}C||(C=d=="constructor")}if(m&&!C){var T=e.constructor,_=t.constructor;T!=_&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return a.delete(e),a.delete(t),m}var fB=1,Dc="[object Arguments]",Ic="[object Array]",Ls="[object Object]",gB=Object.prototype,Rc=gB.hasOwnProperty;function pB(e,t,r,i,s,a){var o=ce(e),n=ce(t),l=o?Ic:Ue(e),c=n?Ic:Ue(t);l=l==Dc?Ls:l,c=c==Dc?Ls:c;var h=l==Ls,u=c==Ls,d=l==c;if(d&&ga(e)){if(!ga(t))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new Xe),o||bl(e)?Op(e,t,r,i,s,a):lB(e,t,l,r,i,s,a);if(!(r&fB)){var f=h&&Rc.call(e,"__wrapped__"),y=u&&Rc.call(t,"__wrapped__");if(f||y){var m=f?e.value():e,C=y?t.value():t;return a||(a=new Xe),s(m,C,r,i,a)}}return d?(a||(a=new Xe),dB(e,t,r,i,s,a)):!1}function Tl(e,t,r,i,s){return e===t?!0:e==null||t==null||!_r(e)&&!_r(t)?e!==e&&t!==t:pB(e,t,r,i,Tl,s)}var yB=1,mB=2;function xB(e,t,r,i){var s=r.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var o=r[s];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++s<a;){o=r[s];var n=o[0],l=e[n],c=o[1];if(o[2]){if(l===void 0&&!(n in e))return!1}else{var h=new Xe,u;if(!(u===void 0?Tl(c,l,yB|mB,i,h):u))return!1}}return!0}function Pp(e){return e===e&&!xl(e)}function CB(e){for(var t=Ee(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Pp(s)]}return t}function Dp(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function bB(e){var t=CB(e);return t.length==1&&t[0][2]?Dp(t[0][0],t[0][1]):function(r){return r===e||xB(r,e,t)}}function kB(e,t){return e!=null&&t in Object(e)}function wB(e,t,r){t=Fp(t,e);for(var i=-1,s=t.length,a=!1;++i<s;){var o=Da(t[i]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++i!=s?a:(s=e==null?0:e.length,!!s&&Cl(s)&&wp(o,s)&&(ce(e)||$a(e)))}function SB(e,t){return e!=null&&wB(e,t,kB)}var TB=1,_B=2;function BB(e,t){return kl(e)&&Pp(t)?Dp(Da(e),t):function(r){var i=k_(r,e);return i===void 0&&i===t?SB(r,e):Tl(t,i,TB|_B)}}function vB(e){return function(t){return t==null?void 0:t[e]}}function LB(e){return function(t){return Mp(t,e)}}function FB(e){return kl(e)?vB(Da(e)):LB(e)}function Ip(e){return typeof e=="function"?e:e==null?Aa:typeof e=="object"?ce(e)?BB(e[0],e[1]):bB(e):FB(e)}function MB(e){return function(t,r,i){for(var s=-1,a=Object(t),o=i(t),n=o.length;n--;){var l=o[++s];if(r(a[l],l,a)===!1)break}return t}}var AB=MB();function EB(e,t){return e&&AB(e,t,Ee)}function $B(e,t){return function(r,i){if(r==null)return r;if(!Ea(r))return e(r,i);for(var s=r.length,a=-1,o=Object(r);++a<s&&i(o[a],a,o)!==!1;);return r}}var _l=$B(EB);function OB(e){return _r(e)&&Ea(e)}function PB(e){return typeof e=="function"?e:Aa}function ur(e,t){var r=ce(e)?HS:_l;return r(e,PB(t))}function DB(e,t){var r=[];return _l(e,function(i,s,a){t(i,s,a)&&r.push(i)}),r}function Fs(e,t){var r=ce(e)?Ep:DB;return r(e,Ip(t))}function IB(e,t){return bp(t,function(r){return e[r]})}function ao(e){return e==null?[]:IB(e,Ee(e))}var RB="[object Map]",qB="[object Set]",NB=Object.prototype,WB=NB.hasOwnProperty;function qc(e){if(e==null)return!0;if(Ea(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||ga(e)||bl(e)||$a(e)))return!e.length;var t=Ue(e);if(t==RB||t==qB)return!e.size;if(Tp(e))return!Lp(e).length;for(var r in e)if(WB.call(e,r))return!1;return!0}function zr(e){return e===void 0}function zB(e,t,r,i,s){return s(e,function(a,o,n){r=i?(i=!1,a):t(r,a,o,n)}),r}function HB(e,t,r){var i=ce(e)?T_:zB,s=arguments.length<3;return i(e,Ip(t),r,s,_l)}var YB=1/0,jB=Ur&&1/Sl(new Ur([,-0]))[1]==YB?function(e){return new Ur(e)}:DS,UB=200;function GB(e,t,r){var i=-1,s=XS,a=e.length,o=!0,n=[],l=n;if(a>=UB){var c=jB(e);if(c)return Sl(c);o=!1,s=$p,l=new os}else l=n;t:for(;++i<a;){var h=e[i],u=h;if(h=h!==0?h:0,o&&u===u){for(var d=l.length;d--;)if(l[d]===u)continue t;n.push(h)}else s(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var XB=QS(function(e){return GB(S_(e,1,OB,!0))}),VB="\0",dr="\0",Nc="";class Ia{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Yi(void 0),this._defaultEdgeLabelFn=Yi(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[dr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return fa(t)||(t=Yi(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Ee(this._nodes)}sources(){var t=this;return Fs(this.nodes(),function(r){return qc(t._in[r])})}sinks(){var t=this;return Fs(this.nodes(),function(r){return qc(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return ur(t,function(a){i.length>1?s.setNode(a,r):s.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=dr,this._children[t]={},this._children[dr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ur(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ur(Ee(this._in[t]),r),delete this._in[t],delete this._preds[t],ur(Ee(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(zr(r))r=dr;else{r+="";for(var i=r;!zr(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==dr)return r}}children(t){if(zr(t)&&(t=dr),this._isCompound){var r=this._children[t];if(r)return Ee(r)}else{if(t===dr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Ee(r)}successors(t){var r=this._sucs[t];if(r)return Ee(r)}neighbors(t){var r=this.predecessors(t);if(r)return XB(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ur(this._nodes,function(o,n){t(n)&&r.setNode(n,o)}),ur(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var s={};function a(o){var n=i.parent(o);return n===void 0||r.hasNode(n)?(s[o]=n,n):n in s?s[n]:a(n)}return this._isCompound&&ur(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return fa(t)||(t=Yi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return ao(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return HB(t,function(a,o){return s.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,s,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(s=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,r=""+r,zr(i)||(i=""+i);var n=ji(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),this;if(!zr(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=a?s:this._defaultEdgeLabelFn(t,r,i);var l=ZB(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Wc(this._preds[r],t),Wc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?oo(this._isDirected,arguments[0]):ji(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?oo(this._isDirected,arguments[0]):ji(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?oo(this._isDirected,arguments[0]):ji(this._isDirected,t,r,i),a=this._edgeObjs[s];return a&&(t=a.v,r=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],zc(this._preds[r],t),zc(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=ao(i);return r?Fs(s,function(a){return a.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=ao(i);return r?Fs(s,function(a){return a.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Ia.prototype._nodeCount=0;Ia.prototype._edgeCount=0;function Wc(e,t){e[t]?e[t]++:e[t]=1}function zc(e,t){--e[t]||delete e[t]}function ji(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}return s+Nc+a+Nc+(zr(i)?VB:i)}function ZB(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}var n={v:s,w:a};return i&&(n.name=i),n}function oo(e,t){return ji(e,t.v,t.w,t.name)}function Rp(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:a,nodes:o,rootGroups:r}}g(Rp,"createLayoutElementGroups");async function qp(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await mt(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}g(qp,"measureGroupLabel");async function Np(e,t,r){var a;const i=await pl(e,t,r),s=((a=i.node())==null?void 0:a.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}g(Np,"insertMeasuredNode");async function Wp(e,t){const r=new Ia({multigraph:!0,compound:!0}),i=[...t.edges],s=Et(),a=Rp(e),{edgeLabels:o,nodes:n}=a,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await qp(n,h),r.setNode(h.id,{...h});else{if(c){const u=await Np(n,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&dp(h)&&await yl(o,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(d=>d.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Mt(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-nn3k8g1M.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2]));h(e,t)}return{graph:r,groups:a,nodeElements:l}}g(Wp,"createGraphWithElements");var Pt=new Map,mr=new Map,zp=new Map,KB=g(()=>{mr.clear(),zp.clear(),Pt.clear()},"clear"),ns=g((e,t)=>{const r=mr.get(t)||[];return I.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),QB=g((e,t)=>{const r=mr.get(t)||[];return I.info("Descendants of ",t," is ",r),I.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||ns(e.v,t)||ns(e.w,t)||r.includes(e.w):(I.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Hp=g((e,t,r,i)=>{I.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),I.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)Hp(a,t,r,i);else{const o=t.node(a);I.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(I.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(I.debug("Setting parent",a,e),r.setParent(a,e)):(I.info("In copy ",e,"root",i,"data",t.node(e),i),I.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));const n=t.edges(a);I.debug("Copying Edges",n),n.forEach(l=>{I.info("Edge",l);const c=t.edge(l.v,l.w,l.name);I.info("Edge data",c,i);try{QB(l,i)?(I.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),I.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):I.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){I.error(h)}})}I.debug("Removing node",a),t.removeNode(a)})},"copy"),Yp=g((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)zp.set(s,e),i=[...i,...Yp(s,t)];return i},"extractDescendants"),JB=g((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),o=s.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),pa=g((e,t,r)=>{const i=t.children(e);if(I.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const a of i){const o=pa(a,t,r),n=JB(t,r,o);if(o)if(n.length>0)s=o;else return o}return s},"findNonClusterChild"),Hc=g(e=>!Pt.has(e)||!Pt.get(e).externalConnections?e:Pt.has(e)?Pt.get(e).id:e,"getAnchorId"),yM=g((e,t)=>{var r;if(!e||t>10){I.debug("Opting out, no graph ");return}else I.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(I.debug("Cluster identified",i," Replacement id in edges: ",pa(i,e,i)),mr.set(i,Yp(i,e)),Pt.set(i,{id:pa(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),a=e.edges();s.length>0?(I.debug("Cluster identified",i,mr),a.forEach(o=>{const n=ns(o.v,i),l=ns(o.w,i);n^l&&(I.debug("Edge: ",o," leaves cluster ",i),I.debug("Descendants of XXX ",i,": ",mr.get(i)),Pt.get(i).externalConnections=!0)})):I.debug("Not a cluster ",i,mr)});for(let i of Pt.keys()){const s=Pt.get(i).id,a=e.parent(s);a!==i&&Pt.has(a)&&!Pt.get(a).externalConnections&&(Pt.get(i).id=a);const o=e.edges().some(n=>n.v===i);if(s&&((r=Pt.get(i))!=null&&r.externalConnections)&&o&&Gp(e,s,i)){const n=tv(e,i,e.parent(s));n&&(Pt.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);I.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),I.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let a=i.v,o=i.w;if(I.debug("Fix XXX",Pt,"ids:",i.v,i.w,"Translating: ",Pt.get(i.v)," --- ",Pt.get(i.w)),Pt.get(i.v)||Pt.get(i.w)){if(I.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),a=Hc(i.v),o=Hc(i.w),e.removeEdge(i.v,i.w,i.name),a!==i.v){const n=e.parent(a);Pt.get(n).externalConnections=!0,s.fromCluster=i.v}if(o!==i.w){const n=e.parent(o);Pt.get(n).externalConnections=!0,s.toCluster=i.w}I.debug("Fix Replacing with XXX",a,o,i.name),e.setEdge(a,o,s,i.name)}}),jp(e,0),I.trace(Pt)},"adjustClustersAndEdges"),jp=g((e,t)=>{var s,a;if(t>10){I.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const n=e.children(o);i=i||n.length>0}if(!i){I.debug("Done, no node has children",e.nodes());return}I.debug("Nodes = ",r,t);for(const o of r)if(I.debug("Extracting node",o,Pt,Pt.has(o)&&!Pt.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Pt.has(o))I.debug("Not a cluster",o,t);else if(!Pt.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){I.debug("Cluster without external connections, without a parent and with children",o,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(s=Pt.get(o))==null?void 0:s.clusterData)!=null&&a.dir&&(l=Pt.get(o).clusterData.dir,I.debug("Fixing dir",Pt.get(o).clusterData.dir,l));const c=new Ia({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Hp(o,e,c,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Pt.get(o).clusterData,label:Pt.get(o).label,graph:c})}else I.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Pt.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),I.debug(Pt);r=e.nodes(),I.debug("New list of nodes",r);for(const o of r){const n=e.node(o);I.debug(" Now next level",o,n),n!=null&&n.clusterNode&&jp(n.graph,t+1)}},"extractor"),Up=g((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),a=Up(e,s);r=[...r,...a]}),r},"sorter"),mM=g(e=>Up(e,e.children()),"sortNodesByHierarchy"),Gp=g((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Pt.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),tv=g((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||ns(s,r))continue;const a=pa(s,e,t);if(a&&!Gp(e,a,t))return a}return null},"findSafeAnchorNode");function Xp({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:a}){const o=t??vl;return g(async function(l,c,h,u){const d=c.select("g");mp(d,l.markers,l.type,l.diagramId),Bl();const f={element:d,helpers:h,options:u};f.preparedLayout=await(e==null?void 0:e(l,f));const y=await o(l,f),m=await r(l,f),C={...f,measure:y};i?await i(l,C,m):await Ll(l,C,a),await(s==null?void 0:s(l,C,m))},"render")}g(Xp,"createCommonLayoutRenderer");function Bl(){xw(),Ew(),Bw(),KB()}g(Bl,"clearLayoutRenderState");async function vl(e,{element:t}){return await Wp(t,e)}g(vl,"defaultMeasureLayout");async function Ll(e,t,r={}){var o,n;const{measure:i}=t,{groups:s}=i;for(const l of((o=r.getNodes)==null?void 0:o.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await Vp(s,l,t,r);const a=Kp(e.nodes);for(const l of e.edges)Qp(l,r)||await Jp(s,l,a,e,r,t)}g(Ll,"paintLayoutData");async function Vp(e,t,r,i){t.clusterNode?cc(t):Zp(t,r,i)?await up(e.clusters,t):cc(t)}g(Vp,"paintLayoutNode");function Zp(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}g(Zp,"shouldPaintAsCluster");function Kp(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}g(Kp,"buildNodeLookup");function Qp(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}g(Qp,"shouldSkipPaintEdge");async function Jp(e,t,r,i,s,a){const o=gp(e.edgePaths,{...t},s.clusterDb??new Map,i.type,pn(t.start,t,r,a,s),pn(t.end,t,r,a,s),i.diagramId,ty(t,s));dp(t)&&(fi.has(t.id)||await yl(e.edgeLabels,t),ey(t,o))}g(Jp,"paintLayoutEdge");function pn(e,t,r,i,s){var a;return((a=s.getEdgeNode)==null?void 0:a.call(s,e,t,i))??(e?r.get(e)??{}:{})}g(pn,"getRenderedNode");function ty(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}g(ty,"shouldSkipIntersect");function ey(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=Yt(),{subGraphTitleTotalMargin:s}=Fa({flowchart:i.flowchart??{}});if(e.label){const a=fi.get(e.id);let o=e.x,n=e.y;if(r){const l=ie.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const a=Ut.get(e.id).startLeft;let o=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}}g(ey,"positionRenderedEdgeLabel");function ry(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(ry,"getDefaultExportFromCjs");var Jt={},Ms={},tr={},Yc;function Ci(){if(Yc)return tr;Yc=1;function e(o){return typeof o>"u"||o===null}g(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}g(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}g(r,"toArray");function i(o,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];o[u]=n[u]}}return o}g(i,"extend");function s(o,n){let l="";for(let c=0;c<n;c+=1)l+=o;return l}g(s,"repeat");function a(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return g(a,"isNegativeZero"),tr.isNothing=e,tr.isObject=t,tr.toArray=r,tr.repeat=s,tr.isNegativeZero=a,tr.extend=i,tr}g(Ci,"requireCommon");var no,jc;function bi(){if(jc)return no;jc=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
268
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),oS=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),nS=g((e,t,r)=>{const i=Yt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=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");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),lS={extension:Nw,composition:Ww,aggregation:zw,dependency:Hw,lollipop:Yw,point:jw,circle:Uw,cross:Gw,barb:Xw,barbNeo:Vw,only_one:Zw,zero_or_one:Kw,one_or_more:Qw,zero_or_more:Jw,only_one_neo:tS,zero_or_one_neo:eS,one_or_more_neo:rS,zero_or_more_neo:iS,requirement_arrow:sS,requirement_contains:oS,requirement_arrow_neo:aS,requirement_contains_neo:nS},mp=qw,xp=typeof global=="object"&&global&&global.Object===Object&&global,hS=typeof self=="object"&&self&&self.Object===Object&&self,Ke=xp||hS||Function("return this")(),De=Ke.Symbol,Cp=Object.prototype,cS=Cp.hasOwnProperty,uS=Cp.toString,Pi=De?De.toStringTag:void 0;function dS(e){var t=cS.call(e,Pi),r=e[Pi];try{e[Pi]=void 0;var i=!0}catch{}var s=uS.call(e);return i&&(t?e[Pi]=r:delete e[Pi]),s}var fS=Object.prototype,gS=fS.toString;function pS(e){return gS.call(e)}var yS="[object Null]",mS="[object Undefined]",pc=De?De.toStringTag:void 0;function xi(e){return e==null?e===void 0?mS:yS:pc&&pc in Object(e)?dS(e):pS(e)}function _r(e){return e!=null&&typeof e=="object"}var xS="[object Symbol]";function ml(e){return typeof e=="symbol"||_r(e)&&xi(e)==xS}function bp(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var ce=Array.isArray,yc=De?De.prototype:void 0,mc=yc?yc.toString:void 0;function kp(e){if(typeof e=="string")return e;if(ce(e))return bp(e,kp)+"";if(ml(e))return mc?mc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function xl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Aa(e){return e}var CS="[object AsyncFunction]",bS="[object Function]",kS="[object GeneratorFunction]",wS="[object Proxy]";function fa(e){if(!xl(e))return!1;var t=xi(e);return t==bS||t==kS||t==CS||t==wS}var ro=Ke["__core-js_shared__"],xc=function(){var e=/[^.]+$/.exec(ro&&ro.keys&&ro.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function SS(e){return!!xc&&xc in e}var TS=Function.prototype,_S=TS.toString;function Mr(e){if(e!=null){try{return _S.call(e)}catch{}try{return e+""}catch{}}return""}var BS=/[\\^$.*+?()[\]{}|]/g,vS=/^\[object .+?Constructor\]$/,LS=Function.prototype,FS=Object.prototype,MS=LS.toString,AS=FS.hasOwnProperty,ES=RegExp("^"+MS.call(AS).replace(BS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $S(e){if(!xl(e)||SS(e))return!1;var t=fa(e)?ES:vS;return t.test(Mr(e))}function OS(e,t){return e==null?void 0:e[t]}function Ar(e,t){var r=OS(e,t);return $S(r)?r:void 0}var dn=Ar(Ke,"WeakMap");function PS(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function DS(){}var IS=800,RS=16,qS=Date.now;function NS(e){var t=0,r=0;return function(){var i=qS(),s=RS-(i-r);if(r=i,s>0){if(++t>=IS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Yi(e){return function(){return e}}var Cc=function(){try{var e=Ar(Object,"defineProperty");return e({},"",{}),e}catch{}}(),WS=Cc?function(e,t){return Cc(e,"toString",{configurable:!0,enumerable:!1,value:Yi(t),writable:!0})}:Aa,zS=NS(WS);function HS(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function YS(e,t,r,i){for(var s=e.length,a=r+-1;++a<s;)if(t(e[a],a,e))return a;return-1}function jS(e){return e!==e}function US(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function GS(e,t,r){return t===t?US(e,t,r):YS(e,jS,r)}function XS(e,t){var r=e==null?0:e.length;return!!r&&GS(e,t,0)>-1}var VS=9007199254740991,ZS=/^(?:0|[1-9]\d*)$/;function wp(e,t){var r=typeof e;return t=t??VS,!!t&&(r=="number"||r!="symbol"&&ZS.test(e))&&e>-1&&e%1==0&&e<t}function Sp(e,t){return e===t||e!==e&&t!==t}var bc=Math.max;function KS(e,t,r){return t=bc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=bc(i.length-t,0),o=Array(a);++s<a;)o[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(o),PS(e,this,n)}}function QS(e,t){return zS(KS(e,t,Aa),e+"")}var JS=9007199254740991;function Cl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JS}function Ea(e){return e!=null&&Cl(e.length)&&!fa(e)}var tT=Object.prototype;function Tp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||tT;return e===r}function eT(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var rT="[object Arguments]";function kc(e){return _r(e)&&xi(e)==rT}var _p=Object.prototype,iT=_p.hasOwnProperty,sT=_p.propertyIsEnumerable,$a=kc(function(){return arguments}())?kc:function(e){return _r(e)&&iT.call(e,"callee")&&!sT.call(e,"callee")};function aT(){return!1}var Bp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wc=Bp&&typeof module=="object"&&module&&!module.nodeType&&module,oT=wc&&wc.exports===Bp,Sc=oT?Ke.Buffer:void 0,nT=Sc?Sc.isBuffer:void 0,ga=nT||aT,lT="[object Arguments]",hT="[object Array]",cT="[object Boolean]",uT="[object Date]",dT="[object Error]",fT="[object Function]",gT="[object Map]",pT="[object Number]",yT="[object Object]",mT="[object RegExp]",xT="[object Set]",CT="[object String]",bT="[object WeakMap]",kT="[object ArrayBuffer]",wT="[object DataView]",ST="[object Float32Array]",TT="[object Float64Array]",_T="[object Int8Array]",BT="[object Int16Array]",vT="[object Int32Array]",LT="[object Uint8Array]",FT="[object Uint8ClampedArray]",MT="[object Uint16Array]",AT="[object Uint32Array]",zt={};zt[ST]=zt[TT]=zt[_T]=zt[BT]=zt[vT]=zt[LT]=zt[FT]=zt[MT]=zt[AT]=!0;zt[lT]=zt[hT]=zt[kT]=zt[cT]=zt[wT]=zt[uT]=zt[dT]=zt[fT]=zt[gT]=zt[pT]=zt[yT]=zt[mT]=zt[xT]=zt[CT]=zt[bT]=!1;function ET(e){return _r(e)&&Cl(e.length)&&!!zt[xi(e)]}function $T(e){return function(t){return e(t)}}var vp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ki=vp&&typeof module=="object"&&module&&!module.nodeType&&module,OT=Ki&&Ki.exports===vp,io=OT&&xp.process,Tc=function(){try{var e=Ki&&Ki.require&&Ki.require("util").types;return e||io&&io.binding&&io.binding("util")}catch{}}(),_c=Tc&&Tc.isTypedArray,bl=_c?$T(_c):ET,PT=Object.prototype,DT=PT.hasOwnProperty;function IT(e,t){var r=ce(e),i=!r&&$a(e),s=!r&&!i&&ga(e),a=!r&&!i&&!s&&bl(e),o=r||i||s||a,n=o?eT(e.length,String):[],l=n.length;for(var c in e)(t||DT.call(e,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wp(c,l)))&&n.push(c);return n}function RT(e,t){return function(r){return e(t(r))}}var qT=RT(Object.keys,Object),NT=Object.prototype,WT=NT.hasOwnProperty;function Lp(e){if(!Tp(e))return qT(e);var t=[];for(var r in Object(e))WT.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ee(e){return Ea(e)?IT(e):Lp(e)}var zT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HT=/^\w*$/;function kl(e,t){if(ce(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ml(e)?!0:HT.test(e)||!zT.test(e)||t!=null&&e in Object(t)}var ss=Ar(Object,"create");function YT(){this.__data__=ss?ss(null):{},this.size=0}function jT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var UT="__lodash_hash_undefined__",GT=Object.prototype,XT=GT.hasOwnProperty;function VT(e){var t=this.__data__;if(ss){var r=t[e];return r===UT?void 0:r}return XT.call(t,e)?t[e]:void 0}var ZT=Object.prototype,KT=ZT.hasOwnProperty;function QT(e){var t=this.__data__;return ss?t[e]!==void 0:KT.call(t,e)}var JT="__lodash_hash_undefined__";function t_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ss&&t===void 0?JT:t,this}function Br(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Br.prototype.clear=YT;Br.prototype.delete=jT;Br.prototype.get=VT;Br.prototype.has=QT;Br.prototype.set=t_;function e_(){this.__data__=[],this.size=0}function Oa(e,t){for(var r=e.length;r--;)if(Sp(e[r][0],t))return r;return-1}var r_=Array.prototype,i_=r_.splice;function s_(e){var t=this.__data__,r=Oa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():i_.call(t,r,1),--this.size,!0}function a_(e){var t=this.__data__,r=Oa(t,e);return r<0?void 0:t[r][1]}function o_(e){return Oa(this.__data__,e)>-1}function n_(e,t){var r=this.__data__,i=Oa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Qe.prototype.clear=e_;Qe.prototype.delete=s_;Qe.prototype.get=a_;Qe.prototype.has=o_;Qe.prototype.set=n_;var as=Ar(Ke,"Map");function l_(){this.size=0,this.__data__={hash:new Br,map:new(as||Qe),string:new Br}}function h_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pa(e,t){var r=e.__data__;return h_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function c_(e){var t=Pa(this,e).delete(e);return this.size-=t?1:0,t}function u_(e){return Pa(this,e).get(e)}function d_(e){return Pa(this,e).has(e)}function f_(e,t){var r=Pa(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Je(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Je.prototype.clear=l_;Je.prototype.delete=c_;Je.prototype.get=u_;Je.prototype.has=d_;Je.prototype.set=f_;var g_="Expected a function";function wl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(g_);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(wl.Cache||Je),r}wl.Cache=Je;var p_=500;function y_(e){var t=wl(e,function(i){return r.size===p_&&r.clear(),i}),r=t.cache;return t}var m_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x_=/\\(\\)?/g,C_=y_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(m_,function(r,i,s,a){t.push(s?a.replace(x_,"$1"):i||r)}),t});function b_(e){return e==null?"":kp(e)}function Fp(e,t){return ce(e)?e:kl(e,t)?[e]:C_(b_(e))}function Da(e){if(typeof e=="string"||ml(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Mp(e,t){t=Fp(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Da(t[r++])];return r&&r==i?e:void 0}function k_(e,t,r){var i=e==null?void 0:Mp(e,t);return i===void 0?r:i}function Ap(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var Bc=De?De.isConcatSpreadable:void 0;function w_(e){return ce(e)||$a(e)||!!(Bc&&e&&e[Bc])}function S_(e,t,r,i,s){var a=-1,o=e.length;for(r||(r=w_),s||(s=[]);++a<o;){var n=e[a];r(n)?Ap(s,n):i||(s[s.length]=n)}return s}function T_(e,t,r,i){var s=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++s]);++s<a;)r=t(r,e[s],s,e);return r}function __(){this.__data__=new Qe,this.size=0}function B_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function v_(e){return this.__data__.get(e)}function L_(e){return this.__data__.has(e)}var F_=200;function M_(e,t){var r=this.__data__;if(r instanceof Qe){var i=r.__data__;if(!as||i.length<F_-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Je(i)}return r.set(e,t),this.size=r.size,this}function Xe(e){var t=this.__data__=new Qe(e);this.size=t.size}Xe.prototype.clear=__;Xe.prototype.delete=B_;Xe.prototype.get=v_;Xe.prototype.has=L_;Xe.prototype.set=M_;function Ep(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var o=e[r];t(o,r,e)&&(a[s++]=o)}return a}function A_(){return[]}var E_=Object.prototype,$_=E_.propertyIsEnumerable,vc=Object.getOwnPropertySymbols,O_=vc?function(e){return e==null?[]:(e=Object(e),Ep(vc(e),function(t){return $_.call(e,t)}))}:A_;function P_(e,t,r){var i=t(e);return ce(e)?i:Ap(i,r(e))}function Lc(e){return P_(e,Ee,O_)}var fn=Ar(Ke,"DataView"),gn=Ar(Ke,"Promise"),Ur=Ar(Ke,"Set"),Fc="[object Map]",D_="[object Object]",Mc="[object Promise]",Ac="[object Set]",Ec="[object WeakMap]",$c="[object DataView]",I_=Mr(fn),R_=Mr(as),q_=Mr(gn),N_=Mr(Ur),W_=Mr(dn),Ue=xi;(fn&&Ue(new fn(new ArrayBuffer(1)))!=$c||as&&Ue(new as)!=Fc||gn&&Ue(gn.resolve())!=Mc||Ur&&Ue(new Ur)!=Ac||dn&&Ue(new dn)!=Ec)&&(Ue=function(e){var t=xi(e),r=t==D_?e.constructor:void 0,i=r?Mr(r):"";if(i)switch(i){case I_:return $c;case R_:return Fc;case q_:return Mc;case N_:return Ac;case W_:return Ec}return t});var Oc=Ke.Uint8Array,z_="__lodash_hash_undefined__";function H_(e){return this.__data__.set(e,z_),this}function Y_(e){return this.__data__.has(e)}function os(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Je;++t<r;)this.add(e[t])}os.prototype.add=os.prototype.push=H_;os.prototype.has=Y_;function j_(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function $p(e,t){return e.has(t)}var U_=1,G_=2;function Op(e,t,r,i,s,a){var o=r&U_,n=e.length,l=t.length;if(n!=l&&!(o&&l>n))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var u=-1,d=!0,f=r&G_?new os:void 0;for(a.set(e,t),a.set(t,e);++u<n;){var y=e[u],m=t[u];if(i)var C=o?i(m,y,u,t,e,a):i(y,m,u,e,t,a);if(C!==void 0){if(C)continue;d=!1;break}if(f){if(!j_(t,function(x,k){if(!$p(f,k)&&(y===x||s(y,x,r,i,a)))return f.push(k)})){d=!1;break}}else if(!(y===m||s(y,m,r,i,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function X_(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function Sl(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var V_=1,Z_=2,K_="[object Boolean]",Q_="[object Date]",J_="[object Error]",tB="[object Map]",eB="[object Number]",rB="[object RegExp]",iB="[object Set]",sB="[object String]",aB="[object Symbol]",oB="[object ArrayBuffer]",nB="[object DataView]",Pc=De?De.prototype:void 0,so=Pc?Pc.valueOf:void 0;function lB(e,t,r,i,s,a,o){switch(r){case nB:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oB:return!(e.byteLength!=t.byteLength||!a(new Oc(e),new Oc(t)));case K_:case Q_:case eB:return Sp(+e,+t);case J_:return e.name==t.name&&e.message==t.message;case rB:case sB:return e==t+"";case tB:var n=X_;case iB:var l=i&V_;if(n||(n=Sl),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;i|=Z_,o.set(e,t);var h=Op(n(e),n(t),i,s,a,o);return o.delete(e),h;case aB:if(so)return so.call(e)==so.call(t)}return!1}var hB=1,cB=Object.prototype,uB=cB.hasOwnProperty;function dB(e,t,r,i,s,a){var o=r&hB,n=Lc(e),l=n.length,c=Lc(t),h=c.length;if(l!=h&&!o)return!1;for(var u=l;u--;){var d=n[u];if(!(o?d in t:uB.call(t,d)))return!1}var f=a.get(e),y=a.get(t);if(f&&y)return f==t&&y==e;var m=!0;a.set(e,t),a.set(t,e);for(var C=o;++u<l;){d=n[u];var x=e[d],k=t[d];if(i)var w=o?i(k,x,d,t,e,a):i(x,k,d,e,t,a);if(!(w===void 0?x===k||s(x,k,r,i,a):w)){m=!1;break}C||(C=d=="constructor")}if(m&&!C){var T=e.constructor,_=t.constructor;T!=_&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return a.delete(e),a.delete(t),m}var fB=1,Dc="[object Arguments]",Ic="[object Array]",Ls="[object Object]",gB=Object.prototype,Rc=gB.hasOwnProperty;function pB(e,t,r,i,s,a){var o=ce(e),n=ce(t),l=o?Ic:Ue(e),c=n?Ic:Ue(t);l=l==Dc?Ls:l,c=c==Dc?Ls:c;var h=l==Ls,u=c==Ls,d=l==c;if(d&&ga(e)){if(!ga(t))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new Xe),o||bl(e)?Op(e,t,r,i,s,a):lB(e,t,l,r,i,s,a);if(!(r&fB)){var f=h&&Rc.call(e,"__wrapped__"),y=u&&Rc.call(t,"__wrapped__");if(f||y){var m=f?e.value():e,C=y?t.value():t;return a||(a=new Xe),s(m,C,r,i,a)}}return d?(a||(a=new Xe),dB(e,t,r,i,s,a)):!1}function Tl(e,t,r,i,s){return e===t?!0:e==null||t==null||!_r(e)&&!_r(t)?e!==e&&t!==t:pB(e,t,r,i,Tl,s)}var yB=1,mB=2;function xB(e,t,r,i){var s=r.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var o=r[s];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++s<a;){o=r[s];var n=o[0],l=e[n],c=o[1];if(o[2]){if(l===void 0&&!(n in e))return!1}else{var h=new Xe,u;if(!(u===void 0?Tl(c,l,yB|mB,i,h):u))return!1}}return!0}function Pp(e){return e===e&&!xl(e)}function CB(e){for(var t=Ee(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Pp(s)]}return t}function Dp(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function bB(e){var t=CB(e);return t.length==1&&t[0][2]?Dp(t[0][0],t[0][1]):function(r){return r===e||xB(r,e,t)}}function kB(e,t){return e!=null&&t in Object(e)}function wB(e,t,r){t=Fp(t,e);for(var i=-1,s=t.length,a=!1;++i<s;){var o=Da(t[i]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++i!=s?a:(s=e==null?0:e.length,!!s&&Cl(s)&&wp(o,s)&&(ce(e)||$a(e)))}function SB(e,t){return e!=null&&wB(e,t,kB)}var TB=1,_B=2;function BB(e,t){return kl(e)&&Pp(t)?Dp(Da(e),t):function(r){var i=k_(r,e);return i===void 0&&i===t?SB(r,e):Tl(t,i,TB|_B)}}function vB(e){return function(t){return t==null?void 0:t[e]}}function LB(e){return function(t){return Mp(t,e)}}function FB(e){return kl(e)?vB(Da(e)):LB(e)}function Ip(e){return typeof e=="function"?e:e==null?Aa:typeof e=="object"?ce(e)?BB(e[0],e[1]):bB(e):FB(e)}function MB(e){return function(t,r,i){for(var s=-1,a=Object(t),o=i(t),n=o.length;n--;){var l=o[++s];if(r(a[l],l,a)===!1)break}return t}}var AB=MB();function EB(e,t){return e&&AB(e,t,Ee)}function $B(e,t){return function(r,i){if(r==null)return r;if(!Ea(r))return e(r,i);for(var s=r.length,a=-1,o=Object(r);++a<s&&i(o[a],a,o)!==!1;);return r}}var _l=$B(EB);function OB(e){return _r(e)&&Ea(e)}function PB(e){return typeof e=="function"?e:Aa}function ur(e,t){var r=ce(e)?HS:_l;return r(e,PB(t))}function DB(e,t){var r=[];return _l(e,function(i,s,a){t(i,s,a)&&r.push(i)}),r}function Fs(e,t){var r=ce(e)?Ep:DB;return r(e,Ip(t))}function IB(e,t){return bp(t,function(r){return e[r]})}function ao(e){return e==null?[]:IB(e,Ee(e))}var RB="[object Map]",qB="[object Set]",NB=Object.prototype,WB=NB.hasOwnProperty;function qc(e){if(e==null)return!0;if(Ea(e)&&(ce(e)||typeof e=="string"||typeof e.splice=="function"||ga(e)||bl(e)||$a(e)))return!e.length;var t=Ue(e);if(t==RB||t==qB)return!e.size;if(Tp(e))return!Lp(e).length;for(var r in e)if(WB.call(e,r))return!1;return!0}function zr(e){return e===void 0}function zB(e,t,r,i,s){return s(e,function(a,o,n){r=i?(i=!1,a):t(r,a,o,n)}),r}function HB(e,t,r){var i=ce(e)?T_:zB,s=arguments.length<3;return i(e,Ip(t),r,s,_l)}var YB=1/0,jB=Ur&&1/Sl(new Ur([,-0]))[1]==YB?function(e){return new Ur(e)}:DS,UB=200;function GB(e,t,r){var i=-1,s=XS,a=e.length,o=!0,n=[],l=n;if(a>=UB){var c=jB(e);if(c)return Sl(c);o=!1,s=$p,l=new os}else l=n;t:for(;++i<a;){var h=e[i],u=h;if(h=h!==0?h:0,o&&u===u){for(var d=l.length;d--;)if(l[d]===u)continue t;n.push(h)}else s(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var XB=QS(function(e){return GB(S_(e,1,OB,!0))}),VB="\0",dr="\0",Nc="";class Ia{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Yi(void 0),this._defaultEdgeLabelFn=Yi(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[dr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return fa(t)||(t=Yi(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Ee(this._nodes)}sources(){var t=this;return Fs(this.nodes(),function(r){return qc(t._in[r])})}sinks(){var t=this;return Fs(this.nodes(),function(r){return qc(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return ur(t,function(a){i.length>1?s.setNode(a,r):s.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=dr,this._children[t]={},this._children[dr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ur(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),ur(Ee(this._in[t]),r),delete this._in[t],delete this._preds[t],ur(Ee(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(zr(r))r=dr;else{r+="";for(var i=r;!zr(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==dr)return r}}children(t){if(zr(t)&&(t=dr),this._isCompound){var r=this._children[t];if(r)return Ee(r)}else{if(t===dr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Ee(r)}successors(t){var r=this._sucs[t];if(r)return Ee(r)}neighbors(t){var r=this.predecessors(t);if(r)return XB(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;ur(this._nodes,function(o,n){t(n)&&r.setNode(n,o)}),ur(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var s={};function a(o){var n=i.parent(o);return n===void 0||r.hasNode(n)?(s[o]=n,n):n in s?s[n]:a(n)}return this._isCompound&&ur(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return fa(t)||(t=Yi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return ao(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return HB(t,function(a,o){return s.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,s,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(s=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,r=""+r,zr(i)||(i=""+i);var n=ji(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),this;if(!zr(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=a?s:this._defaultEdgeLabelFn(t,r,i);var l=ZB(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Wc(this._preds[r],t),Wc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?oo(this._isDirected,arguments[0]):ji(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?oo(this._isDirected,arguments[0]):ji(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?oo(this._isDirected,arguments[0]):ji(this._isDirected,t,r,i),a=this._edgeObjs[s];return a&&(t=a.v,r=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],zc(this._preds[r],t),zc(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=ao(i);return r?Fs(s,function(a){return a.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=ao(i);return r?Fs(s,function(a){return a.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Ia.prototype._nodeCount=0;Ia.prototype._edgeCount=0;function Wc(e,t){e[t]?e[t]++:e[t]=1}function zc(e,t){--e[t]||delete e[t]}function ji(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}return s+Nc+a+Nc+(zr(i)?VB:i)}function ZB(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}var n={v:s,w:a};return i&&(n.name=i),n}function oo(e,t){return ji(e,t.v,t.w,t.name)}function Rp(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:a,nodes:o,rootGroups:r}}g(Rp,"createLayoutElementGroups");async function qp(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await mt(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}g(qp,"measureGroupLabel");async function Np(e,t,r){var a;const i=await pl(e,t,r),s=((a=i.node())==null?void 0:a.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}g(Np,"insertMeasuredNode");async function Wp(e,t){const r=new Ia({multigraph:!0,compound:!0}),i=[...t.edges],s=Et(),a=Rp(e),{edgeLabels:o,nodes:n}=a,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await qp(n,h),r.setNode(h.id,{...h});else{if(c){const u=await Np(n,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&dp(h)&&await yl(o,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(d=>d.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Mt(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-CX_hwOdH.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2]));h(e,t)}return{graph:r,groups:a,nodeElements:l}}g(Wp,"createGraphWithElements");var Pt=new Map,mr=new Map,zp=new Map,KB=g(()=>{mr.clear(),zp.clear(),Pt.clear()},"clear"),ns=g((e,t)=>{const r=mr.get(t)||[];return I.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),QB=g((e,t)=>{const r=mr.get(t)||[];return I.info("Descendants of ",t," is ",r),I.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||ns(e.v,t)||ns(e.w,t)||r.includes(e.w):(I.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Hp=g((e,t,r,i)=>{I.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),I.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)Hp(a,t,r,i);else{const o=t.node(a);I.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(I.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(I.debug("Setting parent",a,e),r.setParent(a,e)):(I.info("In copy ",e,"root",i,"data",t.node(e),i),I.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));const n=t.edges(a);I.debug("Copying Edges",n),n.forEach(l=>{I.info("Edge",l);const c=t.edge(l.v,l.w,l.name);I.info("Edge data",c,i);try{QB(l,i)?(I.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),I.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):I.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){I.error(h)}})}I.debug("Removing node",a),t.removeNode(a)})},"copy"),Yp=g((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)zp.set(s,e),i=[...i,...Yp(s,t)];return i},"extractDescendants"),JB=g((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),o=s.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),pa=g((e,t,r)=>{const i=t.children(e);if(I.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const a of i){const o=pa(a,t,r),n=JB(t,r,o);if(o)if(n.length>0)s=o;else return o}return s},"findNonClusterChild"),Hc=g(e=>!Pt.has(e)||!Pt.get(e).externalConnections?e:Pt.has(e)?Pt.get(e).id:e,"getAnchorId"),yM=g((e,t)=>{var r;if(!e||t>10){I.debug("Opting out, no graph ");return}else I.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(I.debug("Cluster identified",i," Replacement id in edges: ",pa(i,e,i)),mr.set(i,Yp(i,e)),Pt.set(i,{id:pa(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),a=e.edges();s.length>0?(I.debug("Cluster identified",i,mr),a.forEach(o=>{const n=ns(o.v,i),l=ns(o.w,i);n^l&&(I.debug("Edge: ",o," leaves cluster ",i),I.debug("Descendants of XXX ",i,": ",mr.get(i)),Pt.get(i).externalConnections=!0)})):I.debug("Not a cluster ",i,mr)});for(let i of Pt.keys()){const s=Pt.get(i).id,a=e.parent(s);a!==i&&Pt.has(a)&&!Pt.get(a).externalConnections&&(Pt.get(i).id=a);const o=e.edges().some(n=>n.v===i);if(s&&((r=Pt.get(i))!=null&&r.externalConnections)&&o&&Gp(e,s,i)){const n=tv(e,i,e.parent(s));n&&(Pt.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);I.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),I.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let a=i.v,o=i.w;if(I.debug("Fix XXX",Pt,"ids:",i.v,i.w,"Translating: ",Pt.get(i.v)," --- ",Pt.get(i.w)),Pt.get(i.v)||Pt.get(i.w)){if(I.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),a=Hc(i.v),o=Hc(i.w),e.removeEdge(i.v,i.w,i.name),a!==i.v){const n=e.parent(a);Pt.get(n).externalConnections=!0,s.fromCluster=i.v}if(o!==i.w){const n=e.parent(o);Pt.get(n).externalConnections=!0,s.toCluster=i.w}I.debug("Fix Replacing with XXX",a,o,i.name),e.setEdge(a,o,s,i.name)}}),jp(e,0),I.trace(Pt)},"adjustClustersAndEdges"),jp=g((e,t)=>{var s,a;if(t>10){I.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const n=e.children(o);i=i||n.length>0}if(!i){I.debug("Done, no node has children",e.nodes());return}I.debug("Nodes = ",r,t);for(const o of r)if(I.debug("Extracting node",o,Pt,Pt.has(o)&&!Pt.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Pt.has(o))I.debug("Not a cluster",o,t);else if(!Pt.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){I.debug("Cluster without external connections, without a parent and with children",o,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(s=Pt.get(o))==null?void 0:s.clusterData)!=null&&a.dir&&(l=Pt.get(o).clusterData.dir,I.debug("Fixing dir",Pt.get(o).clusterData.dir,l));const c=new Ia({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Hp(o,e,c,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Pt.get(o).clusterData,label:Pt.get(o).label,graph:c})}else I.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Pt.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),I.debug(Pt);r=e.nodes(),I.debug("New list of nodes",r);for(const o of r){const n=e.node(o);I.debug(" Now next level",o,n),n!=null&&n.clusterNode&&jp(n.graph,t+1)}},"extractor"),Up=g((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),a=Up(e,s);r=[...r,...a]}),r},"sorter"),mM=g(e=>Up(e,e.children()),"sortNodesByHierarchy"),Gp=g((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Pt.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),tv=g((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||ns(s,r))continue;const a=pa(s,e,t);if(a&&!Gp(e,a,t))return a}return null},"findSafeAnchorNode");function Xp({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:a}){const o=t??vl;return g(async function(l,c,h,u){const d=c.select("g");((h==null?void 0:h.insertMarkers)??mp)(d,l.markers,l.type,l.diagramId),Bl();const f={element:d,helpers:h,options:u};f.preparedLayout=await(e==null?void 0:e(l,f));const y=await o(l,f),m=await r(l,f),C={...f,measure:y};i?await i(l,C,m):await Ll(l,C,a),await(s==null?void 0:s(l,C,m))},"render")}g(Xp,"createCommonLayoutRenderer");function Bl(){xw(),Ew(),Bw(),KB()}g(Bl,"clearLayoutRenderState");async function vl(e,{element:t}){return await Wp(t,e)}g(vl,"defaultMeasureLayout");async function Ll(e,t,r={}){var o,n;const{measure:i}=t,{groups:s}=i;for(const l of((o=r.getNodes)==null?void 0:o.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await Vp(s,l,t,r);const a=Kp(e.nodes);for(const l of e.edges)Qp(l,r)||await Jp(s,l,a,e,r,t)}g(Ll,"paintLayoutData");async function Vp(e,t,r,i){t.clusterNode?cc(t):Zp(t,r,i)?await up(e.clusters,t):cc(t)}g(Vp,"paintLayoutNode");function Zp(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}g(Zp,"shouldPaintAsCluster");function Kp(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}g(Kp,"buildNodeLookup");function Qp(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}g(Qp,"shouldSkipPaintEdge");async function Jp(e,t,r,i,s,a){const o=gp(e.edgePaths,{...t},s.clusterDb??new Map,i.type,pn(t.start,t,r,a,s),pn(t.end,t,r,a,s),i.diagramId,ty(t,s));dp(t)&&(fi.has(t.id)||await yl(e.edgeLabels,t),ey(t,o))}g(Jp,"paintLayoutEdge");function pn(e,t,r,i,s){var a;return((a=s.getEdgeNode)==null?void 0:a.call(s,e,t,i))??(e?r.get(e)??{}:{})}g(pn,"getRenderedNode");function ty(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}g(ty,"shouldSkipIntersect");function ey(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=Yt(),{subGraphTitleTotalMargin:s}=Fa({flowchart:i.flowchart??{}});if(e.label){const a=fi.get(e.id);let o=e.x,n=e.y;if(r){const l=ie.calcLabelPosition(r);I.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const a=Ut.get(e.id).startLeft;let o=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=ie.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}}g(ey,"positionRenderedEdgeLabel");function ry(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(ry,"getDefaultExportFromCjs");var Jt={},Ms={},tr={},Yc;function Ci(){if(Yc)return tr;Yc=1;function e(o){return typeof o>"u"||o===null}g(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}g(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}g(r,"toArray");function i(o,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];o[u]=n[u]}}return o}g(i,"extend");function s(o,n){let l="";for(let c=0;c<n;c+=1)l+=o;return l}g(s,"repeat");function a(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return g(a,"isNegativeZero"),tr.isNothing=e,tr.isObject=t,tr.toArray=r,tr.repeat=s,tr.isNegativeZero=a,tr.extend=i,tr}g(Ci,"requireCommon");var no,jc;function bi(){if(jc)return no;jc=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
269
269
 
270
270
  `+r.mark.snippet),a+" "+s):a}g(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return g(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=g(function(i){return this.name+": "+e(this,i)},"toString"),no=t,no}g(bi,"requireException");var lo,Uc;function iy(){if(Uc)return lo;Uc=1;const e=Ci();function t(s,a,o,n,l){let c="",h="";const u=Math.floor(l/2)-1;return n-a>u&&(c=" ... ",a=n-u+c.length),o-n>u&&(h=" ...",o=n+u-h.length),{str:c+s.slice(a,o).replace(/\t/g,"→")+h,pos:n-a+c.length}}g(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}g(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const o=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=o.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let u="";const d=Math.min(s.line+a.linesAfter,l.length).toString().length,f=a.maxLength-(a.indent+d+3);for(let m=1;m<=a.linesBefore&&!(h-m<0);m++){const C=t(s.buffer,n[h-m],l[h-m],s.position-(n[h]-n[h-m]),f);u=e.repeat(" ",a.indent)+r((s.line-m+1).toString(),d)+" | "+C.str+`
271
271
  `+u}const y=t(s.buffer,n[h],l[h],s.position,f);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),d)+" | "+y.str+`
272
272
  `,u+=e.repeat("-",a.indent+d+3+y.pos)+`^
273
273
  `;for(let m=1;m<=a.linesAfter&&!(h+m>=l.length);m++){const C=t(s.buffer,n[h+m],l[h+m],s.position-(n[h]-n[h+m]),f);u+=e.repeat(" ",a.indent)+r((s.line+m+1).toString(),d)+" | "+C.str+`
274
274
  `}return u.replace(/\n$/,"")}return g(i,"makeSnippet"),lo=i,lo}g(iy,"requireSnippet");var ho,Gc;function ae(){if(Gc)return ho;Gc=1;const e=bi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const o={};return a!==null&&Object.keys(a).forEach(function(n){a[n].forEach(function(l){o[String(l)]=n})}),o}g(i,"compileStyleAliases");function s(a,o){if(o=o||{},Object.keys(o).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=o,this.tag=a,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=i(o.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return g(s,"Type2"),ho=s,ho}g(ae,"requireType");var co,Xc;function Fl(){if(Xc)return co;Xc=1;const e=bi(),t=ae();function r(a,o){const n=[];return a[o].forEach(function(l){let c=n.length;n.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),n[c]=l}),n}g(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(n){n.multi?(a.multi[n.kind].push(n),a.multi.fallback.push(n)):a[n.kind][n.tag]=a.fallback[n.tag]=n}g(o,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(o);return a}g(i,"compileMap");function s(a){return this.extend(a)}return g(s,"Schema2"),s.prototype.extend=g(function(o){let n=[],l=[];if(o instanceof t)l.push(o);else if(Array.isArray(o))l=l.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(n=n.concat(o.implicit)),o.explicit&&(l=l.concat(o.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),co=s,co}g(Fl,"requireSchema");var uo,Vc;function Ml(){if(Vc)return uo;Vc=1;const e=ae();return uo=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(t){return t!==null?t:""},"construct")}),uo}g(Ml,"requireStr");var fo,Zc;function Al(){if(Zc)return fo;Zc=1;const e=ae();return fo=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(t){return t!==null?t:[]},"construct")}),fo}g(Al,"requireSeq");var go,Kc;function El(){if(Kc)return go;Kc=1;const e=ae();return go=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(t){return t!==null?t:{}},"construct")}),go}g(El,"requireMap");var po,Qc;function $l(){if(Qc)return po;Qc=1;const e=Fl();return po=new e({explicit:[Ml(),Al(),El()]}),po}g($l,"requireFailsafe");var yo,Jc;function Ol(){if(Jc)return yo;Jc=1;const e=ae();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}g(t,"resolveYamlNull");function r(){return null}g(r,"constructYamlNull");function i(s){return s===null}return g(i,"isNull"),yo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"}),yo}g(Ol,"require_null");var mo,tu;function Pl(){if(tu)return mo;tu=1;const e=ae();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}g(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}g(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return g(i,"isBoolean"),mo=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:g(function(s){return s?"true":"false"},"lowercase"),uppercase:g(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),mo}g(Pl,"requireBool");var xo,eu;function Dl(){if(eu)return xo;eu=1;const e=Ci(),t=ae();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}g(r,"isHexCode");function i(c){return c>=48&&c<=55}g(i,"isOctCode");function s(c){return c>=48&&c<=57}g(s,"isDecCode");function a(c){if(c===null)return!1;const h=c.length;let u=0,d=!1;if(!h)return!1;let f=c[u];if((f==="-"||f==="+")&&(f=c[++u]),f==="0"){if(u+1===h)return!0;if(f=c[++u],f==="b"){for(u++;u<h;u++){if(f=c[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(o(c))}if(f==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(o(c))}if(f==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(o(c))}}for(;u<h;u++){if(!s(c.charCodeAt(u)))return!1;d=!0}return d?isFinite(o(c)):!1}g(a,"resolveYamlInteger");function o(c){let h=c,u=1,d=h[0];if((d==="-"||d==="+")&&(d==="-"&&(u=-1),h=h.slice(1),d=h[0]),h==="0")return 0;if(d==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}g(o,"parseYamlInteger");function n(c){return o(c)}g(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return g(l,"isInteger"),xo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:l,represent:{binary:g(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:g(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:g(function(c){return c.toString(10)},"decimal"),hexadecimal:g(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),xo}g(Dl,"requireInt");var Co,ru;function Il(){if(ru)return Co;ru=1;const e=Ci(),t=ae(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}g(s,"resolveYamlFloat");function a(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}g(a,"constructYamlFloat");const o=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return o.test(u)?u.replace("e",".e"):u}g(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return g(l,"isFloat"),Co=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:n,defaultStyle:"lowercase"}),Co}g(Il,"requireFloat");var bo,iu;function Rl(){return iu||(iu=1,bo=$l().extend({implicit:[Ol(),Pl(),Dl(),Il()]})),bo}g(Rl,"requireJson");var ko,su;function ql(){return su||(su=1,ko=Rl()),ko}g(ql,"requireCore");var wo,au;function Nl(){if(au)return wo;au=1;const e=ae(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 i(o){return o===null?!1:t.exec(o)!==null||r.exec(o)!==null}g(i,"resolveYamlTimestamp");function s(o){let n=0,l=null,c=t.exec(o);if(c===null&&(c=r.exec(o)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,d=+c[3];if(!c[4])return new Date(Date.UTC(h,u,d));const f=+c[4],y=+c[5],m=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const x=+c[10],k=+(c[11]||0);l=(x*60+k)*6e4,c[9]==="-"&&(l=-l)}const C=new Date(Date.UTC(h,u,d,f,y,m,n));return l&&C.setTime(C.getTime()-l),C}g(s,"constructYamlTimestamp");function a(o){return o.toISOString()}return g(a,"representYamlTimestamp"),wo=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),wo}g(Nl,"requireTimestamp");var So,ou;function Wl(){if(ou)return So;ou=1;const e=ae();function t(r){return r==="<<"||r===null}return g(t,"resolveYamlMerge"),So=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),So}g(Wl,"requireMerge");var To,nu;function zl(){if(nu)return To;nu=1;const e=ae(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
275
- \r`;function r(o){if(o===null)return!1;let n=0;const l=o.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(o.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}g(r,"resolveYamlBinary");function i(o){const n=o.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let f=0;f<l;f++)f%4===0&&f&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(f));const d=l%4*6;return d===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):d===18?(u.push(h>>10&255),u.push(h>>2&255)):d===12&&u.push(h>>4&255),new Uint8Array(u)}g(i,"constructYamlBinary");function s(o){let n="",l=0;const c=o.length,h=t;for(let d=0;d<c;d++)d%3===0&&d&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+o[d];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}g(s,"representYamlBinary");function a(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return g(a,"isBinary"),To=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),To}g(zl,"requireBinary");var _o,lu;function Hl(){if(lu)return _o;lu=1;const e=ae(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const o=[],n=a;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let d;for(d in h)if(t.call(h,d))if(!u)u=!0;else return!1;if(!u)return!1;if(o.indexOf(d)===-1)o.push(d);else return!1}return!0}g(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return g(s,"constructYamlOmap"),_o=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),_o}g(Hl,"requireOmap");var Bo,hu;function Yl(){if(hu)return Bo;hu=1;const e=ae(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;o[n]=[h[0],c[h[0]]]}return!0}g(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n],h=Object.keys(c);o[n]=[h[0],c[h[0]]]}return o}return g(i,"constructYamlPairs"),Bo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Bo}g(Yl,"requirePairs");var vo,cu;function jl(){if(cu)return vo;cu=1;const e=ae(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const o in a)if(t.call(a,o)&&a[o]!==null)return!1;return!0}g(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return g(i,"constructYamlSet"),vo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),vo}g(jl,"requireSet");var Lo,uu;function Ra(){return uu||(uu=1,Lo=ql().extend({implicit:[Nl(),Wl()],explicit:[zl(),Hl(),Yl(),jl()]})),Lo}g(Ra,"require_default");var du;function sy(){if(du)return Ms;du=1;const e=Ci(),t=bi(),r=iy(),i=Ra(),s=Object.prototype.hasOwnProperty,a=1,o=2,n=3,l=4,c=1,h=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,m=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(p){return Object.prototype.toString.call(p)}g(x,"_class");function k(p){return p===10||p===13}g(k,"isEol");function w(p){return p===9||p===32}g(w,"isWhiteSpace");function T(p){return p===9||p===32||p===10||p===13}g(T,"isWsOrEol");function _(p){return p===44||p===91||p===93||p===123||p===125}g(_,"isFlowIndicator");function L(p){if(p>=48&&p<=57)return p-48;const O=p|32;return O>=97&&O<=102?O-97+10:-1}g(L,"fromHexCode");function F(p){return p===120?2:p===117?4:p===85?8:0}g(F,"escapedHexLen");function v(p){return p>=48&&p<=57?p-48:-1}g(v,"fromDecimalCode");function U(p){switch(p){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
275
+ \r`;function r(o){if(o===null)return!1;let n=0;const l=o.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(o.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}g(r,"resolveYamlBinary");function i(o){const n=o.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let f=0;f<l;f++)f%4===0&&f&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(f));const d=l%4*6;return d===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):d===18?(u.push(h>>10&255),u.push(h>>2&255)):d===12&&u.push(h>>4&255),new Uint8Array(u)}g(i,"constructYamlBinary");function s(o){let n="",l=0;const c=o.length,h=t;for(let d=0;d<c;d++)d%3===0&&d&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+o[d];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}g(s,"representYamlBinary");function a(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return g(a,"isBinary"),To=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),To}g(zl,"requireBinary");var _o,lu;function Hl(){if(lu)return _o;lu=1;const e=ae(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const o=[],n=a;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let d;for(d in h)if(t.call(h,d))if(!u)u=!0;else return!1;if(!u)return!1;if(o.indexOf(d)===-1)o.push(d);else return!1}return!0}g(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return g(s,"constructYamlOmap"),_o=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),_o}g(Hl,"requireOmap");var Bo,hu;function Yl(){if(hu)return Bo;hu=1;const e=ae(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;o[n]=[h[0],c[h[0]]]}return!0}g(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n],h=Object.keys(c);o[n]=[h[0],c[h[0]]]}return o}return g(i,"constructYamlPairs"),Bo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Bo}g(Yl,"requirePairs");var vo,cu;function jl(){if(cu)return vo;cu=1;const e=ae(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const o in a)if(t.call(a,o)&&a[o]!==null)return!1;return!0}g(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return g(i,"constructYamlSet"),vo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),vo}g(jl,"requireSet");var Lo,uu;function Ra(){return uu||(uu=1,Lo=ql().extend({implicit:[Nl(),Wl()],explicit:[zl(),Hl(),Yl(),jl()]})),Lo}g(Ra,"require_default");var du;function sy(){if(du)return Ms;du=1;const e=Ci(),t=bi(),r=iy(),i=Ra(),s=Object.prototype.hasOwnProperty,a=1,o=2,n=3,l=4,c=1,h=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,m=/^(?:!|!!|![0-9A-Za-z-]+!)$/,C=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(p){return Object.prototype.toString.call(p)}g(x,"_class");function k(p){return p===10||p===13}g(k,"isEol");function w(p){return p===9||p===32}g(w,"isWhiteSpace");function T(p){return p===9||p===32||p===10||p===13}g(T,"isWsOrEol");function _(p){return p===44||p===91||p===93||p===123||p===125}g(_,"isFlowIndicator");function v(p){if(p>=48&&p<=57)return p-48;const O=p|32;return O>=97&&O<=102?O-97+10:-1}g(v,"fromHexCode");function F(p){return p===120?2:p===117?4:p===85?8:0}g(F,"escapedHexLen");function L(p){return p>=48&&p<=57?p-48:-1}g(L,"fromDecimalCode");function U(p){switch(p){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
276
276
  `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}g(U,"simpleEscapeSequence");function W(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}g(W,"charFromCodepoint");function q(p,O,G){O==="__proto__"?Object.defineProperty(p,O,{configurable:!0,enumerable:!0,writable:!0,value:G}):p[O]=G}g(q,"setProperty");const rt=new Array(256),Y=new Array(256);for(let p=0;p<256;p++)rt[p]=U(p)?1:0,Y[p]=U(p);function A(p,O){this.input=p,this.filename=O.filename||null,this.schema=O.schema||i,this.onWarning=O.onWarning||null,this.legacy=O.legacy||!1,this.json=O.json||!1,this.listener=O.listener||null,this.maxDepth=typeof O.maxDepth=="number"?O.maxDepth:100,this.maxTotalMergeKeys=typeof O.maxTotalMergeKeys=="number"?O.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}g(A,"State");function E(p,O){const G={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return G.snippet=r(G),new t(O,G)}g(E,"generateError");function B(p,O){throw E(p,O)}g(B,"throwError");function P(p,O){p.onWarning&&p.onWarning.call(null,E(p,O))}g(P,"throwWarning");function $(p,O,G){const K=p.anchorMapTransactions;if(K.length!==0){const j=K[K.length-1];s.call(j,O)||(j[O]={existed:s.call(p.anchorMap,O),value:p.anchorMap[O]})}p.anchorMap[O]=G}g($,"storeAnchor");function N(p){p.anchorMapTransactions.push(Object.create(null))}g(N,"beginAnchorTransaction");function V(p){const O=p.anchorMapTransactions.pop(),G=p.anchorMapTransactions;if(G.length===0)return;const K=G[G.length-1],j=Object.keys(O);for(let et=0,S=j.length;et<S;et+=1){const D=j[et];s.call(K,D)||(K[D]=O[D])}}g(V,"commitAnchorTransaction");function at(p){const O=p.anchorMapTransactions.pop(),G=Object.keys(O);for(let K=G.length-1;K>=0;K-=1){const j=O[G[K]];j.existed?p.anchorMap[G[K]]=j.value:delete p.anchorMap[G[K]]}}g(at,"rollbackAnchorTransaction");function ht(p){return{position:p.position,line:p.line,lineStart:p.lineStart,lineIndent:p.lineIndent,firstTabInLine:p.firstTabInLine,tag:p.tag,anchor:p.anchor,kind:p.kind,result:p.result}}g(ht,"snapshotState");function gt(p,O){p.position=O.position,p.line=O.line,p.lineStart=O.lineStart,p.lineIndent=O.lineIndent,p.firstTabInLine=O.firstTabInLine,p.tag=O.tag,p.anchor=O.anchor,p.kind=O.kind,p.result=O.result}g(gt,"restoreState");const yt={YAML:g(function(O,G,K){O.version!==null&&B(O,"duplication of %YAML directive"),K.length!==1&&B(O,"YAML directive accepts exactly one argument");const j=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);j===null&&B(O,"ill-formed argument of the YAML directive");const et=parseInt(j[1],10),S=parseInt(j[2],10);et!==1&&B(O,"unacceptable YAML version of the document"),O.version=K[0],O.checkLineBreaks=S<2,S!==1&&S!==2&&P(O,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(O,G,K){let j;K.length!==2&&B(O,"TAG directive accepts exactly two arguments");const et=K[0];j=K[1],m.test(et)||B(O,"ill-formed tag handle (first argument) of the TAG directive"),s.call(O.tagMap,et)&&B(O,'there is a previously declared suffix for "'+et+'" tag handle'),C.test(j)||B(O,"ill-formed tag prefix (second argument) of the TAG directive");try{j=decodeURIComponent(j)}catch{B(O,"tag prefix is malformed: "+j)}O.tagMap[et]=j},"handleTagDirective")};function pt(p,O,G,K){if(O<G){const j=p.input.slice(O,G);if(K)for(let et=0,S=j.length;et<S;et+=1){const D=j.charCodeAt(et);D===9||D>=32&&D<=1114111||B(p,"expected valid JSON character")}else d.test(j)&&B(p,"the stream contains non-printable characters");p.result+=j}}g(pt,"captureSegment");function _t(p,O,G,K){e.isObject(G)||B(p,"cannot merge mappings; the provided source object is unacceptable");const j=Object.keys(G);for(let et=0,S=j.length;et<S;et+=1){const D=j[et];p.maxTotalMergeKeys!==-1&&++p.totalMergeKeys>p.maxTotalMergeKeys&&B(p,"merge keys exceeded maxTotalMergeKeys ("+p.maxTotalMergeKeys+")"),s.call(O,D)||(q(O,D,G[D]),K[D]=!0)}}g(_t,"mergeMappings");function wt(p,O,G,K,j,et,S,D,J){if(Array.isArray(j)){j=Array.prototype.slice.call(j);for(let X=0,Z=j.length;X<Z;X+=1)Array.isArray(j[X])&&B(p,"nested arrays are not supported inside keys"),typeof j=="object"&&x(j[X])==="[object Object]"&&(j[X]="[object Object]")}if(typeof j=="object"&&x(j)==="[object Object]"&&(j="[object Object]"),j=String(j),O===null&&(O={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(et))for(let X=0,Z=et.length;X<Z;X+=1)_t(p,O,et[X],G);else _t(p,O,et,G);else!p.json&&!s.call(G,j)&&s.call(O,j)&&(p.line=S||p.line,p.lineStart=D||p.lineStart,p.position=J||p.position,B(p,"duplicated mapping key")),q(O,j,et),delete G[j];return O}g(wt,"storeMappingPair");function $t(p){const O=p.input.charCodeAt(p.position);O===10?p.position++:O===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):B(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.firstTabInLine=-1}g($t,"readLineBreak");function bt(p,O,G){let K=0,j=p.input.charCodeAt(p.position);for(;j!==0;){for(;w(j);)j===9&&p.firstTabInLine===-1&&(p.firstTabInLine=p.position),j=p.input.charCodeAt(++p.position);if(O&&j===35)do j=p.input.charCodeAt(++p.position);while(j!==10&&j!==13&&j!==0);if(k(j))for($t(p),j=p.input.charCodeAt(p.position),K++,p.lineIndent=0;j===32;)p.lineIndent++,j=p.input.charCodeAt(++p.position);else break}return G!==-1&&K!==0&&p.lineIndent<G&&P(p,"deficient indentation"),K}g(bt,"skipSeparationSpace");function it(p){let O=p.position,G=p.input.charCodeAt(O);return!!((G===45||G===46)&&G===p.input.charCodeAt(O+1)&&G===p.input.charCodeAt(O+2)&&(O+=3,G=p.input.charCodeAt(O),G===0||T(G)))}g(it,"testDocumentSeparator");function ut(p,O){O===1?p.result+=" ":O>1&&(p.result+=e.repeat(`
277
- `,O-1))}g(ut,"writeFoldedLines");function Bt(p,O,G){let K,j,et,S,D,J;const X=p.kind,Z=p.result;let tt=p.input.charCodeAt(p.position);if(T(tt)||_(tt)||tt===35||tt===38||tt===42||tt===33||tt===124||tt===62||tt===39||tt===34||tt===37||tt===64||tt===96)return!1;if(tt===63||tt===45){const Q=p.input.charCodeAt(p.position+1);if(T(Q)||G&&_(Q))return!1}for(p.kind="scalar",p.result="",K=j=p.position,et=!1;tt!==0;){if(tt===58){const Q=p.input.charCodeAt(p.position+1);if(T(Q)||G&&_(Q))break}else if(tt===35){const Q=p.input.charCodeAt(p.position-1);if(T(Q))break}else{if(p.position===p.lineStart&&it(p)||G&&_(tt))break;if(k(tt))if(S=p.line,D=p.lineStart,J=p.lineIndent,bt(p,!1,-1),p.lineIndent>=O){et=!0,tt=p.input.charCodeAt(p.position);continue}else{p.position=j,p.line=S,p.lineStart=D,p.lineIndent=J;break}}et&&(pt(p,K,j,!1),ut(p,p.line-S),K=j=p.position,et=!1),w(tt)||(j=p.position+1),tt=p.input.charCodeAt(++p.position)}return pt(p,K,j,!1),p.result?!0:(p.kind=X,p.result=Z,!1)}g(Bt,"readPlainScalar");function At(p,O){let G,K,j=p.input.charCodeAt(p.position);if(j!==39)return!1;for(p.kind="scalar",p.result="",p.position++,G=K=p.position;(j=p.input.charCodeAt(p.position))!==0;)if(j===39)if(pt(p,G,p.position,!0),j=p.input.charCodeAt(++p.position),j===39)G=p.position,p.position++,K=p.position;else return!0;else k(j)?(pt(p,G,K,!0),ut(p,bt(p,!1,O)),G=K=p.position):p.position===p.lineStart&&it(p)?B(p,"unexpected end of the document within a single quoted scalar"):(p.position++,w(j)||(K=p.position));B(p,"unexpected end of the stream within a single quoted scalar")}g(At,"readSingleQuotedScalar");function qt(p,O){let G,K,j,et=p.input.charCodeAt(p.position);if(et!==34)return!1;for(p.kind="scalar",p.result="",p.position++,G=K=p.position;(et=p.input.charCodeAt(p.position))!==0;){if(et===34)return pt(p,G,p.position,!0),p.position++,!0;if(et===92){if(pt(p,G,p.position,!0),et=p.input.charCodeAt(++p.position),k(et))bt(p,!1,O);else if(et<256&&rt[et])p.result+=Y[et],p.position++;else if((j=F(et))>0){let S=j,D=0;for(;S>0;S--)et=p.input.charCodeAt(++p.position),(j=L(et))>=0?D=(D<<4)+j:B(p,"expected hexadecimal character");p.result+=W(D),p.position++}else B(p,"unknown escape sequence");G=K=p.position}else k(et)?(pt(p,G,K,!0),ut(p,bt(p,!1,O)),G=K=p.position):p.position===p.lineStart&&it(p)?B(p,"unexpected end of the document within a double quoted scalar"):(p.position++,w(et)||(K=p.position))}B(p,"unexpected end of the stream within a double quoted scalar")}g(qt,"readDoubleQuotedScalar");function R(p,O){let G=!0,K,j,et;const S=p.tag;let D;const J=p.anchor;let X,Z,tt,Q;const ft=Object.create(null);let lt,Ct,kt,Ot=p.input.charCodeAt(p.position);if(Ot===91)X=93,Q=!1,D=[];else if(Ot===123)X=125,Q=!0,D={};else return!1;for(p.anchor!==null&&$(p,p.anchor,D),Ot=p.input.charCodeAt(++p.position);Ot!==0;){if(bt(p,!0,O),Ot=p.input.charCodeAt(p.position),Ot===X)return p.position++,p.tag=S,p.anchor=J,p.kind=Q?"mapping":"sequence",p.result=D,!0;if(G?Ot===44&&B(p,"expected the node content, but found ','"):B(p,"missed comma between flow collection entries"),Ct=lt=kt=null,Z=tt=!1,Ot===63){const Wt=p.input.charCodeAt(p.position+1);T(Wt)&&(Z=tt=!0,p.position++,bt(p,!0,O))}K=p.line,j=p.lineStart,et=p.position,Ce(p,O,a,!1,!0),Ct=p.tag,lt=p.result,bt(p,!0,O),Ot=p.input.charCodeAt(p.position),(tt||p.line===K)&&Ot===58&&(Z=!0,Ot=p.input.charCodeAt(++p.position),bt(p,!0,O),Ce(p,O,a,!1,!0),kt=p.result),Q?wt(p,D,ft,Ct,lt,kt,K,j,et):Z?D.push(wt(p,null,ft,Ct,lt,kt,K,j,et)):D.push(lt),bt(p,!0,O),Ot=p.input.charCodeAt(p.position),Ot===44?(G=!0,Ot=p.input.charCodeAt(++p.position)):G=!1}B(p,"unexpected end of the stream within a flow collection")}g(R,"readFlowCollection");function vt(p,O){let G,K=c,j=!1,et=!1,S=O,D=0,J=!1,X,Z=p.input.charCodeAt(p.position);if(Z===124)G=!1;else if(Z===62)G=!0;else return!1;for(p.kind="scalar",p.result="";Z!==0;)if(Z=p.input.charCodeAt(++p.position),Z===43||Z===45)c===K?K=Z===43?u:h:B(p,"repeat of a chomping mode identifier");else if((X=v(Z))>=0)X===0?B(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):et?B(p,"repeat of an indentation width identifier"):(S=O+X-1,et=!0);else break;if(w(Z)){do Z=p.input.charCodeAt(++p.position);while(w(Z));if(Z===35)do Z=p.input.charCodeAt(++p.position);while(!k(Z)&&Z!==0)}for(;Z!==0;){for($t(p),p.lineIndent=0,Z=p.input.charCodeAt(p.position);(!et||p.lineIndent<S)&&Z===32;)p.lineIndent++,Z=p.input.charCodeAt(++p.position);if(!et&&p.lineIndent>S&&(S=p.lineIndent),k(Z)){D++;continue}if(!et&&S===0&&B(p,"missing indentation for block scalar"),p.lineIndent<S){K===u?p.result+=e.repeat(`
277
+ `,O-1))}g(ut,"writeFoldedLines");function Bt(p,O,G){let K,j,et,S,D,J;const X=p.kind,Z=p.result;let tt=p.input.charCodeAt(p.position);if(T(tt)||_(tt)||tt===35||tt===38||tt===42||tt===33||tt===124||tt===62||tt===39||tt===34||tt===37||tt===64||tt===96)return!1;if(tt===63||tt===45){const Q=p.input.charCodeAt(p.position+1);if(T(Q)||G&&_(Q))return!1}for(p.kind="scalar",p.result="",K=j=p.position,et=!1;tt!==0;){if(tt===58){const Q=p.input.charCodeAt(p.position+1);if(T(Q)||G&&_(Q))break}else if(tt===35){const Q=p.input.charCodeAt(p.position-1);if(T(Q))break}else{if(p.position===p.lineStart&&it(p)||G&&_(tt))break;if(k(tt))if(S=p.line,D=p.lineStart,J=p.lineIndent,bt(p,!1,-1),p.lineIndent>=O){et=!0,tt=p.input.charCodeAt(p.position);continue}else{p.position=j,p.line=S,p.lineStart=D,p.lineIndent=J;break}}et&&(pt(p,K,j,!1),ut(p,p.line-S),K=j=p.position,et=!1),w(tt)||(j=p.position+1),tt=p.input.charCodeAt(++p.position)}return pt(p,K,j,!1),p.result?!0:(p.kind=X,p.result=Z,!1)}g(Bt,"readPlainScalar");function At(p,O){let G,K,j=p.input.charCodeAt(p.position);if(j!==39)return!1;for(p.kind="scalar",p.result="",p.position++,G=K=p.position;(j=p.input.charCodeAt(p.position))!==0;)if(j===39)if(pt(p,G,p.position,!0),j=p.input.charCodeAt(++p.position),j===39)G=p.position,p.position++,K=p.position;else return!0;else k(j)?(pt(p,G,K,!0),ut(p,bt(p,!1,O)),G=K=p.position):p.position===p.lineStart&&it(p)?B(p,"unexpected end of the document within a single quoted scalar"):(p.position++,w(j)||(K=p.position));B(p,"unexpected end of the stream within a single quoted scalar")}g(At,"readSingleQuotedScalar");function qt(p,O){let G,K,j,et=p.input.charCodeAt(p.position);if(et!==34)return!1;for(p.kind="scalar",p.result="",p.position++,G=K=p.position;(et=p.input.charCodeAt(p.position))!==0;){if(et===34)return pt(p,G,p.position,!0),p.position++,!0;if(et===92){if(pt(p,G,p.position,!0),et=p.input.charCodeAt(++p.position),k(et))bt(p,!1,O);else if(et<256&&rt[et])p.result+=Y[et],p.position++;else if((j=F(et))>0){let S=j,D=0;for(;S>0;S--)et=p.input.charCodeAt(++p.position),(j=v(et))>=0?D=(D<<4)+j:B(p,"expected hexadecimal character");p.result+=W(D),p.position++}else B(p,"unknown escape sequence");G=K=p.position}else k(et)?(pt(p,G,K,!0),ut(p,bt(p,!1,O)),G=K=p.position):p.position===p.lineStart&&it(p)?B(p,"unexpected end of the document within a double quoted scalar"):(p.position++,w(et)||(K=p.position))}B(p,"unexpected end of the stream within a double quoted scalar")}g(qt,"readDoubleQuotedScalar");function R(p,O){let G=!0,K,j,et;const S=p.tag;let D;const J=p.anchor;let X,Z,tt,Q;const ft=Object.create(null);let lt,Ct,kt,Ot=p.input.charCodeAt(p.position);if(Ot===91)X=93,Q=!1,D=[];else if(Ot===123)X=125,Q=!0,D={};else return!1;for(p.anchor!==null&&$(p,p.anchor,D),Ot=p.input.charCodeAt(++p.position);Ot!==0;){if(bt(p,!0,O),Ot=p.input.charCodeAt(p.position),Ot===X)return p.position++,p.tag=S,p.anchor=J,p.kind=Q?"mapping":"sequence",p.result=D,!0;if(G?Ot===44&&B(p,"expected the node content, but found ','"):B(p,"missed comma between flow collection entries"),Ct=lt=kt=null,Z=tt=!1,Ot===63){const Wt=p.input.charCodeAt(p.position+1);T(Wt)&&(Z=tt=!0,p.position++,bt(p,!0,O))}K=p.line,j=p.lineStart,et=p.position,Ce(p,O,a,!1,!0),Ct=p.tag,lt=p.result,bt(p,!0,O),Ot=p.input.charCodeAt(p.position),(tt||p.line===K)&&Ot===58&&(Z=!0,Ot=p.input.charCodeAt(++p.position),bt(p,!0,O),Ce(p,O,a,!1,!0),kt=p.result),Q?wt(p,D,ft,Ct,lt,kt,K,j,et):Z?D.push(wt(p,null,ft,Ct,lt,kt,K,j,et)):D.push(lt),bt(p,!0,O),Ot=p.input.charCodeAt(p.position),Ot===44?(G=!0,Ot=p.input.charCodeAt(++p.position)):G=!1}B(p,"unexpected end of the stream within a flow collection")}g(R,"readFlowCollection");function vt(p,O){let G,K=c,j=!1,et=!1,S=O,D=0,J=!1,X,Z=p.input.charCodeAt(p.position);if(Z===124)G=!1;else if(Z===62)G=!0;else return!1;for(p.kind="scalar",p.result="";Z!==0;)if(Z=p.input.charCodeAt(++p.position),Z===43||Z===45)c===K?K=Z===43?u:h:B(p,"repeat of a chomping mode identifier");else if((X=L(Z))>=0)X===0?B(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):et?B(p,"repeat of an indentation width identifier"):(S=O+X-1,et=!0);else break;if(w(Z)){do Z=p.input.charCodeAt(++p.position);while(w(Z));if(Z===35)do Z=p.input.charCodeAt(++p.position);while(!k(Z)&&Z!==0)}for(;Z!==0;){for($t(p),p.lineIndent=0,Z=p.input.charCodeAt(p.position);(!et||p.lineIndent<S)&&Z===32;)p.lineIndent++,Z=p.input.charCodeAt(++p.position);if(!et&&p.lineIndent>S&&(S=p.lineIndent),k(Z)){D++;continue}if(!et&&S===0&&B(p,"missing indentation for block scalar"),p.lineIndent<S){K===u?p.result+=e.repeat(`
278
278
  `,j?1+D:D):K===c&&j&&(p.result+=`
279
279
  `);break}G?w(Z)?(J=!0,p.result+=e.repeat(`
280
280
  `,j?1+D:D)):J?(J=!1,p.result+=e.repeat(`
281
281
  `,D+1)):D===0?j&&(p.result+=" "):p.result+=e.repeat(`
282
282
  `,D):p.result+=e.repeat(`
283
283
  `,j?1+D:D),j=!0,et=!0,D=0;const tt=p.position;for(;!k(Z)&&Z!==0;)Z=p.input.charCodeAt(++p.position);pt(p,tt,p.position,!1)}return!0}g(vt,"readBlockScalar");function xe(p,O){const G=p.tag,K=p.anchor,j=[];let et=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&$(p,p.anchor,j);let S=p.input.charCodeAt(p.position);for(;S!==0&&(p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,B(p,"tab characters must not be used in indentation")),S===45);){const D=p.input.charCodeAt(p.position+1);if(!T(D))break;if(et=!0,p.position++,bt(p,!0,-1)&&p.lineIndent<=O){j.push(null),S=p.input.charCodeAt(p.position);continue}const J=p.line;if(Ce(p,O,n,!1,!0),j.push(p.result),bt(p,!0,-1),S=p.input.charCodeAt(p.position),(p.line===J||p.lineIndent>O)&&S!==0)B(p,"bad indentation of a sequence entry");else if(p.lineIndent<O)break}return et?(p.tag=G,p.anchor=K,p.kind="sequence",p.result=j,!0):!1}g(xe,"readBlockSequence");function Le(p,O,G){let K,j,et,S;const D=p.tag,J=p.anchor,X={},Z=Object.create(null);let tt=null,Q=null,ft=null,lt=!1,Ct=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&$(p,p.anchor,X);let kt=p.input.charCodeAt(p.position);for(;kt!==0;){!lt&&p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,B(p,"tab characters must not be used in indentation"));const Ot=p.input.charCodeAt(p.position+1),Wt=p.line;if((kt===63||kt===58)&&T(Ot))kt===63?(lt&&(wt(p,X,Z,tt,Q,null,j,et,S),tt=Q=ft=null),Ct=!0,lt=!0,K=!0):lt?(lt=!1,K=!0):B(p,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),p.position+=1,kt=Ot;else{if(j=p.line,et=p.lineStart,S=p.position,!Ce(p,G,o,!1,!0))break;if(p.line===Wt){for(kt=p.input.charCodeAt(p.position);w(kt);)kt=p.input.charCodeAt(++p.position);if(kt===58)kt=p.input.charCodeAt(++p.position),T(kt)||B(p,"a whitespace character is expected after the key-value separator within a block mapping"),lt&&(wt(p,X,Z,tt,Q,null,j,et,S),tt=Q=ft=null),Ct=!0,lt=!1,K=!1,tt=p.tag,Q=p.result;else if(Ct)B(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=D,p.anchor=J,!0}else if(Ct)B(p,"can not read a block mapping entry; a multiline key may not be an implicit key");else return p.tag=D,p.anchor=J,!0}if((p.line===Wt||p.lineIndent>O)&&(lt&&(j=p.line,et=p.lineStart,S=p.position),Ce(p,O,l,!0,K)&&(lt?Q=p.result:ft=p.result),lt||(wt(p,X,Z,tt,Q,ft,j,et,S),tt=Q=ft=null),bt(p,!0,-1),kt=p.input.charCodeAt(p.position)),(p.line===Wt||p.lineIndent>O)&&kt!==0)B(p,"bad indentation of a mapping entry");else if(p.lineIndent<O)break}return lt&&wt(p,X,Z,tt,Q,null,j,et,S),Ct&&(p.tag=D,p.anchor=J,p.kind="mapping",p.result=X),Ct}g(Le,"readBlockMapping");function wi(p){let O=!1,G=!1,K,j,et=p.input.charCodeAt(p.position);if(et!==33)return!1;p.tag!==null&&B(p,"duplication of a tag property"),et=p.input.charCodeAt(++p.position),et===60?(O=!0,et=p.input.charCodeAt(++p.position)):et===33?(G=!0,K="!!",et=p.input.charCodeAt(++p.position)):K="!";let S=p.position;if(O){do et=p.input.charCodeAt(++p.position);while(et!==0&&et!==62);p.position<p.length?(j=p.input.slice(S,p.position),et=p.input.charCodeAt(++p.position)):B(p,"unexpected end of the stream within a verbatim tag")}else{for(;et!==0&&!T(et);)et===33&&(G?B(p,"tag suffix cannot contain exclamation marks"):(K=p.input.slice(S-1,p.position+1),m.test(K)||B(p,"named tag handle cannot contain such characters"),G=!0,S=p.position+1)),et=p.input.charCodeAt(++p.position);j=p.input.slice(S,p.position),y.test(j)&&B(p,"tag suffix cannot contain flow indicator characters")}j&&!C.test(j)&&B(p,"tag name cannot contain such characters: "+j);try{j=decodeURIComponent(j)}catch{B(p,"tag name is malformed: "+j)}return O?p.tag=j:s.call(p.tagMap,K)?p.tag=p.tagMap[K]+j:K==="!"?p.tag="!"+j:K==="!!"?p.tag="tag:yaml.org,2002:"+j:B(p,'undeclared tag handle "'+K+'"'),!0}g(wi,"readTagProperty");function Er(p){let O=p.input.charCodeAt(p.position);if(O!==38)return!1;p.anchor!==null&&B(p,"duplication of an anchor property"),O=p.input.charCodeAt(++p.position);const G=p.position;for(;O!==0&&!T(O)&&!_(O);)O=p.input.charCodeAt(++p.position);return p.position===G&&B(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(G,p.position),!0}g(Er,"readAnchorProperty");function $r(p){let O=p.input.charCodeAt(p.position);if(O!==42)return!1;O=p.input.charCodeAt(++p.position);const G=p.position;for(;O!==0&&!T(O)&&!_(O);)O=p.input.charCodeAt(++p.position);p.position===G&&B(p,"name of an alias node must contain at least one character");const K=p.input.slice(G,p.position);return s.call(p.anchorMap,K)||B(p,'unidentified alias "'+K+'"'),p.result=p.anchorMap[K],bt(p,!0,-1),!0}g($r,"readAlias");function Si(p,O,G,K){const j=ht(p);return N(p),gt(p,O),p.tag=null,p.anchor=null,p.kind=null,p.result=null,Le(p,G,K)&&p.kind==="mapping"?(V(p),!0):(at(p),gt(p,j),!1)}g(Si,"tryReadBlockMappingFromProperty");function Ce(p,O,G,K,j){let et,S,D=1,J=!1,X=!1,Z=null,tt,Q,ft;p.depth>=p.maxDepth&&B(p,"nesting exceeded maxDepth ("+p.maxDepth+")"),p.depth+=1,p.listener!==null&&p.listener("open",p),p.tag=null,p.anchor=null,p.kind=null,p.result=null;const lt=et=S=l===G||n===G;if(K&&bt(p,!0,-1)&&(J=!0,p.lineIndent>O?D=1:p.lineIndent===O?D=0:p.lineIndent<O&&(D=-1)),D===1)for(;;){const Ct=p.input.charCodeAt(p.position),kt=ht(p);if(J&&(Ct===33&&p.tag!==null||Ct===38&&p.anchor!==null)||!wi(p)&&!Er(p))break;Z===null&&(Z=kt),bt(p,!0,-1)?(J=!0,S=lt,p.lineIndent>O?D=1:p.lineIndent===O?D=0:p.lineIndent<O&&(D=-1)):S=!1}if(S&&(S=J||j),D===1||l===G)if(a===G||o===G?Q=O:Q=O+1,ft=p.position-p.lineStart,D===1)if(S&&(xe(p,ft)||Le(p,ft,Q))||R(p,Q))X=!0;else{const Ct=p.input.charCodeAt(p.position);Z!==null&&lt&&!S&&Ct!==124&&Ct!==62&&Si(p,Z,Z.position-Z.lineStart,Q)||et&&vt(p,Q)||At(p,Q)||qt(p,Q)?X=!0:$r(p)?(X=!0,(p.tag!==null||p.anchor!==null)&&B(p,"alias node should not have any properties")):Bt(p,Q,a===G)&&(X=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&$(p,p.anchor,p.result)}else D===0&&(X=S&&xe(p,ft));if(p.tag===null)p.anchor!==null&&$(p,p.anchor,p.result);else if(p.tag==="?"){p.result!==null&&p.kind!=="scalar"&&B(p,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+p.kind+'"');for(let Ct=0,kt=p.implicitTypes.length;Ct<kt;Ct+=1)if(tt=p.implicitTypes[Ct],tt.resolve(p.result)){p.result=tt.construct(p.result),p.tag=tt.tag,p.anchor!==null&&$(p,p.anchor,p.result);break}}else if(p.tag!=="!"){if(s.call(p.typeMap[p.kind||"fallback"],p.tag))tt=p.typeMap[p.kind||"fallback"][p.tag];else{tt=null;const Ct=p.typeMap.multi[p.kind||"fallback"];for(let kt=0,Ot=Ct.length;kt<Ot;kt+=1)if(p.tag.slice(0,Ct[kt].tag.length)===Ct[kt].tag){tt=Ct[kt];break}}tt||B(p,"unknown tag !<"+p.tag+">"),p.result!==null&&tt.kind!==p.kind&&B(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+tt.kind+'", not "'+p.kind+'"'),tt.resolve(p.result,p.tag)?(p.result=tt.construct(p.result,p.tag),p.anchor!==null&&$(p,p.anchor,p.result)):B(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.depth-=1,p.tag!==null||p.anchor!==null||X}g(Ce,"composeNode");function Ti(p){const O=p.position;let G=!1,K;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(K=p.input.charCodeAt(p.position))!==0&&(bt(p,!0,-1),K=p.input.charCodeAt(p.position),!(p.lineIndent>0||K!==37));){G=!0,K=p.input.charCodeAt(++p.position);let j=p.position;for(;K!==0&&!T(K);)K=p.input.charCodeAt(++p.position);const et=p.input.slice(j,p.position),S=[];for(et.length<1&&B(p,"directive name must not be less than one character in length");K!==0;){for(;w(K);)K=p.input.charCodeAt(++p.position);if(K===35){do K=p.input.charCodeAt(++p.position);while(K!==0&&!k(K));break}if(k(K))break;for(j=p.position;K!==0&&!T(K);)K=p.input.charCodeAt(++p.position);S.push(p.input.slice(j,p.position))}K!==0&&$t(p),s.call(yt,et)?yt[et](p,et,S):P(p,'unknown document directive "'+et+'"')}if(bt(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,bt(p,!0,-1)):G&&B(p,"directives end mark is expected"),Ce(p,p.lineIndent-1,l,!1,!0),bt(p,!0,-1),p.checkLineBreaks&&f.test(p.input.slice(O,p.position))&&P(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&it(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,bt(p,!0,-1));return}p.position<p.length-1&&B(p,"end of the stream or a document separator is expected")}g(Ti,"readDocument");function Or(p,O){p=String(p),O=O||{},p.length!==0&&(p.charCodeAt(p.length-1)!==10&&p.charCodeAt(p.length-1)!==13&&(p+=`
284
- `),p.charCodeAt(0)===65279&&(p=p.slice(1)));const G=new A(p,O),K=p.indexOf("\0");for(K!==-1&&(G.position=K,B(G,"null byte is not allowed in input")),G.input+="\0";G.input.charCodeAt(G.position)===32;)G.lineIndent+=1,G.position+=1;for(;G.position<G.length-1;)Ti(G);return G.documents}g(Or,"loadDocuments");function Pr(p,O,G){O!==null&&typeof O=="object"&&typeof G>"u"&&(G=O,O=null);const K=Or(p,G);if(typeof O!="function")return K;for(let j=0,et=K.length;j<et;j+=1)O(K[j])}g(Pr,"loadAll2");function _i(p,O){const G=Or(p,O);if(G.length!==0){if(G.length===1)return G[0];throw new t("expected a single document in the stream, but found more")}}return g(_i,"load2"),Ms.loadAll=Pr,Ms.load=_i,Ms}g(sy,"requireLoader");var Fo={},fu;function ay(){if(fu)return Fo;fu=1;const e=Ci(),t=bi(),r=Ra(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,o=9,n=10,l=13,c=32,h=33,u=34,d=35,f=37,y=38,m=39,C=42,x=44,k=45,w=58,T=61,_=62,L=63,F=64,v=91,U=93,W=96,q=123,rt=124,Y=125,A={};A[0]="\\0",A[7]="\\a",A[8]="\\b",A[9]="\\t",A[10]="\\n",A[11]="\\v",A[12]="\\f",A[13]="\\r",A[27]="\\e",A[34]='\\"',A[92]="\\\\",A[133]="\\N",A[160]="\\_",A[8232]="\\L",A[8233]="\\P";const E=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function P(S,D){if(D===null)return{};const J={},X=Object.keys(D);for(let Z=0,tt=X.length;Z<tt;Z+=1){let Q=X[Z],ft=String(D[Q]);Q.slice(0,2)==="!!"&&(Q="tag:yaml.org,2002:"+Q.slice(2));const lt=S.compiledTypeMap.fallback[Q];lt&&s.call(lt.styleAliases,ft)&&(ft=lt.styleAliases[ft]),J[Q]=ft}return J}g(P,"compileStyleMap");function $(S){let D,J;const X=S.toString(16).toUpperCase();if(S<=255)D="x",J=2;else if(S<=65535)D="u",J=4;else if(S<=4294967295)D="U",J=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+D+e.repeat("0",J-X.length)+X}g($,"encodeHex");const N=1,V=2;function at(S){this.schema=S.schema||r,this.indent=Math.max(1,S.indent||2),this.noArrayIndent=S.noArrayIndent||!1,this.skipInvalid=S.skipInvalid||!1,this.flowLevel=e.isNothing(S.flowLevel)?-1:S.flowLevel,this.styleMap=P(this.schema,S.styles||null),this.sortKeys=S.sortKeys||!1,this.lineWidth=S.lineWidth||80,this.noRefs=S.noRefs||!1,this.noCompatMode=S.noCompatMode||!1,this.condenseFlow=S.condenseFlow||!1,this.quotingType=S.quotingType==='"'?V:N,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(at,"State");function ht(S,D){const J=e.repeat(" ",D);let X=0,Z="";const tt=S.length;for(;X<tt;){let Q;const ft=S.indexOf(`
284
+ `),p.charCodeAt(0)===65279&&(p=p.slice(1)));const G=new A(p,O),K=p.indexOf("\0");for(K!==-1&&(G.position=K,B(G,"null byte is not allowed in input")),G.input+="\0";G.input.charCodeAt(G.position)===32;)G.lineIndent+=1,G.position+=1;for(;G.position<G.length-1;)Ti(G);return G.documents}g(Or,"loadDocuments");function Pr(p,O,G){O!==null&&typeof O=="object"&&typeof G>"u"&&(G=O,O=null);const K=Or(p,G);if(typeof O!="function")return K;for(let j=0,et=K.length;j<et;j+=1)O(K[j])}g(Pr,"loadAll2");function _i(p,O){const G=Or(p,O);if(G.length!==0){if(G.length===1)return G[0];throw new t("expected a single document in the stream, but found more")}}return g(_i,"load2"),Ms.loadAll=Pr,Ms.load=_i,Ms}g(sy,"requireLoader");var Fo={},fu;function ay(){if(fu)return Fo;fu=1;const e=Ci(),t=bi(),r=Ra(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,o=9,n=10,l=13,c=32,h=33,u=34,d=35,f=37,y=38,m=39,C=42,x=44,k=45,w=58,T=61,_=62,v=63,F=64,L=91,U=93,W=96,q=123,rt=124,Y=125,A={};A[0]="\\0",A[7]="\\a",A[8]="\\b",A[9]="\\t",A[10]="\\n",A[11]="\\v",A[12]="\\f",A[13]="\\r",A[27]="\\e",A[34]='\\"',A[92]="\\\\",A[133]="\\N",A[160]="\\_",A[8232]="\\L",A[8233]="\\P";const E=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function P(S,D){if(D===null)return{};const J={},X=Object.keys(D);for(let Z=0,tt=X.length;Z<tt;Z+=1){let Q=X[Z],ft=String(D[Q]);Q.slice(0,2)==="!!"&&(Q="tag:yaml.org,2002:"+Q.slice(2));const lt=S.compiledTypeMap.fallback[Q];lt&&s.call(lt.styleAliases,ft)&&(ft=lt.styleAliases[ft]),J[Q]=ft}return J}g(P,"compileStyleMap");function $(S){let D,J;const X=S.toString(16).toUpperCase();if(S<=255)D="x",J=2;else if(S<=65535)D="u",J=4;else if(S<=4294967295)D="U",J=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+D+e.repeat("0",J-X.length)+X}g($,"encodeHex");const N=1,V=2;function at(S){this.schema=S.schema||r,this.indent=Math.max(1,S.indent||2),this.noArrayIndent=S.noArrayIndent||!1,this.skipInvalid=S.skipInvalid||!1,this.flowLevel=e.isNothing(S.flowLevel)?-1:S.flowLevel,this.styleMap=P(this.schema,S.styles||null),this.sortKeys=S.sortKeys||!1,this.lineWidth=S.lineWidth||80,this.noRefs=S.noRefs||!1,this.noCompatMode=S.noCompatMode||!1,this.condenseFlow=S.condenseFlow||!1,this.quotingType=S.quotingType==='"'?V:N,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(at,"State");function ht(S,D){const J=e.repeat(" ",D);let X=0,Z="";const tt=S.length;for(;X<tt;){let Q;const ft=S.indexOf(`
285
285
  `,X);ft===-1?(Q=S.slice(X),X=tt):(Q=S.slice(X,ft+1),X=ft+1),Q.length&&Q!==`
286
286
  `&&(Z+=J),Z+=Q}return Z}g(ht,"indentString");function gt(S,D){return`
287
- `+e.repeat(" ",S.indent*D)}g(gt,"generateNextLine");function yt(S,D){for(let J=0,X=S.implicitTypes.length;J<X;J+=1)if(S.implicitTypes[J].resolve(D))return!0;return!1}g(yt,"testImplicitResolving");function pt(S){return S===c||S===o}g(pt,"isWhitespace");function _t(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}g(_t,"isPrintable");function wt(S){return _t(S)&&S!==a&&S!==l&&S!==n}g(wt,"isNsCharOrWhitespace");function $t(S,D,J){const X=wt(S),Z=X&&!pt(S);return(J?X:X&&S!==x&&S!==v&&S!==U&&S!==q&&S!==Y)&&S!==d&&!(D===w&&!Z)||wt(D)&&!pt(D)&&S===d||D===w&&Z}g($t,"isPlainSafe");function bt(S){return _t(S)&&S!==a&&!pt(S)&&S!==k&&S!==L&&S!==w&&S!==x&&S!==v&&S!==U&&S!==q&&S!==Y&&S!==d&&S!==y&&S!==C&&S!==h&&S!==rt&&S!==T&&S!==_&&S!==m&&S!==u&&S!==f&&S!==F&&S!==W}g(bt,"isPlainSafeFirst");function it(S){return!pt(S)&&S!==w}g(it,"isPlainSafeLast");function ut(S,D){const J=S.charCodeAt(D);let X;return J>=55296&&J<=56319&&D+1<S.length&&(X=S.charCodeAt(D+1),X>=56320&&X<=57343)?(J-55296)*1024+X-56320+65536:J}g(ut,"codePointAt");function Bt(S){return/^\n* /.test(S)}g(Bt,"needIndentIndicator");const At=1,qt=2,R=3,vt=4,xe=5;function Le(S,D,J,X,Z,tt,Q,ft){let lt,Ct=0,kt=null,Ot=!1,Wt=!1;const Zl=X!==-1;let Bi=-1,vi=bt(ut(S,0))&&it(ut(S,S.length-1));if(D||Q)for(lt=0;lt<S.length;Ct>=65536?lt+=2:lt++){if(Ct=ut(S,lt),!_t(Ct))return xe;vi=vi&&$t(Ct,kt,ft),kt=Ct}else{for(lt=0;lt<S.length;Ct>=65536?lt+=2:lt++){if(Ct=ut(S,lt),Ct===n)Ot=!0,Zl&&(Wt=Wt||lt-Bi-1>X&&S[Bi+1]!==" ",Bi=lt);else if(!_t(Ct))return xe;vi=vi&&$t(Ct,kt,ft),kt=Ct}Wt=Wt||Zl&&lt-Bi-1>X&&S[Bi+1]!==" "}return!Ot&&!Wt?vi&&!Q&&!Z(S)?At:tt===V?xe:qt:J>9&&Bt(S)?xe:Q?tt===V?xe:qt:Wt?vt:R}g(Le,"chooseScalarStyle");function wi(S,D,J,X,Z){S.dump=function(){if(D.length===0)return S.quotingType===V?'""':"''";if(!S.noCompatMode&&(E.indexOf(D)!==-1||B.test(D)))return S.quotingType===V?'"'+D+'"':"'"+D+"'";const tt=S.indent*Math.max(1,J),Q=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-tt),ft=X||S.flowLevel>-1&&J>=S.flowLevel;function lt(Ct){return yt(S,Ct)}switch(g(lt,"testAmbiguity"),Le(D,ft,S.indent,Q,lt,S.quotingType,S.forceQuotes&&!X,Z)){case At:return D;case qt:return"'"+D.replace(/'/g,"''")+"'";case R:return"|"+Er(D,S.indent)+$r(ht(D,tt));case vt:return">"+Er(D,S.indent)+$r(ht(Si(D,Q),tt));case xe:return'"'+Ti(D)+'"';default:throw new t("impossible error: invalid scalar style")}}()}g(wi,"writeScalar");function Er(S,D){const J=Bt(S)?String(D):"",X=S[S.length-1]===`
287
+ `+e.repeat(" ",S.indent*D)}g(gt,"generateNextLine");function yt(S,D){for(let J=0,X=S.implicitTypes.length;J<X;J+=1)if(S.implicitTypes[J].resolve(D))return!0;return!1}g(yt,"testImplicitResolving");function pt(S){return S===c||S===o}g(pt,"isWhitespace");function _t(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}g(_t,"isPrintable");function wt(S){return _t(S)&&S!==a&&S!==l&&S!==n}g(wt,"isNsCharOrWhitespace");function $t(S,D,J){const X=wt(S),Z=X&&!pt(S);return(J?X:X&&S!==x&&S!==L&&S!==U&&S!==q&&S!==Y)&&S!==d&&!(D===w&&!Z)||wt(D)&&!pt(D)&&S===d||D===w&&Z}g($t,"isPlainSafe");function bt(S){return _t(S)&&S!==a&&!pt(S)&&S!==k&&S!==v&&S!==w&&S!==x&&S!==L&&S!==U&&S!==q&&S!==Y&&S!==d&&S!==y&&S!==C&&S!==h&&S!==rt&&S!==T&&S!==_&&S!==m&&S!==u&&S!==f&&S!==F&&S!==W}g(bt,"isPlainSafeFirst");function it(S){return!pt(S)&&S!==w}g(it,"isPlainSafeLast");function ut(S,D){const J=S.charCodeAt(D);let X;return J>=55296&&J<=56319&&D+1<S.length&&(X=S.charCodeAt(D+1),X>=56320&&X<=57343)?(J-55296)*1024+X-56320+65536:J}g(ut,"codePointAt");function Bt(S){return/^\n* /.test(S)}g(Bt,"needIndentIndicator");const At=1,qt=2,R=3,vt=4,xe=5;function Le(S,D,J,X,Z,tt,Q,ft){let lt,Ct=0,kt=null,Ot=!1,Wt=!1;const Zl=X!==-1;let Bi=-1,vi=bt(ut(S,0))&&it(ut(S,S.length-1));if(D||Q)for(lt=0;lt<S.length;Ct>=65536?lt+=2:lt++){if(Ct=ut(S,lt),!_t(Ct))return xe;vi=vi&&$t(Ct,kt,ft),kt=Ct}else{for(lt=0;lt<S.length;Ct>=65536?lt+=2:lt++){if(Ct=ut(S,lt),Ct===n)Ot=!0,Zl&&(Wt=Wt||lt-Bi-1>X&&S[Bi+1]!==" ",Bi=lt);else if(!_t(Ct))return xe;vi=vi&&$t(Ct,kt,ft),kt=Ct}Wt=Wt||Zl&&lt-Bi-1>X&&S[Bi+1]!==" "}return!Ot&&!Wt?vi&&!Q&&!Z(S)?At:tt===V?xe:qt:J>9&&Bt(S)?xe:Q?tt===V?xe:qt:Wt?vt:R}g(Le,"chooseScalarStyle");function wi(S,D,J,X,Z){S.dump=function(){if(D.length===0)return S.quotingType===V?'""':"''";if(!S.noCompatMode&&(E.indexOf(D)!==-1||B.test(D)))return S.quotingType===V?'"'+D+'"':"'"+D+"'";const tt=S.indent*Math.max(1,J),Q=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-tt),ft=X||S.flowLevel>-1&&J>=S.flowLevel;function lt(Ct){return yt(S,Ct)}switch(g(lt,"testAmbiguity"),Le(D,ft,S.indent,Q,lt,S.quotingType,S.forceQuotes&&!X,Z)){case At:return D;case qt:return"'"+D.replace(/'/g,"''")+"'";case R:return"|"+Er(D,S.indent)+$r(ht(D,tt));case vt:return">"+Er(D,S.indent)+$r(ht(Si(D,Q),tt));case xe:return'"'+Ti(D)+'"';default:throw new t("impossible error: invalid scalar style")}}()}g(wi,"writeScalar");function Er(S,D){const J=Bt(S)?String(D):"",X=S[S.length-1]===`
288
288
  `,tt=X&&(S[S.length-2]===`
289
289
  `||S===`
290
290
  `)?"+":X?"":"-";return J+tt+`
@@ -296,8 +296,8 @@ ${a.join(`
296
296
  `+S.slice(Z,tt),Z=tt+1),Q=ft;return lt+=`
297
297
  `,S.length-Z>D&&Q>Z?lt+=S.slice(Z,Q)+`
298
298
  `+S.slice(Q+1):lt+=S.slice(Z),lt.slice(1)}g(Ce,"foldLine");function Ti(S){let D="",J=0;for(let X=0;X<S.length;J>=65536?X+=2:X++){J=ut(S,X);const Z=A[J];!Z&&_t(J)?(D+=S[X],J>=65536&&(D+=S[X+1])):D+=Z||$(J)}return D}g(Ti,"escapeString");function Or(S,D,J){let X="";const Z=S.tag;for(let tt=0,Q=J.length;tt<Q;tt+=1){let ft=J[tt];S.replacer&&(ft=S.replacer.call(J,String(tt),ft)),(G(S,D,ft,!1,!1)||typeof ft>"u"&&G(S,D,null,!1,!1))&&(X!==""&&(X+=","+(S.condenseFlow?"":" ")),X+=S.dump)}S.tag=Z,S.dump="["+X+"]"}g(Or,"writeFlowSequence");function Pr(S,D,J,X){let Z="";const tt=S.tag;for(let Q=0,ft=J.length;Q<ft;Q+=1){let lt=J[Q];S.replacer&&(lt=S.replacer.call(J,String(Q),lt)),(G(S,D+1,lt,!0,!0,!1,!0)||typeof lt>"u"&&G(S,D+1,null,!0,!0,!1,!0))&&((!X||Z!=="")&&(Z+=gt(S,D)),S.dump&&n===S.dump.charCodeAt(0)?Z+="-":Z+="- ",Z+=S.dump)}S.tag=tt,S.dump=Z||"[]"}g(Pr,"writeBlockSequence");function _i(S,D,J){let X="";const Z=S.tag,tt=Object.keys(J);for(let Q=0,ft=tt.length;Q<ft;Q+=1){let lt="";X!==""&&(lt+=", "),S.condenseFlow&&(lt+='"');const Ct=tt[Q];let kt=J[Ct];S.replacer&&(kt=S.replacer.call(J,Ct,kt)),G(S,D,Ct,!1,!1)&&(S.dump.length>1024&&(lt+="? "),lt+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),G(S,D,kt,!1,!1)&&(lt+=S.dump,X+=lt))}S.tag=Z,S.dump="{"+X+"}"}g(_i,"writeFlowMapping");function p(S,D,J,X){let Z="";const tt=S.tag,Q=Object.keys(J);if(S.sortKeys===!0)Q.sort();else if(typeof S.sortKeys=="function")Q.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let ft=0,lt=Q.length;ft<lt;ft+=1){let Ct="";(!X||Z!=="")&&(Ct+=gt(S,D));const kt=Q[ft];let Ot=J[kt];if(S.replacer&&(Ot=S.replacer.call(J,kt,Ot)),!G(S,D+1,kt,!0,!0,!0))continue;const Wt=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;Wt&&(S.dump&&n===S.dump.charCodeAt(0)?Ct+="?":Ct+="? "),Ct+=S.dump,Wt&&(Ct+=gt(S,D)),G(S,D+1,Ot,!0,Wt)&&(S.dump&&n===S.dump.charCodeAt(0)?Ct+=":":Ct+=": ",Ct+=S.dump,Z+=Ct)}S.tag=tt,S.dump=Z||"{}"}g(p,"writeBlockMapping");function O(S,D,J){const X=J?S.explicitTypes:S.implicitTypes;for(let Z=0,tt=X.length;Z<tt;Z+=1){const Q=X[Z];if((Q.instanceOf||Q.predicate)&&(!Q.instanceOf||typeof D=="object"&&D instanceof Q.instanceOf)&&(!Q.predicate||Q.predicate(D))){if(J?Q.multi&&Q.representName?S.tag=Q.representName(D):S.tag=Q.tag:S.tag="?",Q.represent){const ft=S.styleMap[Q.tag]||Q.defaultStyle;let lt;if(i.call(Q.represent)==="[object Function]")lt=Q.represent(D,ft);else if(s.call(Q.represent,ft))lt=Q.represent[ft](D,ft);else throw new t("!<"+Q.tag+'> tag resolver accepts not "'+ft+'" style');S.dump=lt}return!0}}return!1}g(O,"detectType");function G(S,D,J,X,Z,tt,Q){S.tag=null,S.dump=J,O(S,J,!1)||O(S,J,!0);const ft=i.call(S.dump),lt=X;X&&(X=S.flowLevel<0||S.flowLevel>D);const Ct=ft==="[object Object]"||ft==="[object Array]";let kt,Ot;if(Ct&&(kt=S.duplicates.indexOf(J),Ot=kt!==-1),(S.tag!==null&&S.tag!=="?"||Ot||S.indent!==2&&D>0)&&(Z=!1),Ot&&S.usedDuplicates[kt])S.dump="*ref_"+kt;else{if(Ct&&Ot&&!S.usedDuplicates[kt]&&(S.usedDuplicates[kt]=!0),ft==="[object Object]")X&&Object.keys(S.dump).length!==0?(p(S,D,S.dump,Z),Ot&&(S.dump="&ref_"+kt+S.dump)):(_i(S,D,S.dump),Ot&&(S.dump="&ref_"+kt+" "+S.dump));else if(ft==="[object Array]")X&&S.dump.length!==0?(S.noArrayIndent&&!Q&&D>0?Pr(S,D-1,S.dump,Z):Pr(S,D,S.dump,Z),Ot&&(S.dump="&ref_"+kt+S.dump)):(Or(S,D,S.dump),Ot&&(S.dump="&ref_"+kt+" "+S.dump));else if(ft==="[object String]")S.tag!=="?"&&wi(S,S.dump,D,tt,lt);else{if(ft==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+ft)}if(S.tag!==null&&S.tag!=="?"){let Wt=encodeURI(S.tag[0]==="!"?S.tag.slice(1):S.tag).replace(/!/g,"%21");S.tag[0]==="!"?Wt="!"+Wt:Wt.slice(0,18)==="tag:yaml.org,2002:"?Wt="!!"+Wt.slice(18):Wt="!<"+Wt+">",S.dump=Wt+" "+S.dump}}return!0}g(G,"writeNode");function K(S,D){const J=[],X=[];j(S,J,X);const Z=X.length;for(let tt=0;tt<Z;tt+=1)D.duplicates.push(J[X[tt]]);D.usedDuplicates=new Array(Z)}g(K,"getDuplicateReferences");function j(S,D,J){if(S!==null&&typeof S=="object"){const X=D.indexOf(S);if(X!==-1)J.indexOf(X)===-1&&J.push(X);else if(D.push(S),Array.isArray(S))for(let Z=0,tt=S.length;Z<tt;Z+=1)j(S[Z],D,J);else{const Z=Object.keys(S);for(let tt=0,Q=Z.length;tt<Q;tt+=1)j(S[Z[tt]],D,J)}}}g(j,"inspectNode");function et(S,D){D=D||{};const J=new at(D);J.noRefs||K(S,J);let X=S;return J.replacer&&(X=J.replacer.call({"":X},"",X)),G(J,0,X,!0,!0)?J.dump+`
299
- `:""}return g(et,"dump2"),Fo.dump=et,Fo}g(ay,"requireDumper");var gu;function oy(){if(gu)return Jt;gu=1;const e=sy(),t=ay();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return g(r,"renamed"),Jt.Type=ae(),Jt.Schema=Fl(),Jt.FAILSAFE_SCHEMA=$l(),Jt.JSON_SCHEMA=Rl(),Jt.CORE_SCHEMA=ql(),Jt.DEFAULT_SCHEMA=Ra(),Jt.load=e.load,Jt.loadAll=e.loadAll,Jt.dump=t.dump,Jt.YAMLException=bi(),Jt.types={binary:zl(),float:Il(),map:El(),null:Ol(),pairs:Yl(),set:jl(),timestamp:Nl(),bool:Pl(),int:Dl(),merge:Wl(),omap:Hl(),seq:Al(),str:Ml()},Jt.safeLoad=r("safeLoad","load"),Jt.safeLoadAll=r("safeLoadAll","loadAll"),Jt.safeDump=r("safeDump","dump"),Jt}g(oy,"requireJsYaml");var ev=oy(),rv=ry(ev),{Type:xM,Schema:CM,FAILSAFE_SCHEMA:bM,JSON_SCHEMA:iv,CORE_SCHEMA:kM,DEFAULT_SCHEMA:wM,load:sv,loadAll:SM,dump:TM,YAMLException:_M,types:BM,safeLoad:vM,safeLoadAll:LM,safeDump:FM}=rv,av={common:ds,getConfig:Yt,insertCluster:up,insertEdge:gp,insertEdgeLabel:yl,insertMarkers:mp,insertNode:pl,interpolateToCurve:Un,labelHelper:mt,log:I,positionEdgeLabel:$w},ls={},ny=g(e=>{for(const t of e)ls[t.name]=t},"registerLayoutLoaders"),ov=g(()=>{ny([{name:"dagre",loader:g(async()=>await Mt(()=>import("./dagre-3AP2YEHR-CP2z1R4J.js"),__vite__mapDeps([3,4,1,2])),"loader")},{name:"swimlane",loader:g(async()=>await Mt(()=>import("./swimlanes-XN3QIQJK-T7GDnOeh.js"),__vite__mapDeps([5,1,2])),"loader")},{name:"cose-bilkent",loader:g(async()=>await Mt(()=>import("./cose-bilkent-JH36ORCC-CAWDvLIh.js"),__vite__mapDeps([6,7,1,2])),"loader")}])},"registerDefaultLayoutLoaders");ov();var MM=g(async(e,t)=>{if(!(e.layoutAlgorithm in ls))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=ls[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,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",`${s!=null&&s.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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){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,av,{algorithm:r.algorithm})},"render"),AM=g((e="",{fallback:t="dagre"}={})=>{if(e in ls)return e;if(t in ls)return I.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"),Ul="comm",ly="rule",hy="decl",nv="@media",lv="@import",hv="@supports",cv="@namespace",yn="@keyframes",cy="@layer",uv="@scope",dv=Math.abs,Qi=String.fromCharCode;function uy(e){return e.trim()}function mn(e,t,r){return e.replace(t,r)}function Gr(e,t){return e.charCodeAt(t)|0}function gi(e,t,r){return e.slice(t,r)}function Ae(e){return e.length}function dy(e){return e.length}function As(e,t){return t.push(e),e}var qa=1,pi=1,fy=0,ye=0,Gt=0,ki="";function Gl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:qa,column:pi,length:o,return:"",siblings:n}}function fv(){return Gt}function gv(){return Gt=ye>0?Gr(ki,--ye):0,pi--,Gt===10&&(pi=1,qa--),Gt}function Te(){return Gt=ye<fy?Gr(ki,ye++):0,pi++,Gt===10&&(pi=1,qa++),Gt}function sr(){return Gr(ki,ye)}function zs(){return ye}function Na(e,t){return gi(ki,e,t)}function hs(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 pv(e){return qa=pi=1,fy=Ae(ki=e),ye=0,[]}function yv(e){return ki="",e}function Mo(e){return uy(Na(ye-1,xn(e===91?e+2:e===40?e+1:e)))}function mv(e){for(;(Gt=sr())&&Gt<33;)Te();return hs(e)>2||hs(Gt)>3?"":" "}function xv(e,t){for(;--t&&Te()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return Na(e,zs()+(t<6&&sr()==32&&Te()==32))}function xn(e){for(;Te();)switch(Gt){case e:return ye;case 34:case 39:e!==34&&e!==39&&xn(Gt);break;case 40:e===41&&xn(e);break;case 92:Te();break}return ye}function Cv(e,t){for(;Te()&&e+Gt!==57;)if(e+Gt===84&&sr()===47)break;return"/*"+Na(t,ye-1)+"*"+Qi(e===47?e:Te())}function bv(e){for(;!hs(sr());)Te();return Na(e,ye)}function kv(e){return yv(Hs("",null,null,null,[""],e=pv(e),0,[0],e))}function Hs(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,d=0,f=0,y=0,m=1,C=1,x=1,k=0,w=0,T="",_=s,L=a,F=i,v=T;C;)switch(y=w,w=Te()){case 40:y!=108&&Gr(v,u-1)==58?(k++,v+="("):v+=Mo(w);break;case 41:k--,v+=")";break;case 34:case 39:case 91:v+=Mo(w);break;case 9:case 10:case 13:case 32:if(k>0){v+=Qi(w);break}v+=mv(y);break;case 92:v+=xv(zs()-1,7);continue;case 47:switch(sr()){case 42:case 47:As(wv(Cv(Te(),zs()),t,r,l),l),(hs(y||1)==5||hs(sr()||1)==5)&&Ae(v)&&gi(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=Ae(v)*x;case 125*m:case 59:case 0:if(k>0&&w){v+=Qi(w);break}switch(w){case 0:case 125:C=0;case 59+h:x==-1&&(v=mn(v,/\f/g,"")),f>0&&(Ae(v)-u||m===0)&&As(f>32?yu(v+";",i,r,u-1,l):yu(mn(v," ","")+";",i,r,u-2,l),l);break;case 59:v+=";";default:if(As(F=pu(v,t,r,c,h,s,n,T,_=[],L=[],u,a),a),w===123)if(h===0)Hs(v,t,F,F,_,a,u,n,L);else{switch(d){case 99:if(Gr(v,3)===110)break;case 108:if(Gr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Hs(e,F,F,i&&As(pu(e,F,F,0,0,s,n,T,s,_=[],u,L),L),s,L,u,n,i?_:L):Hs(v,F,F,F,[""],L,0,n,L)}}c=h=f=0,m=x=1,T=v="",u=o;break;case 58:u=1+Ae(v),f=y;default:if(m<1){if(w==123)--m;else if(w==125&&m++==0&&gv()==125)continue}switch(v+=Qi(w),w*m){case 38:x=h>0?1:(v+="\f",-1);break;case 44:if(k>0)break;n[c++]=(Ae(v)-1)*x,x=1;break;case 64:sr()===45&&(v+=Mo(Te())),d=sr(),h=u=Ae(T=v+=bv(zs())),w++;break;case 45:y===45&&Ae(v)==2&&(m=0)}}return a}function pu(e,t,r,i,s,a,o,n,l,c,h,u){for(var d=s-1,f=s===0?a:[""],y=dy(f),m=0,C=0,x=0;m<i;++m)for(var k=0,w=gi(e,d+1,d=dv(C=o[m])),T=e;k<y;++k)(T=uy(C>0?f[k]+" "+w:mn(w,/&\f/g,f[k])))&&(l[x++]=T);return Gl(e,t,r,s===0?ly:n,l,c,h,u)}function wv(e,t,r,i){return Gl(e,t,r,Ul,Qi(fv()),gi(e,2,-2),0,i)}function yu(e,t,r,i,s){return Gl(e,t,r,hy,gi(e,0,i),gi(e,i+1,-1),i,s)}function Cn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Sv(e,t,r,i){switch(e.type){case cy:if(e.children.length)break;case lv:case cv:case hy:return e.return=e.return||e.value;case Ul:return"";case yn:return e.return=e.value+"{"+Cn(e.children,i)+"}";case ly:if(!Ae(e.value=e.props.join(",")))return""}return Ae(r=Cn(e.children,i))?e.return=e.value+"{"+r+"}":""}function Tv(e){var t=dy(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var gy="c4",_v=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Bv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./c4Diagram-UCG6FXSJ-DKW76ufa.js");return{diagram:t}},__vite__mapDeps([8,9,1,2]));return{id:gy,diagram:e}},"loader"),vv={id:gy,detector:_v,loader:Bv},Lv=vv,py="flowchart",Fv=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),Mv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-C5Rbw9x2.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:py,diagram:e}},"loader"),Av={id:py,detector:Fv,loader:Mv},Ev=Av,yy="flowchart-v2",$v=g((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Ov=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-C5Rbw9x2.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:yy,diagram:e}},"loader"),Pv={id:yy,detector:$v,loader:Ov},Dv=Pv,my="swimlane",Iv=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Rv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VK2B7HYN-BmhKCblm.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,13,9,1,2,14]));return{id:my,diagram:e}},"loader"),qv={id:my,detector:Iv,loader:Rv},Nv=qv,xy="er",Wv=g(e=>/^\s*erDiagram/.test(e),"detector"),zv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./erDiagram-SSCWMZ5O-CYaU_Nw-.js");return{diagram:t}},__vite__mapDeps([16,12,13,14,1,2]));return{id:xy,diagram:e}},"loader"),Hv={id:xy,detector:Wv,loader:zv},Yv=Hv,Cy="gitGraph",jv=g(e=>/^\s*gitGraph/.test(e),"detector"),Uv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-Be1ZzKab.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,1,2]));return{id:Cy,diagram:e}},"loader"),Gv={id:Cy,detector:jv,loader:Uv},Xv=Gv,by="gantt",Vv=g(e=>/^\s*gantt/.test(e),"detector"),Zv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-1uZXMEyg.js");return{diagram:t}},__vite__mapDeps([21,1,2,22,23,24]));return{id:by,diagram:e}},"loader"),Kv={id:by,detector:Vv,loader:Zv},Qv=Kv,ky="info",Jv=g(e=>/^\s*info/.test(e),"detector"),tL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./infoDiagram-RXCK75RN-C910kEri.js");return{diagram:t}},__vite__mapDeps([25,20,1,2]));return{id:ky,diagram:e}},"loader"),eL={id:ky,detector:Jv,loader:tL},wy="pie",rL=g(e=>/^\s*pie/.test(e),"detector"),iL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-D2yDVdcL.js");return{diagram:t}},__vite__mapDeps([26,19,20,1,2,27,28,23]));return{id:wy,diagram:e}},"loader"),sL={id:wy,detector:rL,loader:iL},Sy="quadrantChart",aL=g(e=>/^\s*quadrantChart/.test(e),"detector"),oL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-BnD6S8YV.js");return{diagram:t}},__vite__mapDeps([29,22,23,24,1,2]));return{id:Sy,diagram:e}},"loader"),nL={id:Sy,detector:aL,loader:oL},lL=nL,Ty="xychart",hL=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),cL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-CH7Mipdq.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24,1,2]));return{id:Ty,diagram:e}},"loader"),uL={id:Ty,detector:hL,loader:cL},dL=uL,_y="requirement",fL=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),gL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./requirementDiagram-EFPCY7ZU-B6ZQEd81.js");return{diagram:t}},__vite__mapDeps([31,12,13,1,2]));return{id:_y,diagram:e}},"loader"),pL={id:_y,detector:fL,loader:gL},yL=pL,By="sequence",mL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),xL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-hohjJ8lb.js");return{diagram:t}},__vite__mapDeps([32,18,9,1,2]));return{id:By,diagram:e}},"loader"),CL={id:By,detector:mL,loader:xL},bL=CL,vy="class",kL=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),wL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./classDiagram-DTDB5LWJ-C5UXAo_j.js");return{diagram:t}},__vite__mapDeps([33,34,11,12,13,9,1,2]));return{id:vy,diagram:e}},"loader"),SL={id:vy,detector:kL,loader:wL},TL=SL,Ly="classDiagram",_L=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),BL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-JRS7N3AN-C5UXAo_j.js");return{diagram:t}},__vite__mapDeps([35,34,11,12,13,9,1,2]));return{id:Ly,diagram:e}},"loader"),vL={id:Ly,detector:_L,loader:BL},LL=vL,Fy="state",FL=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),ML=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./stateDiagram-HBIQ2CUA-k17nzvdJ.js");return{diagram:t}},__vite__mapDeps([36,37,12,13,9,1,2,4]));return{id:Fy,diagram:e}},"loader"),AL={id:Fy,detector:FL,loader:ML},EL=AL,My="stateDiagram",$L=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),OL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4QOOHH4V-D5-Y44AB.js");return{diagram:t}},__vite__mapDeps([38,37,12,13,9,1,2]));return{id:My,diagram:e}},"loader"),PL={id:My,detector:$L,loader:OL},DL=PL,Ay="journey",IL=g(e=>/^\s*journey/.test(e),"detector"),RL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-BJH2T6Oe.js");return{diagram:t}},__vite__mapDeps([39,11,9,27,1,2]));return{id:Ay,diagram:e}},"loader"),qL={id:Ay,detector:IL,loader:RL},NL=qL,WL=g((e,t,r)=>{I.debug(`rendering svg for syntax error
300
- `);const i=l1(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Nu(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Ey={draw:WL},zL=Ey,HL={db:{},renderer:Ey,parser:{parse:g(()=>{},"parse")}},YL=HL,$y="flowchart-elk",jL=g((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),UL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-C5Rbw9x2.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:$y,diagram:e}},"loader"),GL={id:$y,detector:jL,loader:UL},XL=GL,Oy="timeline",VL=g(e=>/^\s*timeline/.test(e),"detector"),ZL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-CrjmBowP.js");return{diagram:t}},__vite__mapDeps([40,27,1,2]));return{id:Oy,diagram:e}},"loader"),KL={id:Oy,detector:VL,loader:ZL},QL=KL,Py="mindmap",JL=g(e=>/^\s*mindmap/.test(e),"detector"),tF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./mindmap-definition-FBJOCRG2-BAJfUJuW.js");return{diagram:t}},__vite__mapDeps([41,12,13,1,2]));return{id:Py,diagram:e}},"loader"),eF={id:Py,detector:JL,loader:tF},rF=eF,Dy="kanban",iF=g(e=>/^\s*kanban/.test(e),"detector"),sF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./kanban-definition-3QL26DDD-D4MwIQqo.js");return{diagram:t}},__vite__mapDeps([42,11,1,2]));return{id:Dy,diagram:e}},"loader"),aF={id:Dy,detector:iF,loader:sF},oF=aF,Iy="sankey",nF=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),lF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-gujp6WSF.js");return{diagram:t}},__vite__mapDeps([43,28,23,1,2]));return{id:Iy,diagram:e}},"loader"),hF={id:Iy,detector:nF,loader:lF},cF=hF,Ry="packet",uF=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),dF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-ClEsZ-KM.js");return{diagram:t}},__vite__mapDeps([44,19,20,1,2]));return{id:Ry,diagram:e}},"loader"),fF={id:Ry,detector:uF,loader:dF},qy="radar",gF=g(e=>/^\s*radar-beta/.test(e),"detector"),pF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-BjhawDgz.js");return{diagram:t}},__vite__mapDeps([45,19,20,1,2]));return{id:qy,diagram:e}},"loader"),yF={id:qy,detector:gF,loader:pF},Ny="block",mF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),xF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./blockDiagram-NRAW4CY4-BjSrG4Gi.js");return{diagram:t}},__vite__mapDeps([46,11,14,1,2]));return{id:Ny,diagram:e}},"loader"),CF={id:Ny,detector:mF,loader:xF},bF=CF,Wy="treeView",kF=g(e=>/^\s*treeView-beta/.test(e),"detector"),wF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-Bq6kE3Qo.js");return{diagram:t}},__vite__mapDeps([47,18,19,20,1,2]));return{id:Wy,diagram:e}},"loader"),SF={id:Wy,detector:kF,loader:wF},TF=SF,zy="architecture",_F=g(e=>/^\s*architecture/.test(e),"detector"),BF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-Bu33Fevc.js");return{diagram:t}},__vite__mapDeps([48,19,20,1,2,7]));return{id:zy,diagram:e}},"loader"),vF={id:zy,detector:_F,loader:BF},LF=vF,Hy="eventmodeling",FF=g(e=>/^\s*eventmodeling/.test(e),"detector"),MF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-k-uyl7kx.js");return{diagram:t}},__vite__mapDeps([49,19,20,1,2]));return{id:Hy,diagram:e}},"loader"),AF={id:Hy,detector:FF,loader:MF},EF=AF,Yy="ishikawa",$F=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-CqIAX_4U.js");return{diagram:t}},__vite__mapDeps([50,1,2]));return{id:Yy,diagram:e}},"loader"),PF={id:Yy,detector:$F,loader:OF},jy="venn",DF=g(e=>/^\s*venn-beta/.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-t0JqhJnA.js");return{diagram:t}},__vite__mapDeps([51,1,2]));return{id:jy,diagram:e}},"loader"),RF={id:jy,detector:DF,loader:IF},qF=RF,Uy="treemap",NF=g(e=>/^\s*treemap/.test(e),"detector"),WF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-CvQYwC6D.js");return{diagram:t}},__vite__mapDeps([52,19,13,20,1,2,24,28,23]));return{id:Uy,diagram:e}},"loader"),zF={id:Uy,detector:NF,loader:WF},Gy="wardley",HF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),YF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-DKYd1Jnq.js");return{diagram:t}},__vite__mapDeps([53,19,20,1,2]));return{id:Gy,diagram:e}},"loader"),jF={id:Gy,detector:HF,loader:YF},UF=jF,Xy="cynefin",GF=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),XF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-DNbene_1.js");return{diagram:t}},__vite__mapDeps([54,19,20,1,2]));return{id:Xy,diagram:e}},"loader"),VF={id:Xy,detector:GF,loader:XF},Vy="railroad",ZF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),KF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DQR3NMJt.js");return{diagram:t}},__vite__mapDeps([55,56,19,20,1,2]));return{id:Vy,diagram:e}},"loader"),QF={id:Vy,detector:ZF,loader:KF},Zy="railroadEbnf",JF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),t5=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-DM6ZbS6R.js");return{diagram:t}},__vite__mapDeps([57,56,19,20,1,2]));return{id:Zy,diagram:e}},"loader"),e5={id:Zy,detector:JF,loader:t5},Ky="railroadAbnf",r5=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),i5=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-9I7swegc.js");return{diagram:t}},__vite__mapDeps([58,56,19,20,1,2]));return{id:Ky,diagram:e}},"loader"),s5={id:Ky,detector:r5,loader:i5},Qy="railroadPeg",a5=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),o5=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-5bYvRIwo.js");return{diagram:t}},__vite__mapDeps([59,56,19,20,1,2]));return{id:Qy,diagram:e}},"loader"),n5={id:Qy,detector:a5,loader:o5},mu=!1,Wa=g(()=>{mu||(mu=!0,Xs("error",YL,e=>e.toLowerCase().trim()==="error"),Xs("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Oo(XL,rF,LF),Oo(Lv,oF,LL,TL,Yv,Qv,eL,sL,yL,bL,Nv,Dv,Ev,QL,Xv,DL,EL,NL,lL,cF,fF,dL,bF,EF,TF,yF,PF,zF,QF,e5,s5,n5,qF,UF,VF))},"addDiagrams"),l5=g(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(kr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Ro(r)}catch{try{const{diagram:a,id:o}=await s();Xs(o,a,i)}catch(a){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete kr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),h5="graphics-document document";function Jy(e,t){e.attr("role",h5),t!==""&&e.attr("aria-roledescription",t)}g(Jy,"setA11yDiagramInfo");function tm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(tm,"addSVGa11yTitleDescription");var Cr,bn=(Cr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Yt(),s=Tn(t,i);t=Ek(t)+`
299
+ `:""}return g(et,"dump2"),Fo.dump=et,Fo}g(ay,"requireDumper");var gu;function oy(){if(gu)return Jt;gu=1;const e=sy(),t=ay();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return g(r,"renamed"),Jt.Type=ae(),Jt.Schema=Fl(),Jt.FAILSAFE_SCHEMA=$l(),Jt.JSON_SCHEMA=Rl(),Jt.CORE_SCHEMA=ql(),Jt.DEFAULT_SCHEMA=Ra(),Jt.load=e.load,Jt.loadAll=e.loadAll,Jt.dump=t.dump,Jt.YAMLException=bi(),Jt.types={binary:zl(),float:Il(),map:El(),null:Ol(),pairs:Yl(),set:jl(),timestamp:Nl(),bool:Pl(),int:Dl(),merge:Wl(),omap:Hl(),seq:Al(),str:Ml()},Jt.safeLoad=r("safeLoad","load"),Jt.safeLoadAll=r("safeLoadAll","loadAll"),Jt.safeDump=r("safeDump","dump"),Jt}g(oy,"requireJsYaml");var ev=oy(),rv=ry(ev),{Type:xM,Schema:CM,FAILSAFE_SCHEMA:bM,JSON_SCHEMA:iv,CORE_SCHEMA:kM,DEFAULT_SCHEMA:wM,load:sv,loadAll:SM,dump:TM,YAMLException:_M,types:BM,safeLoad:vM,safeLoadAll:LM,safeDump:FM}=rv,av={common:ds,getConfig:Yt,insertCluster:up,insertEdge:gp,insertEdgeLabel:yl,insertMarkers:mp,insertNode:pl,interpolateToCurve:Un,labelHelper:mt,log:I,positionEdgeLabel:$w},ls={},ny=g(e=>{for(const t of e)ls[t.name]=t},"registerLayoutLoaders"),ov=g(()=>{ny([{name:"dagre",loader:g(async()=>await Mt(()=>import("./dagre-GXQ25YYZ-BKanjdm8.js"),__vite__mapDeps([3,4,1,2])),"loader")},{name:"swimlane",loader:g(async()=>await Mt(()=>import("./swimlanes-42K2YHIH-Cs5FclrO.js"),__vite__mapDeps([5,1,2])),"loader")},{name:"cose-bilkent",loader:g(async()=>await Mt(()=>import("./cose-bilkent-JH36ORCC-DVHat7AO.js"),__vite__mapDeps([6,7,1,2])),"loader")}])},"registerDefaultLayoutLoaders");ov();var MM=g(async(e,t)=>{if(!(e.layoutAlgorithm in ls))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=ls[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,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",`${s!=null&&s.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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){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,av,{algorithm:r.algorithm})},"render"),AM=g((e="",{fallback:t="dagre"}={})=>{if(e in ls)return e;if(t in ls)return I.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"),Ul="comm",ly="rule",hy="decl",nv="@media",lv="@import",hv="@supports",cv="@namespace",yn="@keyframes",cy="@layer",uv="@scope",dv=Math.abs,Qi=String.fromCharCode;function uy(e){return e.trim()}function mn(e,t,r){return e.replace(t,r)}function Gr(e,t){return e.charCodeAt(t)|0}function gi(e,t,r){return e.slice(t,r)}function Ae(e){return e.length}function dy(e){return e.length}function As(e,t){return t.push(e),e}var qa=1,pi=1,fy=0,ye=0,Gt=0,ki="";function Gl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:qa,column:pi,length:o,return:"",siblings:n}}function fv(){return Gt}function gv(){return Gt=ye>0?Gr(ki,--ye):0,pi--,Gt===10&&(pi=1,qa--),Gt}function Te(){return Gt=ye<fy?Gr(ki,ye++):0,pi++,Gt===10&&(pi=1,qa++),Gt}function sr(){return Gr(ki,ye)}function zs(){return ye}function Na(e,t){return gi(ki,e,t)}function hs(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 pv(e){return qa=pi=1,fy=Ae(ki=e),ye=0,[]}function yv(e){return ki="",e}function Mo(e){return uy(Na(ye-1,xn(e===91?e+2:e===40?e+1:e)))}function mv(e){for(;(Gt=sr())&&Gt<33;)Te();return hs(e)>2||hs(Gt)>3?"":" "}function xv(e,t){for(;--t&&Te()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return Na(e,zs()+(t<6&&sr()==32&&Te()==32))}function xn(e){for(;Te();)switch(Gt){case e:return ye;case 34:case 39:e!==34&&e!==39&&xn(Gt);break;case 40:e===41&&xn(e);break;case 92:Te();break}return ye}function Cv(e,t){for(;Te()&&e+Gt!==57;)if(e+Gt===84&&sr()===47)break;return"/*"+Na(t,ye-1)+"*"+Qi(e===47?e:Te())}function bv(e){for(;!hs(sr());)Te();return Na(e,ye)}function kv(e){return yv(Hs("",null,null,null,[""],e=pv(e),0,[0],e))}function Hs(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,d=0,f=0,y=0,m=1,C=1,x=1,k=0,w=0,T="",_=s,v=a,F=i,L=T;C;)switch(y=w,w=Te()){case 40:y!=108&&Gr(L,u-1)==58?(k++,L+="("):L+=Mo(w);break;case 41:k--,L+=")";break;case 34:case 39:case 91:L+=Mo(w);break;case 9:case 10:case 13:case 32:if(k>0){L+=Qi(w);break}L+=mv(y);break;case 92:L+=xv(zs()-1,7);continue;case 47:switch(sr()){case 42:case 47:As(wv(Cv(Te(),zs()),t,r,l),l),(hs(y||1)==5||hs(sr()||1)==5)&&Ae(L)&&gi(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:n[c++]=Ae(L)*x;case 125*m:case 59:case 0:if(k>0&&w){L+=Qi(w);break}switch(w){case 0:case 125:C=0;case 59+h:x==-1&&(L=mn(L,/\f/g,"")),f>0&&(Ae(L)-u||m===0)&&As(f>32?yu(L+";",i,r,u-1,l):yu(mn(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(As(F=pu(L,t,r,c,h,s,n,T,_=[],v=[],u,a),a),w===123)if(h===0)Hs(L,t,F,F,_,a,u,n,v);else{switch(d){case 99:if(Gr(L,3)===110)break;case 108:if(Gr(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Hs(e,F,F,i&&As(pu(e,F,F,0,0,s,n,T,s,_=[],u,v),v),s,v,u,n,i?_:v):Hs(L,F,F,F,[""],v,0,n,v)}}c=h=f=0,m=x=1,T=L="",u=o;break;case 58:u=1+Ae(L),f=y;default:if(m<1){if(w==123)--m;else if(w==125&&m++==0&&gv()==125)continue}switch(L+=Qi(w),w*m){case 38:x=h>0?1:(L+="\f",-1);break;case 44:if(k>0)break;n[c++]=(Ae(L)-1)*x,x=1;break;case 64:sr()===45&&(L+=Mo(Te())),d=sr(),h=u=Ae(T=L+=bv(zs())),w++;break;case 45:y===45&&Ae(L)==2&&(m=0)}}return a}function pu(e,t,r,i,s,a,o,n,l,c,h,u){for(var d=s-1,f=s===0?a:[""],y=dy(f),m=0,C=0,x=0;m<i;++m)for(var k=0,w=gi(e,d+1,d=dv(C=o[m])),T=e;k<y;++k)(T=uy(C>0?f[k]+" "+w:mn(w,/&\f/g,f[k])))&&(l[x++]=T);return Gl(e,t,r,s===0?ly:n,l,c,h,u)}function wv(e,t,r,i){return Gl(e,t,r,Ul,Qi(fv()),gi(e,2,-2),0,i)}function yu(e,t,r,i,s){return Gl(e,t,r,hy,gi(e,0,i),gi(e,i+1,-1),i,s)}function Cn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Sv(e,t,r,i){switch(e.type){case cy:if(e.children.length)break;case lv:case cv:case hy:return e.return=e.return||e.value;case Ul:return"";case yn:return e.return=e.value+"{"+Cn(e.children,i)+"}";case ly:if(!Ae(e.value=e.props.join(",")))return""}return Ae(r=Cn(e.children,i))?e.return=e.value+"{"+r+"}":""}function Tv(e){var t=dy(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var gy="c4",_v=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Bv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-DPNdwG7s.js");return{diagram:t}},__vite__mapDeps([8,9,1,2]));return{id:gy,diagram:e}},"loader"),vv={id:gy,detector:_v,loader:Bv},Lv=vv,py="flowchart",Fv=g((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),Mv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D4vFPsPz.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:py,diagram:e}},"loader"),Av={id:py,detector:Fv,loader:Mv},Ev=Av,yy="flowchart-v2",$v=g((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Ov=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D4vFPsPz.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:yy,diagram:e}},"loader"),Pv={id:yy,detector:$v,loader:Ov},Dv=Pv,my="swimlane",Iv=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Rv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-UE24U6QV.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,13,9,1,2,14]));return{id:my,diagram:e}},"loader"),qv={id:my,detector:Iv,loader:Rv},Nv=qv,xy="er",Wv=g(e=>/^\s*erDiagram/.test(e),"detector"),zv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-BZgLGej_.js");return{diagram:t}},__vite__mapDeps([16,12,13,14,1,2]));return{id:xy,diagram:e}},"loader"),Hv={id:xy,detector:Wv,loader:zv},Yv=Hv,Cy="gitGraph",jv=g(e=>/^\s*gitGraph/.test(e),"detector"),Uv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-BzrTgIPA.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,1,2]));return{id:Cy,diagram:e}},"loader"),Gv={id:Cy,detector:jv,loader:Uv},Xv=Gv,by="gantt",Vv=g(e=>/^\s*gantt/.test(e),"detector"),Zv=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-BV-vOymv.js");return{diagram:t}},__vite__mapDeps([21,1,2,22,23,24]));return{id:by,diagram:e}},"loader"),Kv={id:by,detector:Vv,loader:Zv},Qv=Kv,ky="info",Jv=g(e=>/^\s*info/.test(e),"detector"),tL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-BNjnp8Bw.js");return{diagram:t}},__vite__mapDeps([25,20,1,2]));return{id:ky,diagram:e}},"loader"),eL={id:ky,detector:Jv,loader:tL},wy="pie",rL=g(e=>/^\s*pie/.test(e),"detector"),iL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-j4H9g-5p.js");return{diagram:t}},__vite__mapDeps([26,19,20,1,2,27,28,23]));return{id:wy,diagram:e}},"loader"),sL={id:wy,detector:rL,loader:iL},Sy="quadrantChart",aL=g(e=>/^\s*quadrantChart/.test(e),"detector"),oL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-tQl3LM00.js");return{diagram:t}},__vite__mapDeps([29,22,23,24,1,2]));return{id:Sy,diagram:e}},"loader"),nL={id:Sy,detector:aL,loader:oL},lL=nL,Ty="xychart",hL=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),cL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-D8Jt8h9M.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24,1,2]));return{id:Ty,diagram:e}},"loader"),uL={id:Ty,detector:hL,loader:cL},dL=uL,_y="requirement",fL=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),gL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-CbdDUSXh.js");return{diagram:t}},__vite__mapDeps([31,12,13,1,2]));return{id:_y,diagram:e}},"loader"),pL={id:_y,detector:fL,loader:gL},yL=pL,By="sequence",mL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),xL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-DRhfwJem.js");return{diagram:t}},__vite__mapDeps([32,18,9,1,2]));return{id:By,diagram:e}},"loader"),CL={id:By,detector:mL,loader:xL},bL=CL,vy="class",kL=g((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),wL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-Bewdb9Y_.js");return{diagram:t}},__vite__mapDeps([33,34,11,12,13,9,1,2]));return{id:vy,diagram:e}},"loader"),SL={id:vy,detector:kL,loader:wL},TL=SL,Ly="classDiagram",_L=g((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),BL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-Bewdb9Y_.js");return{diagram:t}},__vite__mapDeps([35,34,11,12,13,9,1,2]));return{id:Ly,diagram:e}},"loader"),vL={id:Ly,detector:_L,loader:BL},LL=vL,Fy="state",FL=g((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),ML=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-CRKt2Roy.js");return{diagram:t}},__vite__mapDeps([36,37,12,13,9,1,2,4]));return{id:Fy,diagram:e}},"loader"),AL={id:Fy,detector:FL,loader:ML},EL=AL,My="stateDiagram",$L=g((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),OL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-6BlUiFQM.js");return{diagram:t}},__vite__mapDeps([38,37,12,13,9,1,2]));return{id:My,diagram:e}},"loader"),PL={id:My,detector:$L,loader:OL},DL=PL,Ay="journey",IL=g(e=>/^\s*journey/.test(e),"detector"),RL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-DCH1Q0q5.js");return{diagram:t}},__vite__mapDeps([39,11,9,27,1,2]));return{id:Ay,diagram:e}},"loader"),qL={id:Ay,detector:IL,loader:RL},NL=qL,WL=g((e,t,r)=>{I.debug(`rendering svg for syntax error
300
+ `);const i=l1(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Nu(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Ey={draw:WL},zL=Ey,HL={db:{},renderer:Ey,parser:{parse:g(()=>{},"parse")}},YL=HL,$y="flowchart-elk",jL=g((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),UL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D4vFPsPz.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:$y,diagram:e}},"loader"),GL={id:$y,detector:jL,loader:UL},XL=GL,Oy="timeline",VL=g(e=>/^\s*timeline/.test(e),"detector"),ZL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-B1ztwagu.js");return{diagram:t}},__vite__mapDeps([40,27,1,2]));return{id:Oy,diagram:e}},"loader"),KL={id:Oy,detector:VL,loader:ZL},QL=KL,Py="mindmap",JL=g(e=>/^\s*mindmap/.test(e),"detector"),tF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-IAdhY6Xi.js");return{diagram:t}},__vite__mapDeps([41,12,13,1,2]));return{id:Py,diagram:e}},"loader"),eF={id:Py,detector:JL,loader:tF},rF=eF,Dy="kanban",iF=g(e=>/^\s*kanban/.test(e),"detector"),sF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-DNG-2lIe.js");return{diagram:t}},__vite__mapDeps([42,11,1,2]));return{id:Dy,diagram:e}},"loader"),aF={id:Dy,detector:iF,loader:sF},oF=aF,Iy="sankey",nF=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),lF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-CgweF3tC.js");return{diagram:t}},__vite__mapDeps([43,28,23,1,2]));return{id:Iy,diagram:e}},"loader"),hF={id:Iy,detector:nF,loader:lF},cF=hF,Ry="packet",uF=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),dF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-CoPPej-B.js");return{diagram:t}},__vite__mapDeps([44,19,20,1,2]));return{id:Ry,diagram:e}},"loader"),fF={id:Ry,detector:uF,loader:dF},qy="radar",gF=g(e=>/^\s*radar-beta/.test(e),"detector"),pF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-DriLbD41.js");return{diagram:t}},__vite__mapDeps([45,19,20,1,2]));return{id:qy,diagram:e}},"loader"),yF={id:qy,detector:gF,loader:pF},Ny="block",mF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),xF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-BWvDCIy7.js");return{diagram:t}},__vite__mapDeps([46,11,14,1,2]));return{id:Ny,diagram:e}},"loader"),CF={id:Ny,detector:mF,loader:xF},bF=CF,Wy="treeView",kF=g(e=>/^\s*treeView-beta/.test(e),"detector"),wF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-D1AUiOrg.js");return{diagram:t}},__vite__mapDeps([47,18,19,20,1,2]));return{id:Wy,diagram:e}},"loader"),SF={id:Wy,detector:kF,loader:wF},TF=SF,zy="architecture",_F=g(e=>/^\s*architecture/.test(e),"detector"),BF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-xwtc8tHh.js");return{diagram:t}},__vite__mapDeps([48,19,20,1,2,7]));return{id:zy,diagram:e}},"loader"),vF={id:zy,detector:_F,loader:BF},LF=vF,Hy="eventmodeling",FF=g(e=>/^\s*eventmodeling/.test(e),"detector"),MF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-DnUn3PWq.js");return{diagram:t}},__vite__mapDeps([49,19,20,1,2]));return{id:Hy,diagram:e}},"loader"),AF={id:Hy,detector:FF,loader:MF},EF=AF,Yy="ishikawa",$F=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-CRRDJ96x.js");return{diagram:t}},__vite__mapDeps([50,1,2]));return{id:Yy,diagram:e}},"loader"),PF={id:Yy,detector:$F,loader:OF},jy="venn",DF=g(e=>/^\s*venn-beta/.test(e),"detector"),IF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-DaVmdE2o.js");return{diagram:t}},__vite__mapDeps([51,1,2]));return{id:jy,diagram:e}},"loader"),RF={id:jy,detector:DF,loader:IF},qF=RF,Uy="treemap",NF=g(e=>/^\s*treemap/.test(e),"detector"),WF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-B9PfnVER.js");return{diagram:t}},__vite__mapDeps([52,19,13,20,1,2,24,28,23]));return{id:Uy,diagram:e}},"loader"),zF={id:Uy,detector:NF,loader:WF},Gy="wardley",HF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),YF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-CXnyk8a1.js");return{diagram:t}},__vite__mapDeps([53,19,20,1,2]));return{id:Gy,diagram:e}},"loader"),jF={id:Gy,detector:HF,loader:YF},UF=jF,Xy="cynefin",GF=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),XF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-DE2_LSH7.js");return{diagram:t}},__vite__mapDeps([54,19,20,1,2]));return{id:Xy,diagram:e}},"loader"),VF={id:Xy,detector:GF,loader:XF},Vy="railroad",ZF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),KF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DkzjcGjo.js");return{diagram:t}},__vite__mapDeps([55,56,19,20,1,2]));return{id:Vy,diagram:e}},"loader"),QF={id:Vy,detector:ZF,loader:KF},Zy="railroadEbnf",JF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),t5=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-G2lYKGN9.js");return{diagram:t}},__vite__mapDeps([57,56,19,20,1,2]));return{id:Zy,diagram:e}},"loader"),e5={id:Zy,detector:JF,loader:t5},Ky="railroadAbnf",r5=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),i5=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-CixVqOyW.js");return{diagram:t}},__vite__mapDeps([58,56,19,20,1,2]));return{id:Ky,diagram:e}},"loader"),s5={id:Ky,detector:r5,loader:i5},Qy="railroadPeg",a5=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),o5=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BpnIe36z.js");return{diagram:t}},__vite__mapDeps([59,56,19,20,1,2]));return{id:Qy,diagram:e}},"loader"),n5={id:Qy,detector:a5,loader:o5},mu=!1,Wa=g(()=>{mu||(mu=!0,Xs("error",YL,e=>e.toLowerCase().trim()==="error"),Xs("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Oo(XL,rF,LF),Oo(Lv,oF,LL,TL,Yv,Qv,eL,sL,yL,bL,Nv,Dv,Ev,QL,Xv,DL,EL,NL,lL,cF,fF,dL,bF,EF,TF,yF,PF,zF,QF,e5,s5,n5,qF,UF,VF))},"addDiagrams"),l5=g(async()=>{I.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(kr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Ro(r)}catch{try{const{diagram:a,id:o}=await s();Xs(o,a,i)}catch(a){throw I.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete kr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){I.error(`Failed to load ${t.length} external diagrams`);for(const r of t)I.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),h5="graphics-document document";function Jy(e,t){e.attr("role",h5),t!==""&&e.attr("aria-roledescription",t)}g(Jy,"setA11yDiagramInfo");function tm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(tm,"addSVGa11yTitleDescription");var Cr,bn=(Cr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Yt(),s=Tn(t,i);t=Ek(t)+`
301
301
  `;try{Ro(s)}catch{const u=r0(s);if(!u)throw new Ou(`Diagram ${s} not found.`);const{id:d,diagram:f}=await u();Xs(d,f)}const{db:a,parser:o,renderer:n,init:l}=Ro(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new Cr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Cr,"Diagram"),Cr),xu=[],c5=g(()=>{xu.forEach(e=>{e()}),xu=[]},"attachFunctions"),u5=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function em(e){const t=e.match($u);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
302
302
  `).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
303
303
  `):t[2];let s=sv(i,{schema:iv})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}g(em,"extractFrontMatter");var d5=g(e=>e.replace(/\r\n?/g,`
@@ -305,6 +305,6 @@ ${a.join(`
305
305
  `}else i+=`${e.themeCSS}
306
306
  `;return i+Io(r)},"createCssStyles"),A5=g((e,t)=>Cn(kv(`${e}{${t}}`),Tv([g(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===yn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[nv,hv,cy,uv,"@container","@starting-style"],yn].includes(i.type)||(I.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Ul))},"addNamespace"),Sv])),"compileCSS"),E5=g((e,t,r,i)=>{const s=M5(e,r),a=b0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return A5(i,a)},"createUserStyles"),$5=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=nr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),O5=g((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":S5,i=rm(`<body style="${_5}">${e}</body>`);return`<iframe style="width:${w5};height:${r};${T5}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${B5}">
307
307
  ${v5}
308
- </iframe>`},"putIntoIFrame"),bu=g((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",C5);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function kn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(kn,"sandboxedIframe");var P5=g((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),D5=g(async function(e,t,r){var Y,A,E,B,P,$;Wa();const i=Vl(t);t=i.code;const s=Yt();I.debug(s),t.length>((s==null?void 0:s.maxTextSize)??p5)&&(t=y5);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=g(()=>{const V=Ft(d?n:c).node();V&&"remove"in V&&V.remove()},"removeTempElements");let u=Ft(document.body);const d=s.securityLevel===m5,f=s.securityLevel===x5,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const N=kn(Ft(r),o);u=Ft(N.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Ft(r);bu(u,e,l,`font-family: ${y}`,b5)}else{if(P5(document,e,l,o),d){const N=kn(Ft(document.body),o);u=Ft(N.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Ft("body");bu(u,e,l)}let m,C;try{m=await bn.fromText(t,{title:i.title})}catch(N){if(s.suppressErrorRendering)throw h(),N;m=await bn.fromText("error"),C=N}const x=u.select(c).node(),k=m.type,w=x.firstChild,T=w.firstChild,_=(A=(Y=m.renderer).getClasses)==null?void 0:A.call(Y,t,m),L=E5(s,k,_,a),F=document.createElement("style");F.innerHTML=L,w.insertBefore(F,T);try{await m.renderer.draw(t,e,"11.17.0",m)}catch(N){throw s.suppressErrorRendering?h():zL.draw(t,e,"11.17.0"),N}const v=u.select(`${c} svg`),U=(B=(E=m.db).getAccTitle)==null?void 0:B.call(E),W=($=(P=m.db).getAccDescription)==null?void 0:$.call(P);om(k,v,U,W);const rt=g(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",k5);let N=u.select(c).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),N=$5(N,d,qe(s.arrowMarkerAbsolute)),d){const V=u.select(c+" svg").node();N=O5(N,V)}else f||(N=hi.sanitize(N,{ADD_TAGS:L5,ADD_ATTR:F5,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return c5(),N},"serializeSvg")();if(C)throw C;return h(),{diagramType:k,svg:rt,bindFunctions:m.db.bindFunctions}},"render");function sm(e={}){var i;const t=Zt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Zm(t),t!=null&&t.theme&&t.theme in Ge?t.themeVariables=Ge[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ge.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Vm(t):Fu();Sn(r.logLevel),Wa()}g(sm,"initialize");var am=g((e,t={})=>{const{code:r}=Xl(e);return bn.fromText(r,t)},"getDiagramFromText");function om(e,t,r,i){Jy(t,e),tm(t,r,i,t.attr("id"))}g(om,"addA11yInfo");var vr=Object.freeze({render:D5,parse:im,getDiagramFromText:am,initialize:sm,getConfig:Yt,setConfig:Mu,getSiteConfig:Fu,updateSiteConfig:Km,reset:g(()=>{Us()},"reset"),globalReset:g(()=>{Us(ci)},"globalReset"),defaultConfig:ci});Sn(Yt().logLevel);Us(Yt());var I5=g((e,t,r)=>{I.warn(e),Zn(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"),nm=g(async function(e={querySelector:".mermaid"}){try{await R5(e)}catch(t){if(Zn(t)&&I.error(t.str),de.parseError&&de.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),R5=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=vr.getConfig();I.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");I.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),vr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ie.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(I.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=mf(ie.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ie.detectInit(o);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await um(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){I5(u,n,de.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),lm=g(function(e){vr.initialize(e)},"initialize"),q5=g(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&lm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await nm(i)},"init"),N5=g(async(e,{lazyLoad:t=!0}={})=>{Wa(),Oo(...e),t===!1&&await l5()},"registerExternalDiagrams"),hm=g(function(){if(de.startOnLoad){const{startOnLoad:e}=vr.getConfig();e&&de.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",hm,!1);var W5=g(function(e){de.parseError=e},"setParseErrorHandler"),ya=[],Ao=!1,cm=g(async()=>{if(!Ao){for(Ao=!0;ya.length>0;){const e=ya.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}Ao=!1}},"executeQueue"),z5=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((a,o)=>{vr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;I.error("Error parsing",n),(l=de.parseError)==null||l.call(de,n),o(n),i(n)})}),"performCall");ya.push(s),cm().catch(i)}),"parse"),um=g((e,t,r)=>new Promise((i,s)=>{const a=g(()=>new Promise((o,n)=>{vr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;I.error("Error parsing",l),(c=de.parseError)==null||c.call(de,l),n(l),s(l)})}),"performCall");ya.push(a),cm().catch(s)}),"render"),H5=g(()=>Object.keys(kr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),de={startOnLoad:!0,mermaidAPI:vr,parse:z5,render:um,init:q5,run:nm,registerExternalDiagrams:N5,registerLayoutLoaders:ny,initialize:lm,parseError:void 0,contentLoaded:hm,setParseErrorHandler:W5,detectType:Tn,registerIconPacks:$1,getRegisteredDiagramsMetadata:H5},Y5=de;/*! Check if previously processed *//*!
308
+ </iframe>`},"putIntoIFrame"),bu=g((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",C5);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function kn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(kn,"sandboxedIframe");var P5=g((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),D5=g(async function(e,t,r){var Y,A,E,B,P,$;Wa();const i=Vl(t);t=i.code;const s=Yt();I.debug(s),t.length>((s==null?void 0:s.maxTextSize)??p5)&&(t=y5);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=g(()=>{const V=Ft(d?n:c).node();V&&"remove"in V&&V.remove()},"removeTempElements");let u=Ft(document.body);const d=s.securityLevel===m5,f=s.securityLevel===x5,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const N=kn(Ft(r),o);u=Ft(N.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Ft(r);bu(u,e,l,`font-family: ${y}`,b5)}else{if(P5(document,e,l,o),d){const N=kn(Ft(document.body),o);u=Ft(N.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Ft("body");bu(u,e,l)}let m,C;try{m=await bn.fromText(t,{title:i.title})}catch(N){if(s.suppressErrorRendering)throw h(),N;m=await bn.fromText("error"),C=N}const x=u.select(c).node(),k=m.type,w=x.firstChild,T=w.firstChild,_=(A=(Y=m.renderer).getClasses)==null?void 0:A.call(Y,t,m),v=E5(s,k,_,a),F=document.createElement("style");F.innerHTML=v,w.insertBefore(F,T);try{await m.renderer.draw(t,e,"11.17.2",m)}catch(N){throw s.suppressErrorRendering?h():zL.draw(t,e,"11.17.2"),N}const L=u.select(`${c} svg`),U=(B=(E=m.db).getAccTitle)==null?void 0:B.call(E),W=($=(P=m.db).getAccDescription)==null?void 0:$.call(P);om(k,L,U,W);const rt=g(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",k5);let N=u.select(c).node().innerHTML;if(I.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),N=$5(N,d,qe(s.arrowMarkerAbsolute)),d){const V=u.select(c+" svg").node();N=O5(N,V)}else f||(N=hi.sanitize(N,{ADD_TAGS:L5,ADD_ATTR:F5,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return c5(),N},"serializeSvg")();if(C)throw C;return h(),{diagramType:k,svg:rt,bindFunctions:m.db.bindFunctions}},"render");function sm(e={}){var i;const t=Zt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Zm(t),t!=null&&t.theme&&t.theme in Ge?t.themeVariables=Ge[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ge.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Vm(t):Fu();Sn(r.logLevel),Wa()}g(sm,"initialize");var am=g((e,t={})=>{const{code:r}=Xl(e);return bn.fromText(r,t)},"getDiagramFromText");function om(e,t,r,i){Jy(t,e),tm(t,r,i,t.attr("id"))}g(om,"addA11yInfo");var vr=Object.freeze({render:D5,parse:im,getDiagramFromText:am,initialize:sm,getConfig:Yt,setConfig:Mu,getSiteConfig:Fu,updateSiteConfig:Km,reset:g(()=>{Us()},"reset"),globalReset:g(()=>{Us(ci)},"globalReset"),defaultConfig:ci});Sn(Yt().logLevel);Us(Yt());var I5=g((e,t,r)=>{I.warn(e),Zn(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"),nm=g(async function(e={querySelector:".mermaid"}){try{await R5(e)}catch(t){if(Zn(t)&&I.error(t.str),de.parseError&&de.parseError(t),!e.suppressErrors)throw I.error("Use the suppressErrors option to suppress these errors"),t}},"run"),R5=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=vr.getConfig();I.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");I.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(I.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),vr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ie.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(I.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=mf(ie.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ie.detectInit(o);h&&I.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await um(c,o,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){I5(u,n,de.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),lm=g(function(e){vr.initialize(e)},"initialize"),q5=g(async function(e,t,r){I.warn("mermaid.init is deprecated. Please use run instead."),e&&lm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await nm(i)},"init"),N5=g(async(e,{lazyLoad:t=!0}={})=>{Wa(),Oo(...e),t===!1&&await l5()},"registerExternalDiagrams"),hm=g(function(){if(de.startOnLoad){const{startOnLoad:e}=vr.getConfig();e&&de.run().catch(t=>I.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",hm,!1);var W5=g(function(e){de.parseError=e},"setParseErrorHandler"),ya=[],Ao=!1,cm=g(async()=>{if(!Ao){for(Ao=!0;ya.length>0;){const e=ya.shift();if(e)try{await e()}catch(t){I.error("Error executing queue",t)}}Ao=!1}},"executeQueue"),z5=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((a,o)=>{vr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;I.error("Error parsing",n),(l=de.parseError)==null||l.call(de,n),o(n),i(n)})}),"performCall");ya.push(s),cm().catch(i)}),"parse"),um=g((e,t,r)=>new Promise((i,s)=>{const a=g(()=>new Promise((o,n)=>{vr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;I.error("Error parsing",l),(c=de.parseError)==null||c.call(de,l),n(l),s(l)})}),"performCall");ya.push(a),cm().catch(s)}),"render"),H5=g(()=>Object.keys(kr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),de={startOnLoad:!0,mermaidAPI:vr,parse:z5,render:um,init:q5,run:nm,registerExternalDiagrams:N5,registerLayoutLoaders:ny,initialize:lm,parseError:void 0,contentLoaded:hm,setParseErrorHandler:W5,detectType:Tn,registerIconPacks:$1,getRegisteredDiagramsMetadata:H5},Y5=de;/*! Check if previously processed *//*!
309
309
  * Wait for document loaded before starting the execution
310
310
  */const EM=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:Bl,createCommonLayoutRenderer:Xp,default:Y5,defaultMeasureLayout:vl,paintLayoutData:Ll},Symbol.toStringTag,{value:"Module"}));export{Vb as $,Kn as A,vu as B,Tk as C,l1 as D,Fm as E,Z5 as F,P1 as G,sv as H,Ji as I,iv as J,V5 as K,Sa as L,h0 as M,qu as N,Jl as O,Ia as P,Jb as Q,Xo as R,Sk as S,us as T,_e as U,z as V,H as W,m0 as X,Wu as Y,pk as Z,g as _,S0 as a,mp as a$,Ch as a0,xh as a1,oM as a2,eM as a3,sM as a4,iM as a5,J5 as a6,In as a7,aM as a8,tM as a9,re as aA,T2 as aB,Yn as aC,zn as aD,Rs as aE,J1 as aF,Q1 as aG,K1 as aH,Z1 as aI,z1 as aJ,Hd as aK,j1 as aL,W1 as aM,X1 as aN,Yd as aO,Y1 as aP,rk as aQ,ek as aR,tk as aS,sk as aT,ik as aU,H1 as aV,jd as aW,V1 as aX,G1 as aY,U1 as aZ,Ud as a_,Dr as aa,lM as ab,nM as ac,rM as ad,up as ae,pl as af,cc as ag,Lt as ah,Pe as ai,ps as aj,$1 as ak,Vn as al,nt as am,mM as an,yM as ao,Xp as ap,Pt as aq,Rp as ar,ct as as,pM as at,pa as au,Np as av,Fa as aw,yl as ax,gp as ay,$w as az,w0 as b,Da as b$,Jd as b0,Tu as b1,Zb as b2,X5 as b3,ve as b4,E1 as b5,K5 as b6,$n as b7,rr as b8,rs as b9,xi as bA,Ke as bB,Oc as bC,De as bD,Ue as bE,$T as bF,Tc as bG,ga as bH,Xe as bI,HS as bJ,ce as bK,Lc as bL,bl as bM,OB as bN,$a as bO,fa as bP,AB as bQ,Ip as bR,Ee as bS,YS as bT,_l as bU,bp as bV,PB as bW,EB as bX,wB as bY,Aa as bZ,Fp as b_,dh as ba,FC as bb,dt as bc,Id as bd,he as be,wC as bf,En as bg,ed as bh,gs as bi,sd as bj,Q5 as bk,ym as bl,ml as bm,xl as bn,Cc as bo,Sp as bp,Ea as bq,wp as br,QS as bs,Tp as bt,IT as bu,S_ as bv,zS as bw,KS as bx,RT as by,_r as bz,Et as c,Mp as c0,SB as c1,b_ as c2,ur as c3,Yi as c4,zr as c5,Fs as c6,ao as c7,HB as c8,mw as c9,EM as ca,Nu as d,Zt as e,Ze as f,_0 as g,lp as h,pe as i,Ft as j,ds as k,I as l,ef as m,B0 as n,v0 as o,k0 as p,hM as q,ar as r,T0 as s,gm as t,AM as u,MM as v,vk as w,ie as x,Yt as y,F0 as z};