@cnrai/pave 0.11.119 → 0.11.120

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 (81) hide show
  1. package/package.json +1 -1
  2. package/pave.js +10 -10
  3. package/web/assets/{abnfDiagram-VCTEODGH-Cy0FMT8v.js → abnfDiagram-VCTEODGH-CQun3ogE.js} +1 -1
  4. package/web/assets/architectureDiagram-5GKGNRK7-oVzTvsb3.js +36 -0
  5. package/web/assets/{blockDiagram-I7D4REHJ-BGB31XYl.js → blockDiagram-I7D4REHJ-CDZzuTZC.js} +1 -1
  6. package/web/assets/{c4Diagram-7LVT6UL2-BaTB0qVN.js → c4Diagram-7LVT6UL2-Bm0ktuXG.js} +1 -1
  7. package/web/assets/channel-Bh7-m1e5.js +1 -0
  8. package/web/assets/{chunk-2Q5K7J3B-5VZx1LU6.js → chunk-2Q5K7J3B-CHcyUt1N.js} +1 -1
  9. package/web/assets/{chunk-5VM5RSS4-DuMaH8uD.js → chunk-5VM5RSS4-ClYGp-Qm.js} +1 -1
  10. package/web/assets/{chunk-F27PBJKO-ggoWV0gJ.js → chunk-F27PBJKO-BQy_jioc.js} +1 -1
  11. package/web/assets/{chunk-IMKFNOWR-IIoMeeLm.js → chunk-IMKFNOWR-DG0JVHzQ.js} +1 -1
  12. package/web/assets/{chunk-JWPE2WC7-byKDbXzn.js → chunk-JWPE2WC7-g7KSFoMi.js} +1 -1
  13. package/web/assets/{chunk-POPQ4Y6H-C6AQdNDO.js → chunk-POPQ4Y6H-ChMbm-k_.js} +1 -1
  14. package/web/assets/{chunk-SVP7TREG-C-5cV70J.js → chunk-SVP7TREG-JNsMB-yr.js} +4 -4
  15. package/web/assets/{chunk-TICWLB2K-BONlrmZq.js → chunk-TICWLB2K--tiq0iAk.js} +1 -1
  16. package/web/assets/{chunk-XXDRQBXY-CrOrFLeE.js → chunk-XXDRQBXY-BpM1cyP1.js} +1 -1
  17. package/web/assets/classDiagram-ZZMXUADV-vlrlRtwo.js +1 -0
  18. package/web/assets/classDiagram-v2-VYDZK3BY-vlrlRtwo.js +1 -0
  19. package/web/assets/{cose-bilkent-JH36ORCC-CmljJJEJ.js → cose-bilkent-JH36ORCC-DNoCqFjg.js} +1 -1
  20. package/web/assets/{cynefin-OW5HDTMX-7Qtt21YP.js → cynefin-OW5HDTMX-DXHBAtGJ.js} +1 -1
  21. package/web/assets/{cynefinDiagram-5FMLGOSQ-DxqZpyGR.js → cynefinDiagram-5FMLGOSQ-DFvR6u8N.js} +2 -2
  22. package/web/assets/d3-scale-4DPf7zan.js +1 -0
  23. package/web/assets/{dagre-GXQ25YYZ-BL7U9TXO.js → dagre-GXQ25YYZ-BtdtVnNL.js} +2 -2
  24. package/web/assets/{diagram-S7CK7UJ4-kq53HXrQ.js → diagram-S7CK7UJ4-DTBDTeWr.js} +4 -4
  25. package/web/assets/diagram-UQ7AKVKN-WsABo8v9.js +41 -0
  26. package/web/assets/{diagram-VSXAHHWV-Lt5a1Qri.js → diagram-VSXAHHWV-PfPn8q7Y.js} +3 -3
  27. package/web/assets/diagram-VX7I27RA-BgImaOA7.js +24 -0
  28. package/web/assets/{diagram-Z3DM3KII-Dhj1WGQr.js → diagram-Z3DM3KII-BhPC3EPH.js} +1 -1
  29. package/web/assets/{ebnfDiagram-PWID7BFC-DZmfK0ER.js → ebnfDiagram-PWID7BFC-MZXRKqfj.js} +1 -1
  30. package/web/assets/{erDiagram-RLTQ6QDP-J8EphrWK.js → erDiagram-RLTQ6QDP-B0d0Nnu_.js} +1 -1
  31. package/web/assets/{flowDiagram-HODETNUW-COyBJLfP.js → flowDiagram-HODETNUW-Cy4qmeb0.js} +4 -4
  32. package/web/assets/ganttDiagram-EL5Y4UJY-Djww1Rba.js +292 -0
  33. package/web/assets/{gitGraphDiagram-WWUBYQGX-BFMzAa8R.js → gitGraphDiagram-WWUBYQGX-8Tak7xqH.js} +1 -1
  34. package/web/assets/index-Bt1QpYqk.js +132 -0
  35. package/web/assets/index-DdEADc8n.css +10 -0
  36. package/web/assets/{infoDiagram-27XIBGKW-B0VZh3Cg.js → infoDiagram-27XIBGKW-DkaHqIdq.js} +1 -1
  37. package/web/assets/{ishikawaDiagram-5VMMS53U-BELx0FR2.js → ishikawaDiagram-5VMMS53U-ay7785S2.js} +3 -3
  38. package/web/assets/{journeyDiagram-3NMN7TZE-CUAJIh2b.js → journeyDiagram-3NMN7TZE-Be1Bgc8E.js} +6 -6
  39. package/web/assets/{kanban-definition-UXKFOSKX-DovK08HT.js → kanban-definition-UXKFOSKX-Uv5UoCff.js} +7 -7
  40. package/web/assets/{layout-Bskhkyv5.js → layout-DVsJ-C6t.js} +1 -1
  41. package/web/assets/mermaid.core-CfJk9oqB.js +310 -0
  42. package/web/assets/{mindmap-definition-YA3MSWOX-C_8fi_h8.js → mindmap-definition-YA3MSWOX-CEjjKmq_.js} +4 -4
  43. package/web/assets/{pegDiagram-XKGWAZYB-DQgUieRG.js → pegDiagram-XKGWAZYB-CCbGN7im.js} +1 -1
  44. package/web/assets/pieDiagram-E7YTZNPT-DSbIEsvX.js +39 -0
  45. package/web/assets/{quadrantDiagram-AXDQQJYC-BUBV4AXR.js → quadrantDiagram-AXDQQJYC-NH55I-VQ.js} +2 -2
  46. package/web/assets/{railroadDiagram-O6MQD6OU-FOFi7cPV.js → railroadDiagram-O6MQD6OU-DrY5l5qz.js} +1 -1
  47. package/web/assets/{requirementDiagram-BXWQKSXE-DdhHxUze.js → requirementDiagram-BXWQKSXE-DnEzj3DN.js} +1 -1
  48. package/web/assets/sankeyDiagram-P5KCCOFB-Deb4JoPN.js +40 -0
  49. package/web/assets/{sequenceDiagram-WJ2MYXX4-DOUkp_Hw.js → sequenceDiagram-WJ2MYXX4-BilBA3A_.js} +1 -1
  50. package/web/assets/{sizeCapture-INFHLROL-B-EXES5m.js → sizeCapture-INFHLROL-CT4uqGe1.js} +1 -1
  51. package/web/assets/{stateDiagram-D77RDMKH-DE0t8Vv8.js → stateDiagram-D77RDMKH-DMwGaAv4.js} +1 -1
  52. package/web/assets/stateDiagram-v2-MP3YSRHH-Clsx447Y.js +1 -0
  53. package/web/assets/{swimlanes-42K2YHIH-FiGnHrZR.js → swimlanes-42K2YHIH-3uatewyx.js} +1 -1
  54. package/web/assets/swimlanesDiagram-VR7AAH4N-Chk2E8QS.js +8 -0
  55. package/web/assets/{timeline-definition-24CTP7MA-DqxypfQR.js → timeline-definition-24CTP7MA-Dj31t9Rm.js} +4 -4
  56. package/web/assets/{vennDiagram-4TSXK5OY-BDEA7Eeb.js → vennDiagram-4TSXK5OY-BoVPzNB_.js} +4 -4
  57. package/web/assets/{wardleyDiagram-VM6X3IG4-D_7_rEdL.js → wardleyDiagram-VM6X3IG4-BWMtHf0h.js} +3 -3
  58. package/web/assets/xychartDiagram-S5SC5T6Z-D8oU7JtR.js +7 -0
  59. package/web/assets/zh-TW-DDsaOGgA.js +1 -0
  60. package/web/index.html +2 -2
  61. package/web/assets/arc-kJE6D1oE.js +0 -1
  62. package/web/assets/architectureDiagram-5GKGNRK7-K76ITJrD.js +0 -36
  63. package/web/assets/channel-ybnroZSU.js +0 -1
  64. package/web/assets/classDiagram-ZZMXUADV-DVpCWxGN.js +0 -1
  65. package/web/assets/classDiagram-v2-VYDZK3BY-DVpCWxGN.js +0 -1
  66. package/web/assets/defaultLocale-DX6XiGOO.js +0 -1
  67. package/web/assets/diagram-UQ7AKVKN-ChqT9cBv.js +0 -41
  68. package/web/assets/diagram-VX7I27RA-DLw6iF4f.js +0 -24
  69. package/web/assets/ganttDiagram-EL5Y4UJY-DTQCulp7.js +0 -292
  70. package/web/assets/index-BU4RL3Oc.js +0 -132
  71. package/web/assets/index-DvmXgMDn.css +0 -10
  72. package/web/assets/init-Gi6I4Gst.js +0 -1
  73. package/web/assets/linear-CyvGAyrR.js +0 -1
  74. package/web/assets/mermaid.core-CYiw0kXn.js +0 -310
  75. package/web/assets/ordinal-Cboi1Yqb.js +0 -1
  76. package/web/assets/pieDiagram-E7YTZNPT-Bmpmpxie.js +0 -39
  77. package/web/assets/sankeyDiagram-P5KCCOFB-6OaH9E7j.js +0 -40
  78. package/web/assets/stateDiagram-v2-MP3YSRHH-DDCRbnvH.js +0 -1
  79. package/web/assets/swimlanesDiagram-VR7AAH4N-CKmSn5Vi.js +0 -8
  80. package/web/assets/xychartDiagram-S5SC5T6Z-By-YodQ2.js +0 -7
  81. package/web/assets/zh-TW-BL_iUqM_.js +0 -1
@@ -0,0 +1,310 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-CT4uqGe1.js","assets/index-Bt1QpYqk.js","assets/index-DdEADc8n.css","assets/dagre-GXQ25YYZ-BtdtVnNL.js","assets/layout-DVsJ-C6t.js","assets/swimlanes-42K2YHIH-3uatewyx.js","assets/cose-bilkent-JH36ORCC-DNoCqFjg.js","assets/cytoscape.esm-BLAcgzS2.js","assets/c4Diagram-7LVT6UL2-Bm0ktuXG.js","assets/chunk-F27PBJKO-BQy_jioc.js","assets/flowDiagram-HODETNUW-Cy4qmeb0.js","assets/chunk-5VM5RSS4-ClYGp-Qm.js","assets/chunk-XXDRQBXY-BpM1cyP1.js","assets/chunk-POPQ4Y6H-ChMbm-k_.js","assets/channel-Bh7-m1e5.js","assets/swimlanesDiagram-VR7AAH4N-Chk2E8QS.js","assets/erDiagram-RLTQ6QDP-B0d0Nnu_.js","assets/gitGraphDiagram-WWUBYQGX-8Tak7xqH.js","assets/chunk-2Q5K7J3B-CHcyUt1N.js","assets/chunk-JWPE2WC7-g7KSFoMi.js","assets/cynefin-OW5HDTMX-DXHBAtGJ.js","assets/ganttDiagram-EL5Y4UJY-Djww1Rba.js","assets/d3-scale-4DPf7zan.js","assets/infoDiagram-27XIBGKW-DkaHqIdq.js","assets/pieDiagram-E7YTZNPT-DSbIEsvX.js","assets/quadrantDiagram-AXDQQJYC-NH55I-VQ.js","assets/xychartDiagram-S5SC5T6Z-D8oU7JtR.js","assets/requirementDiagram-BXWQKSXE-DnEzj3DN.js","assets/sequenceDiagram-WJ2MYXX4-BilBA3A_.js","assets/classDiagram-ZZMXUADV-vlrlRtwo.js","assets/chunk-TICWLB2K--tiq0iAk.js","assets/classDiagram-v2-VYDZK3BY-vlrlRtwo.js","assets/stateDiagram-D77RDMKH-DMwGaAv4.js","assets/chunk-IMKFNOWR-DG0JVHzQ.js","assets/stateDiagram-v2-MP3YSRHH-Clsx447Y.js","assets/journeyDiagram-3NMN7TZE-Be1Bgc8E.js","assets/timeline-definition-24CTP7MA-Dj31t9Rm.js","assets/mindmap-definition-YA3MSWOX-CEjjKmq_.js","assets/kanban-definition-UXKFOSKX-Uv5UoCff.js","assets/sankeyDiagram-P5KCCOFB-Deb4JoPN.js","assets/diagram-Z3DM3KII-BhPC3EPH.js","assets/diagram-UQ7AKVKN-WsABo8v9.js","assets/blockDiagram-I7D4REHJ-CDZzuTZC.js","assets/diagram-S7CK7UJ4-DTBDTeWr.js","assets/architectureDiagram-5GKGNRK7-oVzTvsb3.js","assets/diagram-VSXAHHWV-PfPn8q7Y.js","assets/ishikawaDiagram-5VMMS53U-ay7785S2.js","assets/vennDiagram-4TSXK5OY-BoVPzNB_.js","assets/diagram-VX7I27RA-BgImaOA7.js","assets/wardleyDiagram-VM6X3IG4-BWMtHf0h.js","assets/cynefinDiagram-5FMLGOSQ-DFvR6u8N.js","assets/railroadDiagram-O6MQD6OU-DrY5l5qz.js","assets/chunk-SVP7TREG-JNsMB-yr.js","assets/ebnfDiagram-PWID7BFC-MZXRKqfj.js","assets/abnfDiagram-VCTEODGH-CQun3ogE.js","assets/pegDiagram-XKGWAZYB-CCbGN7im.js"])))=>i.map(i=>d[i]);
2
+ var ey=Object.defineProperty;var ry=(e,t,r)=>t in e?ey(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Nt=(e,t,r)=>ry(e,typeof t!="symbol"?t+"":t,r);import{g as Wo,p as ei,_ as At}from"./index-Bt1QpYqk.js";var Tc=Object.defineProperty,f=(e,t)=>Tc(e,"name",{value:t,configurable:!0}),iy=(e,t)=>{for(var r in t)Tc(e,r,{get:t[r],enumerable:!0})},ps={exports:{}},sy=ps.exports,ll;function ay(){return ll||(ll=1,(function(e,t){(function(r,i){e.exports=i()})(sy,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",l="hour",c="day",h="week",u="month",d="quarter",g="year",p="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var E=["th","st","nd","rd"],B=F%100;return"["+F+(E[(B-20)%10]||E[B]||E[0])+"]"}},w=function(F,E,B){var P=String(F);return!P||P.length>=E?F:""+Array(E+1-P.length).join(B)+F},T={s:w,z:function(F){var E=-F.utcOffset(),B=Math.abs(E),P=Math.floor(B/60),O=B%60;return(E<=0?"+":"-")+w(P,2,"0")+":"+w(O,2,"0")},m:function F(E,B){if(E.date()<B.date())return-F(B,E);var P=12*(B.year()-E.year())+(B.month()-E.month()),O=E.clone().add(P,u),W=B-O<0,X=E.clone().add(P+(W?-1:1),u);return+(-(P+(B-O)/(W?O-X:X-O))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:u,y:g,w:h,d:c,D:p,h:l,m:o,s:n,ms:a,Q:d}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},_="en",v={};v[_]=b;var A="$isDayjsObject",L=function(F){return F instanceof Q||!(!F||!F[A])},Y=function F(E,B,P){var O;if(!E)return _;if(typeof E=="string"){var W=E.toLowerCase();v[W]&&(O=W),B&&(v[W]=B,O=W);var X=E.split("-");if(!O&&X.length>1)return F(X[0])}else{var at=E.name;v[at]=E,O=at}return!P&&O&&(_=O),O||!P&&_},N=function(F,E){if(L(F))return F.clone();var B=typeof E=="object"?E:{};return B.date=F,B.args=arguments,new Q(B)},I=T;I.l=Y,I.i=L,I.w=function(F,E){return N(F,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Q=(function(){function F(B){this.$L=Y(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[A]=!0}var E=F.prototype;return E.parse=function(B){this.$d=(function(P){var O=P.date,W=P.utc;if(O===null)return new Date(NaN);if(I.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var X=O.match(x);if(X){var at=X[2]-1||0,ot=(X[7]||"0").substring(0,3);return W?new Date(Date.UTC(X[1],at,X[3]||1,X[4]||0,X[5]||0,X[6]||0,ot)):new Date(X[1],at,X[3]||1,X[4]||0,X[5]||0,X[6]||0,ot)}}return new Date(O)})(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 I},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(B,P){var O=N(B);return this.startOf(P)<=O&&O<=this.endOf(P)},E.isAfter=function(B,P){return N(B)<this.startOf(P)},E.isBefore=function(B,P){return this.endOf(P)<N(B)},E.$g=function(B,P,O){return I.u(B)?this[P]:this.set(O,B)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(B,P){var O=this,W=!!I.u(P)||P,X=I.p(B),at=function(bt,it){var ht=I.w(O.$u?Date.UTC(O.$y,it,bt):new Date(O.$y,it,bt),O);return W?ht:ht.endOf(c)},ot=function(bt,it){return I.w(O.toDate()[bt].apply(O.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(it)),O)},gt=this.$W,yt=this.$M,nt=this.$D,St="set"+(this.$u?"UTC":"");switch(X){case g:return W?at(1,0):at(31,11);case u:return W?at(1,yt):at(0,yt+1);case h:var kt=this.$locale().weekStart||0,Mt=(gt<kt?gt+7:gt)-kt;return at(W?nt-Mt:nt+(6-Mt),yt);case c:case p:return ot(St+"Hours",0);case l:return ot(St+"Minutes",1);case o:return ot(St+"Seconds",2);case n:return ot(St+"Milliseconds",3);default:return this.clone()}},E.endOf=function(B){return this.startOf(B,!1)},E.$set=function(B,P){var O,W=I.p(B),X="set"+(this.$u?"UTC":""),at=(O={},O[c]=X+"Date",O[p]=X+"Date",O[u]=X+"Month",O[g]=X+"FullYear",O[l]=X+"Hours",O[o]=X+"Minutes",O[n]=X+"Seconds",O[a]=X+"Milliseconds",O)[W],ot=W===c?this.$D+(P-this.$W):P;if(W===u||W===g){var gt=this.clone().set(p,1);gt.$d[at](ot),gt.init(),this.$d=gt.set(p,Math.min(this.$D,gt.daysInMonth())).$d}else at&&this.$d[at](ot);return this.init(),this},E.set=function(B,P){return this.clone().$set(B,P)},E.get=function(B){return this[I.p(B)]()},E.add=function(B,P){var O,W=this;B=Number(B);var X=I.p(P),at=function(yt){var nt=N(W);return I.w(nt.date(nt.date()+Math.round(yt*B)),W)};if(X===u)return this.set(u,this.$M+B);if(X===g)return this.set(g,this.$y+B);if(X===c)return at(1);if(X===h)return at(7);var ot=(O={},O[o]=i,O[l]=s,O[n]=r,O)[X]||1,gt=this.$d.getTime()+B*ot;return I.w(gt,this)},E.subtract=function(B,P){return this.add(-1*B,P)},E.format=function(B){var P=this,O=this.$locale();if(!this.isValid())return O.invalidDate||m;var W=B||"YYYY-MM-DDTHH:mm:ssZ",X=I.z(this),at=this.$H,ot=this.$m,gt=this.$M,yt=O.weekdays,nt=O.months,St=O.meridiem,kt=function(it,ht,Bt,Et){return it&&(it[ht]||it(P,W))||Bt[ht].slice(0,Et)},Mt=function(it){return I.s(at%12||12,it,"0")},bt=St||function(it,ht,Bt){var Et=it<12?"AM":"PM";return Bt?Et.toLowerCase():Et};return W.replace(C,(function(it,ht){return ht||(function(Bt){switch(Bt){case"YY":return String(P.$y).slice(-2);case"YYYY":return I.s(P.$y,4,"0");case"M":return gt+1;case"MM":return I.s(gt+1,2,"0");case"MMM":return kt(O.monthsShort,gt,nt,3);case"MMMM":return kt(nt,gt);case"D":return P.$D;case"DD":return I.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return kt(O.weekdaysMin,P.$W,yt,2);case"ddd":return kt(O.weekdaysShort,P.$W,yt,3);case"dddd":return yt[P.$W];case"H":return String(at);case"HH":return I.s(at,2,"0");case"h":return Mt(1);case"hh":return Mt(2);case"a":return bt(at,ot,!0);case"A":return bt(at,ot,!1);case"m":return String(ot);case"mm":return I.s(ot,2,"0");case"s":return String(P.$s);case"ss":return I.s(P.$s,2,"0");case"SSS":return I.s(P.$ms,3,"0");case"Z":return X}return null})(it)||X.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(B,P,O){var W,X=this,at=I.p(P),ot=N(B),gt=(ot.utcOffset()-this.utcOffset())*i,yt=this-ot,nt=function(){return I.m(X,ot)};switch(at){case g:W=nt()/12;break;case u:W=nt();break;case d:W=nt()/3;break;case h:W=(yt-gt)/6048e5;break;case c:W=(yt-gt)/864e5;break;case l:W=yt/s;break;case o:W=yt/i;break;case n:W=yt/r;break;default:W=yt}return O?W:I.a(W)},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 O=this.clone(),W=Y(B,P,!0);return W&&(O.$L=W),O},E.clone=function(){return I.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()},F})(),M=Q.prototype;return N.prototype=M,[["$ms",a],["$s",n],["$m",o],["$H",l],["$W",c],["$M",u],["$y",g],["$D",p]].forEach((function(F){M[F[1]]=function(E){return this.$g(E,F[0],F[1])}})),N.extend=function(F,E){return F.$i||(F(E,Q,N),F.$i=!0),N},N.locale=Y,N.isDayjs=L,N.unix=function(F){return N(1e3*F)},N.en=v[_],N.Ls=v,N.p={},N}))})(ps)),ps.exports}var oy=ay();const ny=Wo(oy);var qe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},zo=f(function(e="fatal"){let t=qe.fatal;typeof e=="string"?e.toLowerCase()in qe&&(t=qe[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=qe.fatal&&(q.fatal=console.error?console.error.bind(console,fe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",fe("FATAL"))),t<=qe.error&&(q.error=console.error?console.error.bind(console,fe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",fe("ERROR"))),t<=qe.warn&&(q.warn=console.warn?console.warn.bind(console,fe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",fe("WARN"))),t<=qe.info&&(q.info=console.info?console.info.bind(console,fe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",fe("INFO"))),t<=qe.debug&&(q.debug=console.debug?console.debug.bind(console,fe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fe("DEBUG"))),t<=qe.trace&&(q.trace=console.debug?console.debug.bind(console,fe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fe("TRACE")))},"setLogLevel"),fe=f(e=>`%c${ny().format("ss.SSS")} : ${e} : `,"format");const ys={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 ys.hue2rgb(a,s,e+1/3)*255;case"g":return ys.hue2rgb(a,s,e)*255;case"b":return ys.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,l=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},ly={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},hy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Lt={channel:ys,lang:ly,unit:hy},Ze={};for(let e=0;e<=255;e++)Ze[e]=Lt.unit.dec2hex(e);const re={ALL:0,RGB:1,HSL:2};let cy=class{constructor(){this.type=re.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=re.ALL}is(t){return this.type===t}};class uy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new cy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=re.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(re.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(re.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(re.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(re.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(re.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(re.RGB)&&r!==void 0?r:(this._ensureRGB(),Lt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(re.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(re.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(re.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(re.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(re.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(re.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xs=new uy({r:0,g:0,b:0,a:0},"transparent"),Ir={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Ir.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,l=n?8:4,c=a?0:-1,h=n?255:15;return Xs.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}${Ze[Math.round(s*255)]}`:`#${Ze[Math.round(t)]}${Ze[Math.round(r)]}${Ze[Math.round(i)]}`}},cr={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(cr.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(cr.re);if(!r)return;const[,i,s,a,n,o]=r;return Xs.set({h:cr._hue2deg(i),s:Lt.channel.clamp.s(parseFloat(s)),l:Lt.channel.clamp.l(parseFloat(a)),a:n?Lt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${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)}%)`}},$i={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=$i.colors[e];if(t)return Ir.parse(t)},stringify:e=>{const t=Ir.stringify(e);for(const r in $i.colors)if($i.colors[r]===t)return r}},_i={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(_i.re);if(!r)return;const[,i,s,a,n,o,l,c,h]=r;return Xs.set({r:Lt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Lt.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:Lt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),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)})`}},$e={format:{keyword:$i,hex:Ir,rgb:_i,rgba:_i,hsl:cr,hsla:cr},parse:e=>{if(typeof e!="string")return e;const t=Ir.parse(e)||_i.parse(e)||cr.parse(e)||$i.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(re.HSL)||e.data.r===void 0?cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?_i.stringify(e):Ir.stringify(e)},_c=(e,t)=>{const r=$e.parse(e);for(const i in t)r[i]=Lt.channel.clamp[i](t[i]);return $e.stringify(r)},Je=(e,t,r=0,i=1)=>{if(typeof e!="number")return _c(e,{a:t});const s=Xs.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 $e.stringify(s)},dy=e=>{const{r:t,g:r,b:i}=$e.parse(e),s=.2126*Lt.channel.toLinear(t)+.7152*Lt.channel.toLinear(r)+.0722*Lt.channel.toLinear(i);return Lt.lang.round(s)},gy=e=>dy(e)>=.5,Te=e=>!gy(e),Bc=(e,t,r)=>{const i=$e.parse(e),s=i[t],a=Lt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),$e.stringify(i)},H=(e,t)=>Bc(e,"l",t),j=(e,t)=>Bc(e,"l",-t),k=(e,t)=>{const r=$e.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return _c(e,i)},fy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=$e.parse(e),{r:o,g:l,b:c,a:h}=$e.parse(t),u=r/100,d=u*2-1,g=n-h,m=((d*g===-1?d:(d+g)/(1+d*g))+1)/2,x=1-m,C=i*m+o*x,b=s*m+l*x,w=a*m+c*x,T=n*u+h*(1-u);return Je(C,b,w,T)},$=(e,t=100)=>{const r=$e.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,fy(r,e,t)};var ao=f((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ao(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,n])=>{if(typeof n=="object"){if(n===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(n)?[]:{}),typeof s[a]=="object"&&(s[a]=ao(s[a],n,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=n:Object.defineProperty(e,a,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Kt=ao,Pe="#ffffff",De="#f2f2f2",_t=f((e,t)=>t?k(e,{s:-40,l:10}):k(e,{s:-40,l:-10}),"mkBorder"),Nr,py=(Nr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,n,o,l,c,h,u,d,g,p,m,x,C,b,w,T,_,v,A,L,Y,N,I,Q,M,F,E,B,P,O,W,X,at,ot,gt,yt,nt,St,kt,Mt,bt,it,ht,Bt,Et,qt,z;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(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||H(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||j(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||j(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScale"+vt]=j(this["cScale"+vt],75);else for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScale"+vt]=j(this["cScale"+vt],25);for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this["cScaleInv"+vt]=this["cScaleInv"+vt]||$(this["cScale"+vt]);for(let vt=0;vt<this.THEME_COLOR_LIMIT;vt++)this.darkMode?this["cScalePeer"+vt]=this["cScalePeer"+vt]||H(this["cScale"+vt],10):this["cScalePeer"+vt]=this["cScalePeer"+vt]||j(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]||k(this.mainBkg,{h:180,s:-15,l:t*(5+vt*3)}),this["surfacePeer"+vt]=this["surfacePeer"+vt]||k(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||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(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:((n=this.cynefin)==null?void 0:n.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.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:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((p=this.cynefin)==null?void 0:p.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.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:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((L=this.radar)==null?void 0:L.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((I=this.wardley)==null?void 0:I.backgroundColor)||this.background,axisColor:((Q=this.wardley)==null?void 0:Q.axisColor)||this.lineColor,axisTextColor:((M=this.wardley)==null?void 0:M.axisTextColor)||this.primaryTextColor,gridColor:((F=this.wardley)==null?void 0:F.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:((O=this.wardley)==null?void 0:O.linkStroke)||this.lineColor,evolutionStroke:((W=this.wardley)==null?void 0:W.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((X=this.wardley)==null?void 0:X.annotationStroke)||this.lineColor,annotationTextColor:((at=this.wardley)==null?void 0:at.annotationTextColor)||this.primaryTextColor,annotationFill:((ot=this.wardley)==null?void 0:ot.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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((St=this.xyChart)==null?void 0:St.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((kt=this.xyChart)==null?void 0:kt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Mt=this.xyChart)==null?void 0:Mt.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:((ht=this.xyChart)==null?void 0:ht.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((qt=this.xyChart)==null?void 0:qt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((z=this.xyChart)==null?void 0:z.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?j(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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De,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]})}},f(Nr,"Theme"),Nr),yy=f(e=>{const t=new py;return t.calculate(e),t},"getThemeVariables"),Wr,my=(Wr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Je(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=j("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=j(this.sectionBkgColor,10),this.taskBorderColor=Je(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Je(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||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||j(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,n,o,l,c,h,u,d,g,p,m,x,C,b,w,T,_,v,A,L,Y,N,I,Q,M,F,E,B,P,O,W,X,at,ot,gt,yt,nt,St,kt,Mt,bt,it,ht,Bt,Et,qt;this.secondBkg=H(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=H(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=H(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=$(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330});for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||$(this["cScale"+z]);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScalePeer"+z]=this["cScalePeer"+z]||H(this["cScale"+z],10);for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||k(this.mainBkg,{h:30,s:-30,l:-(-10+z*4)}),this["surfacePeer"+z]=this["surfacePeer"+z]||k(this.mainBkg,{h:30,s:-30,l:-(-7+z*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["pie"+z]=this["cScale"+z];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 z=0;z<8;z++)this["venn"+(z+1)]=this["venn"+(z+1)]??H(this["cScale"+z],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:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.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:((g=this.cynefin)==null?void 0:g.confusionBg)||"#4A148C",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.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:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Q=this.xyChart)==null?void 0:Q.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:((M=this.radar)==null?void 0:M.axisColor)||this.lineColor,axisStrokeWidth:((F=this.radar)==null?void 0:F.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:((O=this.radar)==null?void 0:O.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((W=this.radar)==null?void 0:W.graticuleStrokeWidth)||1,graticuleOpacity:((X=this.radar)==null?void 0:X.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((ot=this.radar)==null?void 0:ot.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:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((St=this.wardley)==null?void 0:St.gridColor)||this.gridColor,componentFill:((kt=this.wardley)==null?void 0:kt.componentFill)||this.mainBkg,componentStroke:((Mt=this.wardley)==null?void 0:Mt.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:((ht=this.wardley)==null?void 0:ht.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Bt=this.wardley)==null?void 0:Bt.annotationStroke)||this.lineColor,annotationTextColor:((Et=this.wardley)==null?void 0:Et.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?j(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||k(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||k(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||k(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||k(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||k(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||$(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||$(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||H("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||H("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||H("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||H("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||H(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||H(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(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]})}},f(Wr,"Theme"),Wr),Cy=f(e=>{const t=new my;return t.calculate(e),t},"getThemeVariables"),zr,xy=(zr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=k(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=_t(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=Je(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,n,o,l,c,h,u,d,g,p,m,x,C,b,w,T,_,v,A,L,Y,N,I,Q,M,F,E,B,P,O,W,X,at,ot,gt,yt,nt,St,kt,Mt,bt,it,ht,Bt,Et,qt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScale"+z]=j(this["cScale"+z],10),this["cScalePeer"+z]=this["cScalePeer"+z]||j(this["cScale"+z],25);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||k(this["cScale"+z],{h:180});for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||k(this.mainBkg,{h:30,l:-(5+z*5)}),this["surfacePeer"+z]=this["surfacePeer"+z]||k(this.mainBkg,{h:30,l:-(7+z*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||$(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||$(this.labelTextColor);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||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||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||k(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||k(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(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:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.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:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.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:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((Y=this.radar)==null?void 0:Y.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((I=this.wardley)==null?void 0:I.axisColor)||this.lineColor,axisTextColor:((Q=this.wardley)==null?void 0:Q.axisTextColor)||this.primaryTextColor,gridColor:((M=this.wardley)==null?void 0:M.gridColor)||this.gridColor,componentFill:((F=this.wardley)==null?void 0:F.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:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((W=this.wardley)==null?void 0:W.annotationStroke)||this.lineColor,annotationTextColor:((X=this.wardley)==null?void 0:X.annotationTextColor)||this.primaryTextColor,annotationFill:((at=this.wardley)==null?void 0:at.annotationFill)||this.background},this.xyChart={backgroundColor:((ot=this.xyChart)==null?void 0:ot.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:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((St=this.xyChart)==null?void 0:St.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((kt=this.xyChart)==null?void 0:kt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Mt=this.xyChart)==null?void 0:Mt.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:((ht=this.xyChart)==null?void 0:ht.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Et=this.xyChart)==null?void 0:Et.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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||j($(this.git0),25),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||$(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||$(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(zr,"Theme"),zr),by=f(e=>{const t=new xy;return t.calculate(e),t},"getThemeVariables"),Hr,ky=(Hr=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=H("#cde498",10),this.primaryBorderColor=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.primaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,n,o,l,c,h,u,d,g,p,m,x,C,b,w,T,_,v,A,L,Y,N,I,Q,M,F,E,B,P,O,W,X,at,ot,gt,yt,nt,St,kt,Mt,bt,it,ht,Bt,Et,qt;this.actorBorder=j(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||j(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||j(this.tertiaryColor,40);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScale"+z]=j(this["cScale"+z],10),this["cScalePeer"+z]=this["cScalePeer"+z]||j(this["cScale"+z],25);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||k(this["cScale"+z],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||k(this.mainBkg,{h:30,s:-30,l:-(5+z*5)}),this["surfacePeer"+z]=this["surfacePeer"+z]||k(this.mainBkg,{h:30,s:-30,l:-(8+z*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||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(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||k(this.primaryColor,{l:-30}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(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:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.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:((g=this.cynefin)==null?void 0:g.confusionBg)||"#D7CCC8",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.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:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((Y=this.radar)==null?void 0:Y.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((I=this.wardley)==null?void 0:I.axisColor)||this.lineColor,axisTextColor:((Q=this.wardley)==null?void 0:Q.axisTextColor)||this.primaryTextColor,gridColor:((M=this.wardley)==null?void 0:M.gridColor)||this.gridColor,componentFill:((F=this.wardley)==null?void 0:F.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:((O=this.wardley)==null?void 0:O.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((W=this.wardley)==null?void 0:W.annotationStroke)||this.lineColor,annotationTextColor:((X=this.wardley)==null?void 0:X.annotationTextColor)||this.primaryTextColor,annotationFill:((at=this.wardley)==null?void 0:at.annotationFill)||this.background},this.xyChart={backgroundColor:((ot=this.xyChart)==null?void 0:ot.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:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((St=this.xyChart)==null?void 0:St.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((kt=this.xyChart)==null?void 0:kt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Mt=this.xyChart)==null?void 0:Mt.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:((ht=this.xyChart)==null?void 0:ht.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Et=this.xyChart)==null?void 0:Et.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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||$(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||$(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Hr,"Theme"),Hr),wy=f(e=>{const t=new ky;return t.calculate(e),t},"getThemeVariables"),jr,Sy=(jr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.lineColor=$(this.background),this.textColor=$(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,n,o,l,c,h,u,d,g,p,m,x,C,b,w,T,_,v,A,L,Y,N,I,Q,M,F,E,B,P,O,W,X,at,ot,gt,yt,nt,St,kt,Mt,bt,it,ht,Bt,Et,qt;this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(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 z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleInv"+z]=this["cScaleInv"+z]||$(this["cScale"+z]);for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this.darkMode?this["cScalePeer"+z]=this["cScalePeer"+z]||H(this["cScale"+z],10):this["cScalePeer"+z]=this["cScalePeer"+z]||j(this["cScale"+z],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["cScaleLabel"+z]=this["cScaleLabel"+z]||this.scaleLabelColor;for(let z=0;z<5;z++)this["surface"+z]=this["surface"+z]||k(this.mainBkg,{l:-(5+z*5)}),this["surfacePeer"+z]=this["surfacePeer"+z]||k(this.mainBkg,{l:-(8+z*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=H(this.contrast,30),this.sectionBkgColor2=H(this.contrast,30),this.taskBorderColor=j(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=H(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=j(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128});for(let z=0;z<this.THEME_COLOR_LIMIT;z++)this["pie"+z]=this["cScale"+z];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 z=0;z<8;z++)this["venn"+(z+1)]=this["venn"+(z+1)]??this["cScale"+z];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:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.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:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((m=this.cynefin)==null?void 0:m.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.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:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Y=this.xyChart)==null?void 0:Y.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Q=this.xyChart)==null?void 0:Q.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((M=this.radar)==null?void 0:M.axisColor)||this.lineColor,axisStrokeWidth:((F=this.radar)==null?void 0:F.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:((O=this.radar)==null?void 0:O.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((W=this.radar)==null?void 0:W.graticuleStrokeWidth)||1,graticuleOpacity:((X=this.radar)==null?void 0:X.graticuleOpacity)||.3,legendBoxSize:((at=this.radar)==null?void 0:at.legendBoxSize)||12,legendFontSize:((ot=this.radar)==null?void 0:ot.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:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((St=this.wardley)==null?void 0:St.gridColor)||this.gridColor,componentFill:((kt=this.wardley)==null?void 0:kt.componentFill)||this.background,componentStroke:((Mt=this.wardley)==null?void 0:Mt.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:((ht=this.wardley)==null?void 0:ht.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Bt=this.wardley)==null?void 0:Bt.annotationStroke)||this.lineColor,annotationTextColor:((Et=this.wardley)==null?void 0:Et.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=j(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||k(this.primaryColor,{h:-30}),this.git4=this.pie5||k(this.primaryColor,{h:-60}),this.git5=this.pie6||k(this.primaryColor,{h:-90}),this.git6=this.pie7||k(this.primaryColor,{h:60}),this.git7=this.pie8||k(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.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||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(jr,"Theme"),jr),Ty=f(e=>{const t=new Sy;return t.calculate(e),t},"getThemeVariables"),Yr,_y=(Yr=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=_t(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,n,o,l,c,h,u,d,g,p,m,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=k(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||H(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||k(t,{h:30}),this.cScale4=this.cScale4||k(t,{h:60}),this.cScale5=this.cScale5||k(t,{h:90}),this.cScale6=this.cScale6||k(t,{h:120}),this.cScale7=this.cScale7||k(t,{h:150}),this.cScale8=this.cScale8||k(t,{h:210,l:150}),this.cScale9=this.cScale9||k(t,{h:270}),this.cScale10=this.cScale10||k(t,{h:300}),this.cScale11=this.cScale11||k(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=j(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=j(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||$(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||H(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||k(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||k(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?j(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||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Yr,"Theme"),Yr),By=f(e=>{const t=new _y;return t.calculate(e),t},"getThemeVariables"),Ur,vy=(Ur=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.border1="#ccc",this.border2=Je(255,255,255,.25),this.arrowheadColor=$(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,n,o,l,c,h,u,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(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||H(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=j(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=j(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||$(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||H(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||j(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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?j(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=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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Ur,"Theme"),Ur),Ly=f(e=>{const t=new vy;return t.calculate(e),t},"getThemeVariables"),Gr,Fy=(Gr=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=_t("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,n,o,l,c,h,u,d,g,p,m,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=k(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||H(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=j(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=j(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||$(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||H(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||k(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||k(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?j(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||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Gr,"Theme"),Gr),Ay=f(e=>{const t=new Fy;return t.calculate(e),t},"getThemeVariables"),Xr,My=(Xr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.border1="#ccc",this.border2=Je(255,255,255,.25),this.arrowheadColor=$(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,n,o,l,c,h,u,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(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||H(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=j(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=j(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||$(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||H(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||j(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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?j(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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Xr,"Theme"),Xr),Ey=f(e=>{const t=new My;return t.calculate(e),t},"getThemeVariables"),Vr,$y=(Vr=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=_t(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,n,o,l,c,h,u,d,g,p,m,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=k(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||H(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 C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||$(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||H(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||j(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||k(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||k(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((m=this.xyChart)==null?void 0:m.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.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?j(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||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Vr,"Theme"),Vr),Oy=f(e=>{const t=new $y;return t.calculate(e),t},"getThemeVariables"),Zr,Py=(Zr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=$(this.background),this.secondaryBorderColor=_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=_t(this.tertiaryColor,this.darkMode),this.primaryTextColor=$(this.primaryColor),this.secondaryTextColor=$(this.secondaryColor),this.tertiaryTextColor=$(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H($("#323D47"),10),this.border1="#ccc",this.border2=Je(255,255,255,.25),this.arrowheadColor=$(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,n,o,l,c,h,u,d,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||_t(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||_t(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||_t(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||_t(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||$(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||$(this.tertiaryColor),this.lineColor=this.lineColor||$(this.background),this.arrowheadColor=this.arrowheadColor||$(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?j(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||j(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||$(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||H(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 p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||$(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||H(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||j(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=j(this["cScale"+p],75);const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Te(this.quadrant1Fill)?H(this.quadrant1Fill):j(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:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.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:((g=this.xyChart)==null?void 0:g.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?j(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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(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.git0=j(this.git0,25),this.git1=j(this.git1,25),this.git2=j(this.git2,25),this.git3=j(this.git3,25),this.git4=j(this.git4,25),this.git5=j(this.git5,25),this.git6=j(this.git6,25),this.git7=j(this.git7,25)),this.gitInv0=this.gitInv0||$(this.git0),this.gitInv1=this.gitInv1||$(this.git1),this.gitInv2=this.gitInv2||$(this.git2),this.gitInv3=this.gitInv3||$(this.git3),this.gitInv4=this.gitInv4||$(this.git4),this.gitInv5=this.gitInv5||$(this.git5),this.gitInv6=this.gitInv6||$(this.git6),this.gitInv7=this.gitInv7||$(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}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]})}},f(Zr,"Theme"),Zr),Dy=f(e=>{const t=new Py;return t.calculate(e),t},"getThemeVariables"),He={base:{getThemeVariables:yy},dark:{getThemeVariables:Cy},default:{getThemeVariables:by},forest:{getThemeVariables:wy},neutral:{getThemeVariables:Ty},neo:{getThemeVariables:By},"neo-dark":{getThemeVariables:Ly},redux:{getThemeVariables:Ay},"redux-dark":{getThemeVariables:Ey},"redux-color":{getThemeVariables:Oy},"redux-dark-color":{getThemeVariables:Dy}},Qt={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},vc={...Qt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:He.default.getThemeVariables(),sequence:{...Qt.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Qt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Qt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Qt.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Qt.pie,useWidth:984},xyChart:{...Qt.xyChart,useWidth:void 0},requirement:{...Qt.requirement,useWidth:void 0},packet:{...Qt.packet},eventmodeling:{...Qt.eventmodeling},treeView:{...Qt.treeView,useWidth:void 0},radar:{...Qt.radar},railroad:{...Qt.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:{...Qt.ishikawa},sankey:{...Qt.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:{...Qt.venn},cynefin:{...Qt.cynefin}},Lc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Lc(e[i],"")]:[...r,t+i],[]),"keyify"),Iy=new Set(Lc(vc,"")),Fc=vc,Ry={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},qy=f((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))&&(q.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),_s=f(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>_s(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Iy.has(t)||e[t]==null){q.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Ry[t];i?qy(e[t],i):(q.debug("sanitizing object",t),_s(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=Ac(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]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),Ac=f(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"),ri=Object.freeze(Fc),Ie=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ce=Kt({},ri),Bs,gr=[],Oi=Kt({},ri),Vi=f((e,t)=>{let r=Kt({},e),i={};for(const s of t)$c(s),i=Kt(i,s);if(r=Kt(r,i),i.theme&&i.theme in He){const s=Kt({},Bs),a=Kt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in He&&(r.themeVariables=He[r.theme].getThemeVariables(a))}return Oi=r,Yy(Oi),Oi},"updateCurrentConfig"),Ny=f(e=>(ce=Kt({},ri),ce=Kt(ce,e),e.theme&&He[e.theme]&&(ce.themeVariables=He[e.theme].getThemeVariables(e.themeVariables)),Vi(ce,gr),ce),"setSiteConfig"),Wy=f(e=>{Bs=Kt({},e)},"saveConfigFromInitialize"),zy=f(e=>(ce=Kt(ce,e),Vi(ce,gr),ce),"updateSiteConfig"),Mc=f(()=>Kt({},ce),"getSiteConfig"),Ec=f(e=>(Vi(Oi,[e]),jt()),"setConfig"),jt=f(()=>Kt({},Oi),"getConfig"),$c=f(e=>{e&&(["secure",...ce.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.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"&&$c(e[t])}))},"sanitize"),Hy=f(e=>{var t;_s(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gr.push(e),Vi(ce,gr)},"addDirective"),vs=f((e=ce)=>{gr=[],Vi(e,gr)},"reset"),jy={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."},hl={},Oc=f(e=>{hl[e]||(q.warn(jy[e]),hl[e]=!0)},"issueWarning"),Yy=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Oc("LAZY_LOAD_DEPRECATED")},"checkConfig"),CL=f(()=>{let e={};Bs&&(e=Kt(e,Bs));for(const t of gr)e=Kt(e,t);return e},"getUserDefinedConfig"),oe=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Oc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ie(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Pc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Pi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Uy=/\s*%%.*\n/gm,Kr,Dc=(Kr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Kr,"UnknownDiagramError"),Kr),fr={},Ho=f(function(e,t){e=e.replace(Pc,"").replace(Pi,"").replace(Uy,`
3
+ `);for(const[r,{detector:i}]of Object.entries(fr))if(i(e,t))return r;throw new Dc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),oo=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ic(t,r,i)},"registerLazyLoadedDiagrams"),Ic=f((e,t,r)=>{fr[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),fr[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Gy=f(e=>fr[e].loader,"getDiagramLoader"),Zi=/<br\s*\/?>/gi,Xy=f(e=>e?Nc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Vy=(()=>{let e=!1;return()=>{e||(Rc(),e=!0)}})();function Rc(){const e="data-temp-href-target";ei.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ei.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"))})}f(Rc,"setupDompurifyHooks");var qc=f(e=>(Vy(),ei.sanitize(e)),"removeScript"),cl=f((e,t)=>{if(oe(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=qc(e):r!=="loose"&&(e=Nc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Jy(e))}return e},"sanitizeMore"),pe=f((e,t)=>e&&(t.dompurifyConfig?e=ei.sanitize(cl(e,t),t.dompurifyConfig).toString():e=ei.sanitize(cl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Zy=f((e,t)=>typeof e=="string"?pe(e,t):e.flat().map(r=>pe(r,t)),"sanitizeTextOrArray"),Ky=f(e=>Zi.test(e),"hasBreaks"),Qy=f(e=>e.split(Zi),"splitBreaks"),Jy=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Nc=f(e=>e.replace(Zi,"#br#"),"breakToPlaceholder"),tm=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),em=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),rm=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ul=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],n=t[i+1];im(a,n)&&(s=a+","+n,i++,r.pop())}r.push(sm(s))}return r.join("")},"parseGenericTypes"),no=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),im=f((e,t)=>{const r=no(e,"~"),i=no(t,"~");return r===1&&i===1},"shouldCombineSets"),sm=f(e=>{const t=no(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"),dl=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),lo=/\$\$(.*?)\$\$/g,Wi=f(e=>{var t;return(((t=e.match(lo))==null?void 0:t.length)??0)>0},"hasKatex"),xL=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Wc(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"),am=f(async(e,t)=>{if(!Wi(e))return e;if(!(dl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(lo,"MathML is unsupported in this environment.");{const{default:r}=await At(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!dl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Zi).map(s=>Wi(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(lo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Wc=f(async(e,t)=>pe(await am(e,t),t),"renderKatexSanitized"),Ki={getRows:Xy,sanitizeText:pe,sanitizeTextOrArray:Zy,hasBreaks:Ky,splitBreaks:Qy,lineBreakRegex:Zi,removeScript:qc,getUrl:tm,evaluate:Ie,getMax:em,getMin:rm},om=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),nm=f(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"),zc=f(function(e,t,r,i){const s=nm(t,r,i);om(e,s)},"configureSvgSize"),lm=f(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;q.info(`SVG bounds: ${a}x${n}`,s);let o=0,l=0;q.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=n+r*2,q.info(`Calculated bounds: ${o}x${l}`),zc(t,l,o,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ms={};function ho(e){return[...e.cssRules].map(t=>t.cssText).join(`
4
+ `)}f(ho,"cssStyleSheetToString");var hm=f((e,t,r,i)=>{let s="";return e in ms&&ms[e]?s=ms[e]({...r,svgId:i}):q.warn(`No theme found for ${e}`),`& {
5
+ font-family: ${r.fontFamily};
6
+ font-size: ${r.fontSize};
7
+ fill: ${r.textColor}
8
+ }
9
+ @keyframes edge-animation-frame {
10
+ from {
11
+ stroke-dashoffset: 0;
12
+ }
13
+ }
14
+ @keyframes dash {
15
+ to {
16
+ stroke-dashoffset: 0;
17
+ }
18
+ }
19
+ & .edge-animation-slow {
20
+ stroke-dasharray: 9,5 !important;
21
+ stroke-dashoffset: 900;
22
+ animation: dash 50s linear infinite;
23
+ stroke-linecap: round;
24
+ }
25
+ & .edge-animation-fast {
26
+ stroke-dasharray: 9,5 !important;
27
+ stroke-dashoffset: 900;
28
+ animation: dash 20s linear infinite;
29
+ stroke-linecap: round;
30
+ }
31
+ /* Classes common for multiple diagrams */
32
+
33
+ & .error-icon {
34
+ fill: ${r.errorBkgColor};
35
+ }
36
+ & .error-text {
37
+ fill: ${r.errorTextColor};
38
+ stroke: ${r.errorTextColor};
39
+ }
40
+
41
+ & .edge-thickness-normal {
42
+ stroke-width: ${r.strokeWidth??1}px;
43
+ }
44
+ & .edge-thickness-thick {
45
+ stroke-width: 3.5px
46
+ }
47
+ & .edge-pattern-solid {
48
+ stroke-dasharray: 0;
49
+ }
50
+ & .edge-thickness-invisible {
51
+ stroke-width: 0;
52
+ fill: none;
53
+ }
54
+ & .edge-pattern-dashed{
55
+ stroke-dasharray: 3;
56
+ }
57
+ .edge-pattern-dotted {
58
+ stroke-dasharray: 2;
59
+ }
60
+
61
+ & .marker {
62
+ fill: ${r.lineColor};
63
+ stroke: ${r.lineColor};
64
+ }
65
+ & .marker.cross {
66
+ stroke: ${r.lineColor};
67
+ }
68
+
69
+ & svg {
70
+ font-family: ${r.fontFamily};
71
+ font-size: ${r.fontSize};
72
+ }
73
+ & p {
74
+ margin: 0
75
+ }
76
+
77
+ ${s}
78
+ .node .neo-node {
79
+ stroke: ${r.nodeBorder};
80
+ }
81
+
82
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
83
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
84
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
85
+ }
86
+ [data-look="neo"].swimlane.cluster rect {
87
+ filter: none;
88
+ }
89
+
90
+
91
+ [data-look="neo"].node path {
92
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
93
+ stroke-width: ${r.strokeWidth??1}px;
94
+ }
95
+
96
+ [data-look="neo"].node .outer-path {
97
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
98
+ }
99
+
100
+ [data-look="neo"].node .neo-line path {
101
+ stroke: ${r.nodeBorder};
102
+ filter: none;
103
+ }
104
+
105
+ [data-look="neo"].node circle{
106
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
107
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
108
+ }
109
+
110
+ [data-look="neo"].node circle .state-start{
111
+ fill: #000000;
112
+ }
113
+
114
+ [data-look="neo"].icon-shape .icon {
115
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
116
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
117
+ }
118
+
119
+ [data-look="neo"].icon-shape .icon-neo path {
120
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
121
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
122
+ }
123
+
124
+ ${t}
125
+ `},"getStyles"),cm=f((e,t)=>{t!==void 0&&(ms[e]=t)},"addStylesForDiagram"),um=hm,Hc={};iy(Hc,{clear:()=>dm,getAccDescription:()=>ym,getAccTitle:()=>fm,getDiagramTitle:()=>Cm,setAccDescription:()=>pm,setAccTitle:()=>gm,setDiagramTitle:()=>mm});var jo="",Yo="",Uo="",Go=f(e=>pe(e,jt()),"sanitizeText"),dm=f(()=>{jo="",Uo="",Yo=""},"clear"),gm=f(e=>{jo=Go(e).replace(/^\s+/g,"")},"setAccTitle"),fm=f(()=>jo,"getAccTitle"),pm=f(e=>{Uo=Go(e).replace(/\n\s+/g,`
126
+ `)},"setAccDescription"),ym=f(()=>Uo,"getAccDescription"),mm=f(e=>{Yo=Go(e)},"setDiagramTitle"),Cm=f(()=>Yo,"getDiagramTitle"),gl=q,xm=zo,$t=jt,bL=Ec,kL=ri,Xo=f(e=>pe(e,$t()),"sanitizeText"),bm=lm,km=f(()=>Hc,"getCommonDb"),Ls={},Fs=f((e,t,r)=>{var i;Ls[e]&&gl.warn(`Diagram with id ${e} already registered. Overwriting.`),Ls[e]=t,r&&Ic(e,r),cm(e,t.styles),(i=t.injectUtils)==null||i.call(t,gl,xm,$t,Xo,bm,km(),()=>{})},"registerDiagram"),co=f(e=>{if(e in Ls)return Ls[e];throw new wm(e)},"getDiagram"),Qr,wm=(Qr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(Qr,"DiagramNotFoundError"),Qr),uo="http://www.w3.org/1999/xhtml",fl={svg:"http://www.w3.org/2000/svg",xhtml:uo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),fl.hasOwnProperty(t)?{space:fl[t],local:e}:e}function Sm(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===uo&&t.documentElement.namespaceURI===uo?t.createElement(e):t.createElementNS(r,e)}}function Tm(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yc(e){var t=jc(e);return(t.local?Tm:Sm)(t)}function _m(){}function Uc(e){return e==null?_m:function(){return this.querySelector(e)}}function Bm(e){typeof e!="function"&&(e=Uc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=new Array(n),l,c,h=0;h<n;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new ye(i,this._parents)}function vm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Lm(){return[]}function Fm(e){return e==null?Lm:function(){return this.querySelectorAll(e)}}function Am(e){return function(){return vm(e.apply(this,arguments))}}function Mm(e){typeof e=="function"?e=Am(e):e=Fm(e);for(var t=this._groups,r=t.length,i=[],s=[],a=0;a<r;++a)for(var n=t[a],o=n.length,l,c=0;c<o;++c)(l=n[c])&&(i.push(e.call(l,l.__data__,c,n)),s.push(l));return new ye(i,s)}function Em(e){return function(){return this.matches(e)}}function Gc(e){return function(t){return t.matches(e)}}var $m=Array.prototype.find;function Om(e){return function(){return $m.call(this.children,e)}}function Pm(){return this.firstElementChild}function Dm(e){return this.select(e==null?Pm:Om(typeof e=="function"?e:Gc(e)))}var Im=Array.prototype.filter;function Rm(){return Array.from(this.children)}function qm(e){return function(){return Im.call(this.children,e)}}function Nm(e){return this.selectAll(e==null?Rm:qm(typeof e=="function"?e:Gc(e)))}function Wm(e){typeof e!="function"&&(e=Em(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var a=t[s],n=a.length,o=i[s]=[],l,c=0;c<n;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new ye(i,this._parents)}function Xc(e){return new Array(e.length)}function zm(){return new ye(this._enter||this._groups.map(Xc),this._parents)}function As(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}As.prototype={constructor:As,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 Hm(e){return function(){return e}}function jm(e,t,r,i,s,a){for(var n=0,o,l=t.length,c=a.length;n<c;++n)(o=t[n])?(o.__data__=a[n],i[n]=o):r[n]=new As(e,a[n]);for(;n<l;++n)(o=t[n])&&(s[n]=o)}function Ym(e,t,r,i,s,a,n){var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),g;for(o=0;o<h;++o)(l=t[o])&&(d[o]=g=n.call(l,l.__data__,o,t)+"",c.has(g)?s[o]=l:c.set(g,l));for(o=0;o<u;++o)g=n.call(e,a[o],o,a)+"",(l=c.get(g))?(i[o]=l,l.__data__=a[o],c.delete(g)):r[o]=new As(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(d[o])===l&&(s[o]=l)}function Um(e){return e.__data__}function Gm(e,t){if(!arguments.length)return Array.from(this,Um);var r=t?Ym:jm,i=this._parents,s=this._groups;typeof e!="function"&&(e=Hm(e));for(var a=s.length,n=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=s[c],d=u.length,g=Xm(e.call(h,h&&h.__data__,c,i)),p=g.length,m=o[c]=new Array(p),x=n[c]=new Array(p),C=l[c]=new Array(d);r(h,u,m,x,C,g,t);for(var b=0,w=0,T,_;b<p;++b)if(T=m[b]){for(b>=w&&(w=b+1);!(_=x[w])&&++w<p;);T._next=_||null}}return n=new ye(n,i),n._enter=o,n._exit=l,n}function Xm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Vm(){return new ye(this._exit||this._groups.map(Xc),this._parents)}function Zm(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 Km(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,a=i.length,n=Math.min(s,a),o=new Array(s),l=0;l<n;++l)for(var c=r[l],h=i[l],u=c.length,d=o[l]=new Array(u),g,p=0;p<u;++p)(g=c[p]||h[p])&&(d[p]=g);for(;l<s;++l)o[l]=r[l];return new ye(o,this._parents)}function Qm(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,a=i[s],n;--s>=0;)(n=i[s])&&(a&&n.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(n,a),a=n);return this}function Jm(e){e||(e=tC);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 n=r[a],o=n.length,l=s[a]=new Array(o),c,h=0;h<o;++h)(c=n[h])&&(l[h]=c);l.sort(t)}return new ye(s,this._parents).order()}function tC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function eC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function rC(){return Array.from(this)}function iC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var n=i[s];if(n)return n}return null}function sC(){let e=0;for(const t of this)++e;return e}function aC(){return!this.node()}function oC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,n=s.length,o;a<n;++a)(o=s[a])&&e.call(o,o.__data__,a,s);return this}function nC(e){return function(){this.removeAttribute(e)}}function lC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hC(e,t){return function(){this.setAttribute(e,t)}}function cC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function uC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function dC(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 gC(e,t){var r=jc(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?lC:nC:typeof t=="function"?r.local?dC:uC:r.local?cC:hC)(r,t))}function Vc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fC(e){return function(){this.style.removeProperty(e)}}function pC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function yC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function mC(e,t,r){return arguments.length>1?this.each((t==null?fC:typeof t=="function"?yC:pC)(e,t,r??"")):CC(this.node(),e)}function CC(e,t){return e.style.getPropertyValue(t)||Vc(e).getComputedStyle(e,null).getPropertyValue(t)}function xC(e){return function(){delete this[e]}}function bC(e,t){return function(){this[e]=t}}function kC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function wC(e,t){return arguments.length>1?this.each((t==null?xC:typeof t=="function"?kC:bC)(e,t)):this.node()[e]}function Zc(e){return e.trim().split(/^|\s+/)}function Vo(e){return e.classList||new Kc(e)}function Kc(e){this._node=e,this._names=Zc(e.getAttribute("class")||"")}Kc.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 Qc(e,t){for(var r=Vo(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Jc(e,t){for(var r=Vo(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function SC(e){return function(){Qc(this,e)}}function TC(e){return function(){Jc(this,e)}}function _C(e,t){return function(){(t.apply(this,arguments)?Qc:Jc)(this,e)}}function BC(e,t){var r=Zc(e+"");if(arguments.length<2){for(var i=Vo(this.node()),s=-1,a=r.length;++s<a;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?_C:t?SC:TC)(r,t))}function vC(){this.textContent=""}function LC(e){return function(){this.textContent=e}}function FC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function AC(e){return arguments.length?this.each(e==null?vC:(typeof e=="function"?FC:LC)(e)):this.node().textContent}function MC(){this.innerHTML=""}function EC(e){return function(){this.innerHTML=e}}function $C(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function OC(e){return arguments.length?this.each(e==null?MC:(typeof e=="function"?$C:EC)(e)):this.node().innerHTML}function PC(){this.nextSibling&&this.parentNode.appendChild(this)}function DC(){return this.each(PC)}function IC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function RC(){return this.each(IC)}function qC(e){var t=typeof e=="function"?e:Yc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function NC(){return null}function WC(e,t){var r=typeof e=="function"?e:Yc(e),i=t==null?NC:typeof t=="function"?t:Uc(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function zC(){var e=this.parentNode;e&&e.removeChild(this)}function HC(){return this.each(zC)}function jC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function YC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function UC(e){return this.select(e?YC:jC)}function GC(e){return arguments.length?this.property("__data__",e):this.node().__data__}function XC(e){return function(t){e.call(this,t,this.__data__)}}function VC(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 ZC(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 KC(e,t,r){return function(){var i=this.__on,s,a=XC(t);if(i){for(var n=0,o=i.length;n<o;++n)if((s=i[n]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=r),s.value=t;return}}this.addEventListener(e.type,a,r),s={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(s):this.__on=[s]}}function QC(e,t,r){var i=VC(e+""),s,a=i.length,n;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(s=0,h=o[l];s<a;++s)if((n=i[s]).type===h.type&&n.name===h.name)return h.value}return}for(o=t?KC:ZC,s=0;s<a;++s)this.each(o(i[s],t,r));return this}function tu(e,t,r){var i=Vc(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 JC(e,t){return function(){return tu(this,e,t)}}function t0(e,t){return function(){return tu(this,e,t.apply(this,arguments))}}function e0(e,t){return this.each((typeof t=="function"?t0:JC)(e,t))}function*r0(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,a=i.length,n;s<a;++s)(n=i[s])&&(yield n)}var i0=[null];function ye(e,t){this._groups=e,this._parents=t}function s0(){return this}ye.prototype={constructor:ye,select:Bm,selectAll:Mm,selectChild:Dm,selectChildren:Nm,filter:Wm,data:Gm,enter:zm,exit:Vm,join:Zm,merge:Km,selection:s0,order:Qm,sort:Jm,call:eC,nodes:rC,node:iC,size:sC,empty:aC,each:oC,attr:gC,style:mC,property:wC,classed:BC,text:AC,html:OC,raise:DC,lower:RC,append:qC,insert:WC,remove:HC,clone:UC,datum:GC,on:QC,dispatch:e0,[Symbol.iterator]:r0};function Ft(e){return typeof e=="string"?new ye([[document.querySelector(e)]],[document.documentElement]):new ye([[e]],i0)}var a0=0;function pl(){this._="@"+(++a0).toString(36)}pl.prototype={constructor:pl,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};const Bi=Math.PI,go=2*Bi,lr=1e-6,o0=go-lr;function eu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function n0(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return eu;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]}}function ru(e,t,r,i){return e===r&&t===i}function l0(e){const t=Math.floor(e);if(!(t<=15))return ru;const r=10**t,i=function(s){return Math.round(s*r)};return function(s,a,n,o){return i(s)===i(n)&&i(a)===i(o)}}class h0{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?eu:n0(t),this._equal=t==null?ru:l0(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,a,n){this._append`C${+t},${+r},${+i},${+s},${this._x1=+a},${this._y1=+n}`}arcTo(t,r,i,s,a){if(t=+t,r=+r,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let n=this._x1,o=this._y1,l=i-t,c=s-r,h=n-t,u=o-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>lr)if(!(Math.abs(u*l-c*h)>lr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=i-n,p=s-o,m=l*l+c*c,x=g*g+p*p,C=Math.sqrt(m),b=Math.sqrt(d),w=a*Math.tan((Bi-Math.acos((m+d-x)/(2*C*b)))/2),T=w/b,_=w/C;Math.abs(T-1)>lr&&this._append`L${t+T*h},${r+T*u}`,this._append`A${a},${a},0,0,${+(u*g>h*p)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,s,a,n){if(t=+t,r=+r,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(s),l=i*Math.sin(s),c=t+o,h=r+l,u=1^n,d=n?s-a:a-s;if(this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>lr||Math.abs(this._y1-h)>lr)&&this._append`L${c},${h}`,!!i){if(d<0&&(d=d%go+go),d>o0)this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`;else if(d>lr){const g=t+i*Math.cos(a),p=r+i*Math.sin(a);if(d>=Bi&&this._equal(c,h,g,p)){d/=2;let m=s+d;this._append`A${i},${i},0,${+(d>=Bi)},${u},${t+i*Math.cos(m)},${r+i*Math.sin(m)}`}this._append`A${i},${i},0,${+(d>=Bi)},${u},${this._x1=g},${this._y1=p}`}}}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 Gt(e){return function(){return e}}const yl=Math.abs,te=Math.atan2,sr=Math.cos,c0=Math.max,ya=Math.min,ve=Math.sin,Pr=Math.sqrt,ie=1e-12,zi=Math.PI,Ms=zi/2,Cs=2*zi;function u0(e){return e>1?0:e<-1?zi:Math.acos(e)}function ml(e){return e>=1?Ms:e<=-1?-Ms:Math.asin(e)}function iu(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 h0(t)}function d0(e){return e.innerRadius}function g0(e){return e.outerRadius}function f0(e){return e.startAngle}function p0(e){return e.endAngle}function y0(e){return e&&e.padAngle}function m0(e,t,r,i,s,a,n,o){var l=r-e,c=i-t,h=n-s,u=o-a,d=u*l-h*c;if(!(d*d<ie))return d=(h*(t-a)-u*(e-s))/d,[e+d*l,t+d*c]}function rs(e,t,r,i,s,a,n){var o=e-r,l=t-i,c=(n?a:-a)/Pr(o*o+l*l),h=c*l,u=-c*o,d=e+h,g=t+u,p=r+h,m=i+u,x=(d+p)/2,C=(g+m)/2,b=p-d,w=m-g,T=b*b+w*w,_=s-a,v=d*m-p*g,A=(w<0?-1:1)*Pr(c0(0,_*_*T-v*v)),L=(v*w-b*A)/T,Y=(-v*b-w*A)/T,N=(v*w+b*A)/T,I=(-v*b+w*A)/T,Q=L-x,M=Y-C,F=N-x,E=I-C;return Q*Q+M*M>F*F+E*E&&(L=N,Y=I),{cx:L,cy:Y,x01:-h,y01:-u,x11:L*(s/_-1),y11:Y*(s/_-1)}}function wL(){var e=d0,t=g0,r=Gt(0),i=null,s=f0,a=p0,n=y0,o=null,l=iu(c);function c(){var h,u,d=+e.apply(this,arguments),g=+t.apply(this,arguments),p=s.apply(this,arguments)-Ms,m=a.apply(this,arguments)-Ms,x=yl(m-p),C=m>p;if(o||(o=h=l()),g<d&&(u=g,g=d,d=u),!(g>ie))o.moveTo(0,0);else if(x>Cs-ie)o.moveTo(g*sr(p),g*ve(p)),o.arc(0,0,g,p,m,!C),d>ie&&(o.moveTo(d*sr(m),d*ve(m)),o.arc(0,0,d,m,p,C));else{var b=p,w=m,T=p,_=m,v=x,A=x,L=n.apply(this,arguments)/2,Y=L>ie&&(i?+i.apply(this,arguments):Pr(d*d+g*g)),N=ya(yl(g-d)/2,+r.apply(this,arguments)),I=N,Q=N,M,F;if(Y>ie){var E=ml(Y/d*ve(L)),B=ml(Y/g*ve(L));(v-=E*2)>ie?(E*=C?1:-1,T+=E,_-=E):(v=0,T=_=(p+m)/2),(A-=B*2)>ie?(B*=C?1:-1,b+=B,w-=B):(A=0,b=w=(p+m)/2)}var P=g*sr(b),O=g*ve(b),W=d*sr(_),X=d*ve(_);if(N>ie){var at=g*sr(w),ot=g*ve(w),gt=d*sr(T),yt=d*ve(T),nt;if(x<zi)if(nt=m0(P,O,gt,yt,at,ot,W,X)){var St=P-nt[0],kt=O-nt[1],Mt=at-nt[0],bt=ot-nt[1],it=1/ve(u0((St*Mt+kt*bt)/(Pr(St*St+kt*kt)*Pr(Mt*Mt+bt*bt)))/2),ht=Pr(nt[0]*nt[0]+nt[1]*nt[1]);I=ya(N,(d-ht)/(it-1)),Q=ya(N,(g-ht)/(it+1))}else I=Q=0}A>ie?Q>ie?(M=rs(gt,yt,P,O,g,Q,C),F=rs(at,ot,W,X,g,Q,C),o.moveTo(M.cx+M.x01,M.cy+M.y01),Q<N?o.arc(M.cx,M.cy,Q,te(M.y01,M.x01),te(F.y01,F.x01),!C):(o.arc(M.cx,M.cy,Q,te(M.y01,M.x01),te(M.y11,M.x11),!C),o.arc(0,0,g,te(M.cy+M.y11,M.cx+M.x11),te(F.cy+F.y11,F.cx+F.x11),!C),o.arc(F.cx,F.cy,Q,te(F.y11,F.x11),te(F.y01,F.x01),!C))):(o.moveTo(P,O),o.arc(0,0,g,b,w,!C)):o.moveTo(P,O),!(d>ie)||!(v>ie)?o.lineTo(W,X):I>ie?(M=rs(W,X,at,ot,d,-I,C),F=rs(P,O,gt,yt,d,-I,C),o.lineTo(M.cx+M.x01,M.cy+M.y01),I<N?o.arc(M.cx,M.cy,I,te(M.y01,M.x01),te(F.y01,F.x01),!C):(o.arc(M.cx,M.cy,I,te(M.y01,M.x01),te(M.y11,M.x11),!C),o.arc(0,0,d,te(M.cy+M.y11,M.cx+M.x11),te(F.cy+F.y11,F.cx+F.x11),C),o.arc(F.cx,F.cy,I,te(F.y11,F.x11),te(F.y01,F.x01),!C))):o.arc(0,0,d,_,T,C)}if(o.closePath(),h)return o=null,h+""||null}return c.centroid=function(){var h=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+s.apply(this,arguments)+ +a.apply(this,arguments))/2-zi/2;return[sr(u)*h,ve(u)*h]},c.innerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:Gt(+h),c):e},c.outerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:Gt(+h),c):t},c.cornerRadius=function(h){return arguments.length?(r=typeof h=="function"?h:Gt(+h),c):r},c.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:Gt(+h),c):i},c.startAngle=function(h){return arguments.length?(s=typeof h=="function"?h:Gt(+h),c):s},c.endAngle=function(h){return arguments.length?(a=typeof h=="function"?h:Gt(+h),c):a},c.padAngle=function(h){return arguments.length?(n=typeof h=="function"?h:Gt(+h),c):n},c.context=function(h){return arguments.length?(o=h??null,c):o},c}function su(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function au(e){this._context=e}au.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 Di(e){return new au(e)}function C0(e){return e[0]}function x0(e){return e[1]}function b0(e,t){var r=Gt(!0),i=null,s=Di,a=null,n=iu(o);e=typeof e=="function"?e:e===void 0?C0:Gt(e),t=typeof t=="function"?t:t===void 0?x0:Gt(t);function o(l){var c,h=(l=su(l)).length,u,d=!1,g;for(i==null&&(a=s(g=n())),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(g)return a=null,g+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Gt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Gt(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Gt(!!l),o):r},o.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),o):s},o.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),o):i},o}function k0(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function w0(e){return e}function SL(){var e=w0,t=k0,r=null,i=Gt(0),s=Gt(Cs),a=Gt(0);function n(o){var l,c=(o=su(o)).length,h,u,d=0,g=new Array(c),p=new Array(c),m=+i.apply(this,arguments),x=Math.min(Cs,Math.max(-Cs,s.apply(this,arguments)-m)),C,b=Math.min(Math.abs(x)/c,a.apply(this,arguments)),w=b*(x<0?-1:1),T;for(l=0;l<c;++l)(T=p[g[l]=l]=+e(o[l],l,o))>0&&(d+=T);for(t!=null?g.sort(function(_,v){return t(p[_],p[v])}):r!=null&&g.sort(function(_,v){return r(o[_],o[v])}),l=0,u=d?(x-c*w)/d:0;l<c;++l,m=C)h=g[l],T=p[h],C=m+(T>0?T*u:0)+w,p[h]={data:o[h],index:l,value:T,startAngle:m,endAngle:C,padAngle:b};return p}return n.value=function(o){return arguments.length?(e=typeof o=="function"?o:Gt(+o),n):e},n.sortValues=function(o){return arguments.length?(t=o,r=null,n):t},n.sort=function(o){return arguments.length?(r=o,t=null,n):r},n.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Gt(+o),n):i},n.endAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Gt(+o),n):s},n.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Gt(+o),n):a},n}class ou{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 nu(e){return new ou(e,!0)}function lu(e){return new ou(e,!1)}function tr(){}function Es(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 Vs(e){this._context=e}Vs.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:Es(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:Es(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fo(e){return new Vs(e)}function hu(e){this._context=e}hu.prototype={areaStart:tr,areaEnd:tr,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:Es(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S0(e){return new hu(e)}function cu(e){this._context=e}cu.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:Es(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function T0(e){return new cu(e)}function uu(e,t){this._basis=new Vs(e),this._beta=t}uu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(s+l*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var _0=(function e(t){function r(i){return t===1?new Vs(i):new uu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function $s(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 Zo(e,t){this._context=e,this._k=(1-t)/6}Zo.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:$s(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:$s(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}};var du=(function e(t){function r(i){return new Zo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ko(e,t){this._context=e,this._k=(1-t)/6}Ko.prototype={areaStart:tr,areaEnd:tr,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:$s(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}};var B0=(function e(t){function r(i){return new Ko(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Qo(e,t){this._context=e,this._k=(1-t)/6}Qo.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:$s(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}};var v0=(function e(t){function r(i){return new Qo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Jo(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>ie){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ie){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,n=(n*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function gu(e,t){this._context=e,this._alpha=t}gu.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:Jo(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}};var fu=(function e(t){function r(i){return t?new gu(i,t):new Zo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function pu(e,t){this._context=e,this._alpha=t}pu.prototype={areaStart:tr,areaEnd:tr,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:Jo(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}};var L0=(function e(t){function r(i){return t?new pu(i,t):new Ko(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function yu(e,t){this._context=e,this._alpha=t}yu.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:Jo(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}};var F0=(function e(t){function r(i){return t?new yu(i,t):new Qo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function mu(e){this._context=e}mu.prototype={areaStart:tr,areaEnd:tr,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 A0(e){return new mu(e)}function Cl(e){return e<0?-1:1}function xl(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),n=(r-e._y1)/(s||i<0&&-0),o=(a*s+n*i)/(i+s);return(Cl(a)+Cl(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(o))||0}function bl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ma(e,t,r){var i=e._x0,s=e._y0,a=e._x1,n=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,s+o*t,a-o,n-o*r,a,n)}function Os(e){this._context=e}Os.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:ma(this,this._t0,bl(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,ma(this,bl(this,r=xl(this,e,t)),r);break;default:ma(this,this._t0,r=xl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Cu(e){this._context=new xu(e)}(Cu.prototype=Object.create(Os.prototype)).point=function(e,t){Os.prototype.point.call(this,t,e)};function xu(e){this._context=e}xu.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 bu(e){return new Os(e)}function ku(e){return new Cu(e)}function wu(e){this._context=e}wu.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=kl(e),s=kl(t),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[n],t[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function kl(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),n=new Array(r);for(s[0]=0,a[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,n[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,n[t]-=i*n[t-1];for(s[r-1]=n[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(n[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function Su(e){return new wu(e)}function Zs(e,t){this._context=e,this._t=t}Zs.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 Tu(e){return new Zs(e,.5)}function _u(e){return new Zs(e,0)}function Bu(e){return new Zs(e,1)}var M0=f(e=>{var s;const{securityLevel:t}=$t();let r=Ft("body");if(t==="sandbox"){const n=((s=Ft(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Ft(n.body)}return r.select(`#${e}`)},"selectSvgElement"),E0=f(e=>{const{handDrawnSeed:t}=$t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),$0=f(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),oi=f(e=>{const t=O0([...e.cssCompiledStyles||[],...e.cssStyles||[],...$0(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),O0=f(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"),vu=f(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"),ft=f(e=>{const{stylesArray:t}=oi(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];vu(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),lt=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=$t(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=oi(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:n.get("stroke")||s,seed:i,strokeWidth:((l=n.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:P0(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),P0=f(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 D0=Object.freeze({left:0,top:0,width:16,height:16}),Ps=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Lu=Object.freeze({...D0,...Ps}),I0=Object.freeze({...Lu,body:"",hidden:!1}),R0=Object.freeze({width:null,height:null}),q0=Object.freeze({...R0,...Ps}),N0=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const o=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:o};return Ca(c)?c:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return Ca(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return Ca(o,r)?o:null}return null},Ca=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function W0(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 wl(e,t){const r=W0(e,t);for(const i in I0)i in Ps?i in e&&!(i in r)&&(r[i]=Ps[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function z0(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,l=o&&a(o);l&&(s[n]=[o].concat(l))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Sl(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=wl(i[o]||s[o],a)}return n(t),r.forEach(n),wl(e,a)}function H0(e,t){if(e.icons[t])return Sl(e,t,[]);const r=z0(e,[t])[t];return r?Sl(e,t,r):null}const j0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Y0=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Tl(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(j0);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=Y0.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function U0(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function G0(e,t){return e?"<defs>"+e+"</defs>"+t:t}function X0(e,t,r){const i=U0(e);return G0(i.defs,t+i.content+r)}const V0=e=>e==="unset"||e==="undefined"||e==="none";function Z0(e,t){const r={...Lu,...e},i={...q0,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const x=[],C=m.hFlip,b=m.vFlip;let w=m.rotate;C?b?w+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):b&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.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,x.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,x.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")")}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)),x.length&&(a=X0(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,l=s.width,c=s.height;let h,u;n===null?(u=o===null?"1em":o==="auto"?c:o,h=Tl(u,l/c)):(h=n==="auto"?l:n,u=o===null?Tl(h,c/l):o==="auto"?c:o);const d={},g=(m,x)=>{V0(x)||(d[m]=x.toString())};g("width",h),g("height",u);const p=[s.left,s.top,l,c];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:a}}const K0=/\sid="(\S+)"/g,_l=new Map;function Q0(e){e=e.replace(/[0-9]+$/,"")||"a";const t=_l.get(e)||0;return _l.set(e,t+1),t?`${e}${t}`:e}function J0(e){const t=[];let r;for(;r=K0.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=Q0(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function tx(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 ex={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},po=new Map,Fu=new Map,rx=f(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(q.debug("Registering icon pack:",t.name),"loader"in t)Fu.set(t.name,t.loader);else if("icons"in t)po.set(t.name,t.icons);else throw q.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Au=f(async(e,t)=>{const r=N0(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=po.get(i);if(!s){const n=Fu.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},po.set(i,s)}catch(o){throw q.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=H0(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),ix=f(async e=>{try{return await Au(e),!0}catch{return!1}},"isIconAvailable"),Qi=f(async(e,t,r)=>{let i;try{i=await Au(e,t==null?void 0:t.fallbackPrefix)}catch(n){q.error(n),i=ex}const s=Z0(i,t),a=tx(J0(s.body),{...s.attributes,...r});return pe(a,jt())},"getIconSVG"),is={},Zt={},Bl;function sx(){return Bl||(Bl=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.BLANK_URL=Zt.relativeFirstCharacters=Zt.whitespaceEscapeCharsRegex=Zt.urlSchemeRegex=Zt.ctrlCharactersRegex=Zt.htmlCtrlEntityRegex=Zt.htmlEntitiesRegex=Zt.invalidProtocolRegex=void 0,Zt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Zt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Zt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Zt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Zt.urlSchemeRegex=/^.+(:|&colon;)/gim,Zt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Zt.relativeFirstCharacters=[".","/"],Zt.BLANK_URL="about:blank"),Zt}var vl;function ax(){if(vl)return is;vl=1,Object.defineProperty(is,"__esModule",{value:!0}),is.sanitizeUrl=a;var e=sx();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,l=s(n.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var g=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return g;if(d==="http:"||d==="https:"){if(!i(g))return e.BLANK_URL;var p=new URL(g);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return g}return is}var ox=ax();function xa(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){var t;const i=e[Symbol.toStringTag];return i==null||!(!((t=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))===null||t===void 0)&&t.writable)?!1:e.toString()===`[object ${i}]`}let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function nx(e){return Number.isSafeInteger(e)&&e>=0}function Mu(e){return e!=null&&typeof e!="function"&&nx(e.length)}function lx(e){return e==="__proto__"}const hx=Object.prototype.hasOwnProperty;function Ll(e,t){return hx.call(e,t)}function tn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Eu(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const cx="[object RegExp]",$u="[object String]",Ou="[object Number]",Pu="[object Boolean]",Du="[object Arguments]",ux="[object Symbol]",dx="[object Date]",gx="[object Map]",fx="[object Set]",px="[object Array]",yx="[object ArrayBuffer]",mx="[object Object]",Cx="[object DataView]",xx="[object Uint8Array]",bx="[object Uint8ClampedArray]",kx="[object Uint16Array]",wx="[object Uint32Array]",Sx="[object Int8Array]",Tx="[object Int16Array]",_x="[object Int32Array]",Bx="[object Float32Array]",vx="[object Float64Array]",Fl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function en(e){return typeof Fl.Buffer<"u"&&Fl.Buffer.isBuffer(e)}function Lx(e){return en(e)}function Iu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ii(e){return Iu(e)}function Ru(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Fx(e,t){return Dr(e,void 0,e,new Map)}function Dr(e,t,r,i,s){if(tn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const n=new Array(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=Dr(e[o],o,r,i);return Ll(e,"index")&&(n.index=e.index),Ll(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;return i.set(e,n),e.forEach((o,l)=>{n.set(l,Dr(o,l,r,i))}),n}if(e instanceof Set){const n=new Set;return i.set(e,n),e.forEach(o=>{n.add(Dr(o,void 0,r,i))}),n}if(Lx(e))return e.subarray();if(Ii(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=Dr(e[o],o,r,i);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,n),Lr(n,e,r,i),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return i.set(e,n),Lr(n,e,r,i),n}if(typeof Blob<"u"&&e instanceof Blob){const n=new Blob([e],{type:e.type});return i.set(e,n),Lr(n,e,r,i),n}const a=Eu(e);if(a==="[object Error]")return e===r?{}:e;switch(a){case Ou:case $u:case Pu:{const n=new e.constructor(e.valueOf());return i.set(e,n),Lr(n,e,r,i),n}case Du:{const n={};return i.set(e,n),Lr(n,e,r,i),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}}if(typeof e=="object"&&Ax(a)){const n=a==="[object Object]"&&typeof e.constructor!="function"?{}:Object.create(Object.getPrototypeOf(e));return i.set(e,n),Lr(n,e,r,i),n}return e}function Lr(e,t,r,i,s){const a=[...Object.keys(t),...Ru(t)];for(let n=0;n<a.length;n++){const o=a[n],l=Object.getOwnPropertyDescriptor(e,o);(l==null||l.writable)&&(e[o]=Dr(t[o],o,r,i))}}function Ax(e){switch(e){case Du:case px:case yx:case Cx:case Pu:case dx:case Bx:case vx:case Sx:case Tx:case _x:case gx:case Ou:case mx:case cx:case fx:case $u:case ux:case xx:case bx:case kx:case wx:return!0;default:return!1}}function Al(e){return Fx(e)}function yo(e){return e!==null&&typeof e=="object"&&Eu(e)==="[object Arguments]"}function mo(e){return typeof e=="object"&&e!==null}function Mx(e){return mo(e)&&Mu(e)}function Ex(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Ji(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 n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(Ji.Cache||Map),r}Ji.Cache=Map;function $x(e){if(tn(e))return e;if(Array.isArray(e)||Iu(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 typeof AggregateError<"u"&&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}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){const i=Object.create(t);return Object.assign(i,e)}return e}function Ox(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 n=r[a];s=xs(s,n,i,new Map)}return s}function xs(e,t,r,i){if(tn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return $x(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),...Ru(t)];for(let a=0;a<s.length;a++){const n=s[a];if(lx(n))continue;let o=t[n],l=e[n];if(yo(o)&&(o=Object.assign({},o)),yo(l)&&(l=Object.assign({},l)),en(o)&&(o=Al(o)),Array.isArray(o))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let d=0;d<u.length;d++){const g=u[d];h[g]=l[g]}l=h}else if(Mx(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,o,n,e,t,i);c!==void 0?e[n]=c:Array.isArray(o)||mo(l)&&mo(o)&&(xa(l)||xa(o)||Ii(l)||Ii(o))?e[n]=xs(l,o,r,i):l==null&&xa(o)?e[n]=xs({},o,r,i):l==null&&Ii(o)?e[n]=Al(o):(l===void 0||o!==void 0)&&(e[n]=o)}return e}function Px(){}function Dx(e,...t){return Ox(e,...t,Px)}function Ml(e){if(e==null)return!0;if(Mu(e))return typeof e.splice!="function"&&typeof e!="string"&&!en(e)&&!Ii(e)&&!yo(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 Ex(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Ix="​",Rx={curveBasis:fo,curveBasisClosed:S0,curveBasisOpen:T0,curveBumpX:nu,curveBumpY:lu,curveBundle:_0,curveCardinalClosed:B0,curveCardinalOpen:v0,curveCardinal:du,curveCatmullRomClosed:L0,curveCatmullRomOpen:F0,curveCatmullRom:fu,curveLinear:Di,curveLinearClosed:A0,curveMonotoneX:bu,curveMonotoneY:ku,curveNatural:Su,curveStep:Tu,curveStepAfter:Bu,curveStepBefore:_u},qx=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Nx=f(function(e,t){const r=qu(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);_s(n),i=Kt(i,[...n])}else i=r.args;if(!i)return;let s=Ho(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),qu=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${qx.source})(?=[}][%]{2}).*
127
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),q.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=Pi.exec(e))!==null;)if(a.index===Pi.lastIndex&&Pi.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:l})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return q.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Wx=f(function(e){return e.replace(Pi,"")},"removeDirectives"),zx=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function rn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Rx[r]??t}f(rn,"interpolateToCurve");function Nu(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?ox.sanitizeUrl(r):r}f(Nu,"formatUrl");var Hx=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){q.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function sn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(sn,"distance");function Wu(e){let t,r=0;e.forEach(s=>{r+=sn(s,t),t=s});const i=r/2;return an(e,i)}f(Wu,"traverseEdge");function zu(e){return e.length===1?e[0]:Wu(e)}f(zu,"calcLabelPosition");var El=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),an=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=sn(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:El((1-n)*r.x+n*s.x,5),y:El((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),jx=f((e,t,r)=>{q.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=an(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function Hu(e,t,r){const i=structuredClone(r);q.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=an(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*n+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*n+(i[0].x+a.x)/2,l.y=-Math.cos(o)*n+(i[0].y+a.y)/2),l}f(Hu,"calcTerminalLabelPosition");function ju(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}}f(ju,"getStylesFromArray");var $l=0,Yx=f(()=>($l++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$l),"generateId");function Yu(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}f(Yu,"makeRandomHex");var Ux=f(e=>Yu(e.length),"random"),Gx=f(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"),Xx=f(function(e,t){const r=t.text.replace(Ki.lineBreakRegex," "),[,i]=Ks(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"),Vx=Ji((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ki.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const l=Ye(`${n} `,r),c=Ye(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:g}=Zx(n,t,"-",r);s.push(a,...d),a=g}else c+l>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Zx=Ji((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,l)=>{const c=`${n}${o}`;if(Ye(c,i)>=t){const u=l+1,d=s.length===u,g=`${c}${r}`;a.push(d?c:g),n=""}else n=c}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Uu(e,t){return on(e,t).height}f(Uu,"calculateTextHeight");function Ye(e,t){return on(e,t).width}f(Ye,"calculateTextWidth");var on=Ji((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Ks(r),n=["sans-serif",i],o=e.split(Ki.lineBreakRegex),l=[],c=Ft("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of n){let g=0;const p={width:0,height:0,lineHeight:0};for(const m of o){const x=Gx();x.text=m||Ix;const C=Xx(h,x).style("font-size",a).style("font-weight",s).style("font-family",d),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),g=Math.round(b.height),p.height+=g,p.lineHeight=Math.round(Math.max(p.lineHeight,g))}l.push(p)}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}`),Jr,Kx=(Jr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(Jr,"InitIDGenerator"),Jr),ss,Qx=f(function(e){return ss=ss||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ss.innerHTML=e,unescape(ss.textContent)},"entityDecode");function nn(e){return"str"in e}f(nn,"isDetailedError");var Jx=f((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"),Ks=f(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 ln(e,t){return Dx({},e,t)}f(ln,"cleanAndMerge");var ae={assignWithDepth:Kt,wrapLabel:Vx,calculateTextHeight:Uu,calculateTextWidth:Ye,calculateTextDimensions:on,cleanAndMerge:ln,detectInit:Nx,detectDirective:qu,isSubstringInArray:zx,interpolateToCurve:rn,calcLabelPosition:zu,calcCardinalityPosition:jx,calcTerminalLabelPosition:Hu,formatUrl:Nu,getStylesFromArray:ju,generateId:Yx,random:Ux,runFunc:Hx,entityDecode:Qx,insertTitle:Jx,isLabelCoordinateInPath:Gu,parseFontSize:Ks,InitIDGenerator:Kx},tb=f(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"),er=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),TL=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Vt(e){return e??null}f(Vt,"handleUndefinedAttr");function Gu(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())}f(Gu,"isLabelCoordinateInPath");var bs={exports:{}},Ol=bs.exports,Pl;function eb(){return Pl||(Pl=1,(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 o(this.reads,h)||o(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(n.bind(null,h)))}function n(h){var u=h.writes,d=h.reads,g;try{r("flushing reads",d.length),h.runTasks(d),r("flushing writes",u.length),h.runTasks(u)}catch(p){g=p}if(h.scheduled=!1,(d.length||u.length)&&a(h),g)if(r("task errored",g.message),h.catch)h.catch(g);else throw g}function o(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 Ol<"u"?Ol:globalThis)})(bs)),bs.exports}var rb=eb();const ib=Wo(rb);var ba={exports:{}},Dl;function sb(){return Dl||(Dl=1,(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,n){var o=i._tasks,l=i.fastdom,c,h=new Promise(function(u,d){c=l[s](function(){o.delete(h);try{u(n?a.call(n):a())}catch(g){d(g)}},n)});return o.set(h,c),h}e.exports=t})()})(ba)),ba.exports}var ab=sb();const ob=Wo(ab);function hn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var br=hn();function Xu(e){br=e}var Ri={exec:()=>null};function It(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(le.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var nb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),le={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")},lb=/^(?:[ \t]*(?:\n|$))+/,hb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ts=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ub=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,cn=/(?:[*+-]|\d{1,9}[.)])/,Vu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zu=It(Vu).replace(/bull/g,cn).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(),db=It(Vu).replace(/bull/g,cn).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(),un=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gb=/^[^\n]+/,dn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,fb=It(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",dn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pb=It(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,cn).getRegex(),Qs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,yb=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",gn).replace("tag",Qs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ku=It(un).replace("hr",ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qs).getRegex(),mb=It(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ku).getRegex(),fn={blockquote:mb,code:hb,def:fb,fences:cb,heading:ub,hr:ts,html:yb,lheading:Zu,list:pb,newline:lb,paragraph:Ku,table:Ri,text:gb},Il=It("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qs).getRegex(),Cb={...fn,lheading:db,table:Il,paragraph:It(un).replace("hr",ts).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Il).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qs).getRegex()},xb={...fn,html:It(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gn).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:Ri,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:It(un).replace("hr",ts).replace("heading",` *#{1,6} *[^
128
+ ]`).replace("lheading",Zu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},bb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qu=/^( {2,}|\\)\n(?!\s*$)/,wb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Js=/[\p{P}\p{S}]/u,pn=/[\s\p{P}\p{S}]/u,Ju=/[^\s\p{P}\p{S}]/u,Sb=It(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,pn).getRegex(),td=/(?!~)[\p{P}\p{S}]/u,Tb=/(?!~)[\s\p{P}\p{S}]/u,_b=/(?:[^\s\p{P}\p{S}]|~)/u,Bb=It(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",nb?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ed=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vb=It(ed,"u").replace(/punct/g,Js).getRegex(),Lb=It(ed,"u").replace(/punct/g,td).getRegex(),rd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Fb=It(rd,"gu").replace(/notPunctSpace/g,Ju).replace(/punctSpace/g,pn).replace(/punct/g,Js).getRegex(),Ab=It(rd,"gu").replace(/notPunctSpace/g,_b).replace(/punctSpace/g,Tb).replace(/punct/g,td).getRegex(),Mb=It("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ju).replace(/punctSpace/g,pn).replace(/punct/g,Js).getRegex(),Eb=It(/\\(punct)/,"gu").replace(/punct/g,Js).getRegex(),$b=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(),Ob=It(gn).replace("(?:-->|$)","-->").getRegex(),Pb=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",Ob).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Db=It(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),id=It(/^!?\[(label)\]\[(ref)\]/).replace("label",Ds).replace("ref",dn).getRegex(),sd=It(/^!?\[(ref)\](?:\[\])?/).replace("ref",dn).getRegex(),Ib=It("reflink|nolink(?!\\()","g").replace("reflink",id).replace("nolink",sd).getRegex(),Rl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yn={_backpedal:Ri,anyPunctuation:Eb,autolink:$b,blockSkip:Bb,br:Qu,code:kb,del:Ri,emStrongLDelim:vb,emStrongRDelimAst:Fb,emStrongRDelimUnd:Mb,escape:bb,link:Db,nolink:sd,punctuation:Sb,reflink:id,reflinkSearch:Ib,tag:Pb,text:wb,url:Ri},Rb={...yn,link:It(/^!?\[(label)\]\((.*?)\)/).replace("label",Ds).getRegex(),reflink:It(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ds).getRegex()},Co={...yn,emStrongRDelimAst:Ab,emStrongLDelim:Lb,url:It(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Rl).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",Rl).getRegex()},qb={...Co,br:It(Qu).replace("{2,}","*").getRegex(),text:It(Co.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},as={normal:fn,gfm:Cb,pedantic:xb},Ci={normal:yn,gfm:Co,breaks:qb,pedantic:Rb},Nb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ql=e=>Nb[e];function Le(e,t){if(t){if(le.escapeTest.test(e))return e.replace(le.escapeReplace,ql)}else if(le.escapeTestNoEncode.test(e))return e.replace(le.escapeReplaceNoEncode,ql);return e}function Nl(e){try{e=encodeURI(e).replace(le.percentDecode,"%")}catch{return null}return e}function Wl(e,t){var a;let r=e.replace(le.findPipe,(n,o,l)=>{let c=!1,h=o;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(le.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(le.slashPipe,"|");return i}function xi(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 Wb(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 zl(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function zb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
129
+ `).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
130
+ `)}var Is=class{constructor(t){Nt(this,"options");Nt(this,"rules");Nt(this,"lexer");this.options=t||br}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:xi(i,`
131
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=zb(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=xi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:xi(r[0],`
132
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=xi(r[0],`
133
+ `).split(`
134
+ `),s="",a="",n=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
135
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
136
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
137
+ ${h}`:h,a=a?`${a}
138
+ ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,n,!0),this.lexer.state.top=d,i.length===0)break;let g=n.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let p=g,m=p.raw+`
139
+ `+i.join(`
140
+ `),x=this.blockquote(m);n[n.length-1]=x,s=s.substring(0,s.length-p.raw.length)+x.raw,a=a.substring(0,a.length-p.text.length)+x.text;break}else if((g==null?void 0:g.type)==="list"){let p=g,m=p.raw+`
141
+ `+i.join(`
142
+ `),x=this.list(m);n[n.length-1]=x,s=s.substring(0,s.length-g.raw.length)+x.raw,a=a.substring(0,a.length-p.raw.length)+x.raw,i=m.substring(n.at(-1).raw.length).split(`
143
+ `);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
144
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),g=t.split(`
145
+ `,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):p?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),p&&this.rules.other.blankLine.test(g)&&(h+=g+`
146
+ `,t=t.substring(g.length+1),c=!0),!c){let b=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 A=t.split(`
147
+ `,1)[0],L;if(g=A,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),L=g):L=g.replace(this.rules.other.tabCharGlobal," "),T.test(g)||_.test(g)||v.test(g)||b.test(g)||w.test(g))break;if(L.search(this.rules.other.nonSpaceChar)>=m||!g.trim())u+=`
148
+ `+L.slice(m);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||_.test(d)||w.test(d))break;u+=`
149
+ `+g}!p&&!g.trim()&&(p=!0),h+=A+`
150
+ `,t=t.substring(A.length+1),d=L.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(C=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!x,checked:C,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 o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Wl(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
151
+ `):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?n.align.push("right"):this.rules.other.tableAlignCenter.test(l)?n.align.push("center"):this.rules.other.tableAlignLeft.test(l)?n.align.push("left"):n.align.push(null);for(let l=0;l<i.length;l++)n.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:n.align[l]});for(let l of a)n.rows.push(Wl(l,n.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:n.align[h]})));return n}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
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 n=xi(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=Wb(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),zl(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return zl(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,n,o,l=a,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(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){l+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...s[0]][0].length,d=t.slice(0,a+s.index+u+o);if(Math.min(a,o)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let g=d.slice(2,-2);return{type:"strong",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ke=class xo{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||br,this.options.tokenizer=this.options.tokenizer||new Is,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:le,block:as.normal,inline:Ci.normal};this.options.pedantic?(r.block=as.pedantic,r.inline=Ci.pedantic):this.options.gfm&&(r.block=as.gfm,this.options.breaks?r.inline=Ci.breaks:r.inline=Ci.gfm),this.tokenizer.rules=r}static get rules(){return{block:as,inline:Ci}}static lex(t,r){return new xo(r).lex(t)}static lexInline(t,r){return new xo(r).inlineTokens(t)}lex(t){t=t.replace(le.carriageReturn,`
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,n;for(this.options.pedantic&&(t=t.replace(le.tabCharGlobal," ").replace(le.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(o=c.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
154
+ `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
155
+ `)?"":`
156
+ `)+o.raw,c.text+=`
157
+ `+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
158
+ `)?"":`
159
+ `)+o.raw,c.text+=`
160
+ `+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((n=this.options.extensions)!=null&&n.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(d=>{u=d.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
161
+ `)?"":`
162
+ `)+o.raw,c.text+=`
163
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
164
+ `)?"":`
165
+ `)+o.raw,c.text+=`
166
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,d;let i=t,s=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)g.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let g;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(m=>(g=m.call({lexer:this},t,r))?(t=t.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.escape(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.tag(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.link(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(g.raw.length);let m=r.at(-1);g.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=g.raw,m.text+=g.text):r.push(g);continue}if(g=this.tokenizer.emStrong(t,i,o)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.codespan(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.br(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.del(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.autolink(t)){t=t.substring(g.raw.length),r.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(t))){t=t.substring(g.raw.length),r.push(g);continue}let p=t;if((d=this.options.extensions)!=null&&d.startInline){let m=1/0,x=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},x),typeof C=="number"&&C>=0&&(m=Math.min(m,C))}),m<1/0&&m>=0&&(p=t.substring(0,m+1))}if(g=this.tokenizer.inlineText(p)){t=t.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(o=g.raw.slice(-1)),n=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=g.raw,m.text+=g.text):r.push(g);continue}if(t){let m="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},Rs=class{constructor(t){Nt(this,"options");Nt(this,"parser");this.options=t||br}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(le.notSpaceStart))==null?void 0:n[0],a=t.replace(le.endingNewline,"")+`
167
+ `;return s?'<pre><code class="language-'+Le(s)+'">'+(i?a:Le(a,!0))+`</code></pre>
168
+ `:"<pre><code>"+(i?a:Le(a,!0))+`</code></pre>
169
+ `}blockquote({tokens:t}){return`<blockquote>
170
+ ${this.parser.parse(t)}</blockquote>
171
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
172
+ `}hr(t){return`<hr>
173
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let o=0;o<t.items.length;o++){let l=t.items[o];s+=this.listitem(l)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
174
+ `+s+"</"+a+`>
175
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Le(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
176
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
177
+ `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
178
+ <thead>
179
+ `+r+`</thead>
180
+ `+s+`</table>
181
+ `}tablerow({text:t}){return`<tr>
182
+ ${t}</tr>
183
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
184
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Le(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=Nl(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+Le(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=Nl(t);if(a===null)return Le(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${Le(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Le(t.text)}},mn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},we=class bo{constructor(t){Nt(this,"options");Nt(this,"renderer");Nt(this,"textRenderer");this.options=t||br,this.options.renderer=this.options.renderer||new Rs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new mn}static parse(t,r){return new bo(r).parse(t)}static parseInline(t,r){return new bo(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let c=o,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;n+1<t.length&&t[n+1].type==="text";)c=t[++n],h+=`
185
+ `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=c||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},fs,vi=(fs=class{constructor(t){Nt(this,"options");Nt(this,"block");this.options=t||br}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ke.lex:ke.lexInline}provideParser(){return this.block?we.parse:we.parseInline}},Nt(fs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Nt(fs,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),fs),Hb=class{constructor(...t){Nt(this,"defaults",hn());Nt(this,"options",this.setOptions);Nt(this,"parse",this.parseMarkdown(!0));Nt(this,"parseInline",this.parseMarkdown(!1));Nt(this,"Parser",we);Nt(this,"Renderer",Rs);Nt(this,"TextRenderer",mn);Nt(this,"Lexer",ke);Nt(this,"Tokenizer",Is);Nt(this,"Hooks",vi);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=n.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new Rs(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new Is(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new vi;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,l=i.hooks[o],c=a[o];vi.passThroughHooks.has(n)?a[o]=h=>{if(this.defaults.async&&vi.passThroughHooksRespectAsync.has(n))return(async()=>{let d=await l.call(a,h);return c.call(a,d)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,h);return d===!1&&(d=await c.apply(a,h)),d})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let l=[];return l.push(n.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ke.lex(t,r??this.defaults)}parser(t,r){return we.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?ke.lex:ke.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?we.parse:we.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?ke.lex:ke.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?we.parse:we.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
186
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Le(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},pr=new Hb;function Rt(e,t){return pr.parse(e,t)}Rt.options=Rt.setOptions=function(e){return pr.setOptions(e),Rt.defaults=pr.defaults,Xu(Rt.defaults),Rt};Rt.getDefaults=hn;Rt.defaults=br;Rt.use=function(...e){return pr.use(...e),Rt.defaults=pr.defaults,Xu(Rt.defaults),Rt};Rt.walkTokens=function(e,t){return pr.walkTokens(e,t)};Rt.parseInline=pr.parseInline;Rt.Parser=we;Rt.parser=we.parse;Rt.Renderer=Rs;Rt.TextRenderer=mn;Rt.Lexer=ke;Rt.lexer=ke.lex;Rt.Tokenizer=Is;Rt.Hooks=vi;Rt.parse=Rt;Rt.options;Rt.setOptions;Rt.use;Rt.walkTokens;Rt.parseInline;we.parse;ke.lex;function ad(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):o},[]);if(s.length){var a=new RegExp(`
187
+ [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(o){return o.replace(a,`
188
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,l){var c=n.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;typeof o=="string"&&o.includes(`
189
+ `)&&(u=String(o).split(`
190
+ `).map(function(d,g){return g===0?d:"".concat(h).concat(d)}).join(`
191
+ `)),n+=u+i[l+1]}),n}var ko=typeof performance<"u"&&typeof performance.now=="function",Fr=f(()=>ko?performance.now():0,"now"),ka="🧜 ",jb="Mermaid render",Yb="Mermaid",Ub={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},ti;ti=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=Fr();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Fr()-i)}}async tick(t,r){if(!this.enabled)return r();const i=Fr();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Fr()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:Fr(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),ko&&typeof performance.mark=="function")try{performance.mark(`${ka}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=Fr();if(t.duration=r-t.start,ko&&typeof performance.measure=="function")try{performance.measure(`${ka}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:jb,trackGroup:Yb,color:Ub[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],n=f((l,c)=>{const h=" ".repeat(c),u=l.duration.toFixed(1).padStart(8),d=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${d} ${h}${l.name}`);for(const g of l.children)n(g,c+1);if(l.children.length>0){const g=l.children.reduce((m,x)=>m+x.duration,0),p=l.duration-g;if(p>.5){const m=p.toFixed(1).padStart(8);a.push(`${m} ${h} (self)`)}}},"walk");n(t,0);const o=Object.keys(this.buckets);if(o.length>0){a.push("—— buckets (summed) ——");for(const l of o)a.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${ka}mermaid render profile · ${s}
192
+ ${a.join(`
193
+ `)}`)}},f(ti,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var Gb=ib.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(ob),yr=Gb;function od(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
194
+ `).replace(/\n{2,}/g,`
195
+ `);return ad(i)}f(od,"preprocessMarkdown");function nd(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"})))??[]})}f(nd,"nonMarkdownToLines");function ld(e,t={}){const r=od(e,t),i=Rt.lexer(r),s=[[]];let a=0;function n(o,l="normal"){o.type==="text"?o.text.split(`
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})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{n(c,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return f(n,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(c=>{n(c)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}f(ld,"markdownToLines");function hd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(hd,"nonMarkdownToHTML");function cd(e,{markdownAutoWrap:t}={}){const r=Rt.lexer(e);function i(s){var a,n,o;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>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(q.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(cd,"markdownToHTML");function ud(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(ud,"splitTextToChars");function dd(e,t){const r=ud(t.content);return Cn(e,[],r,t.type)}f(dd,"splitWordToFitWidth");function Cn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?Cn(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Cn,"splitWordToFitWidthRecursion");function gd(e,t){if(e.some(({content:r})=>r.includes(`
197
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return qs(e,t)}f(gd,"splitLineToFitWidth");function qs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return qs(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=dd(t,a);r.push([o]),l.content&&e.unshift(l)}return qs(e,t,r)}f(qs,"splitLineToFitWidthRecursion");function wo(e,t){t&&e.attr("style",t)}f(wo,"applyStyle");var Hl=16384;async function fd(e,t,r,i,s=!1,a=jt()){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,Hl)}px`),n.attr("height",`${Math.min(10*r,Hl)}px`);const o=n.append("xhtml:div"),l=Wi(t.label)?await Wc(t.label.replace(Ki.lineBreakRegex,`
198
+ `),a):pe(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");return h.html(l),wo(h,t.labelStyle),h.attr("class",`${c} ${i}`),wo(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&o.attr("class","labelBkg"),(await yr.measure(()=>o.node().getBoundingClientRect())).width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px")),n.node()}f(fd,"addHtmlSpan");function ta(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}f(ta,"createTspan");function pd(e,t,r){const i=e.append("text"),s=ta(i,1,t);ea(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(pd,"computeWidthOfText");function Xb(e,t,r){var n;const i=e.append("text"),s=ta(i,1,t);ea(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}f(Xb,"computeDimensionOfText");function yd(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),l=n.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=f(g=>pd(n,1.1,g)<=e,"checkWidth"),d=u(h)?[h]:gd(h,u);for(const g of d){const p=ta(l,c,1.1,s);ea(p,g),c++}}if(i){const h=l.node().getBBox(),u=2;return o.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),n.node()}else return l.node()}f(yd,"createFormattedText");function So(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}})}f(So,"decodeHTMLEntities");function ea(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(So(r.content)):s.text(" "+So(r.content))})}f(ea,"updateTextContentAndStyles");async function md(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await ix(o)?await Qi(o,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()??"")}f(md,"replaceIconSubstring");var _e=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(q.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",c),a){const u=n?cd(t,h):hd(t),d=await md(er(u),h),g=t.replace(/\\\\/g,"\\"),p={isNode:o,label:Wi(t)?g:d,labelStyle:r.replace("fill:","color:")};return await fd(e,p,l,s,c,h)}else{const u=er(t.replace(/<br\s*\/?>/g,"<br/>")),d=n?ld(u.replace("<br>","<br/>"),h):nd(u),g=yd(l,e,d,t?c:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ft(g).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Ft(g).select("rect").attr("style",p.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Ft(g).select("text").attr("style",m)}return i?Ft(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Ft(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function wa(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*n-(h-s)*o+i,l[1]=(c-i)*o+(h-s)*n+s}}}function Vb(e,t){return e[0]===t[0]&&e[1]===t[1]}function Zb(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const c of n)wa(c,o,s);const l=(function(c,h,u){const d=[];for(const b of c){const w=[...b];Vb(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&d.push(w)}const g=[];h=Math.max(h,.1);const p=[];for(const b of d)for(let w=0;w<b.length-1;w++){const T=b[w],_=b[w+1];if(T[1]!==_[1]){const v=Math.min(T[1],_[1]);p.push({ymin:v,ymax:Math.max(T[1],_[1]),x:v===T[1]?T[0]:_[0],islope:(_[0]-T[0])/(_[1]-T[1])})}}if(p.sort(((b,w)=>b.ymin<w.ymin?-1:b.ymin>w.ymin?1:b.x<w.x?-1:b.x>w.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax))),!p.length)return g;let m=[],x=p[0].ymin,C=0;for(;m.length||p.length;){if(p.length){let b=-1;for(let w=0;w<p.length&&!(p[w].ymin>x);w++)b=w;p.splice(0,b+1).forEach((w=>{m.push({s:x,edge:w})}))}if(m=m.filter((b=>!(b.edge.ymax<=x))),m.sort(((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x))),(u!==1||C%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const w=b+1;if(w>=m.length)break;const T=m[b].edge,_=m[w].edge;g.push([[Math.round(T.x),x],[Math.round(_.x),x]])}x+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),C++}return g})(n,a,i);if(s){for(const c of n)wa(c,o,-s);(function(c,h,u){const d=[];c.forEach((g=>d.push(...g))),wa(d,h,u)})(l,o,-s)}return l}function es(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),Zb(e,s,i,a||1)}class xn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=es(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 ra(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 Kb extends xn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=es(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)ra([c,h])&&n.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class Qb extends xn{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 Jb{constructor(t){this.helper=t}fillPolygons(t,r){const i=es(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const l=ra(o),c=l/s,h=Math.ceil(c)-1,u=l-h*s,d=(o[0][0]+o[1][0])/2-s/4,g=Math.min(o[0][1],o[1][1]);for(let p=0;p<h;p++){const m=g+u+p*s,x=d-n+2*Math.random()*n,C=m-n+2*Math.random()*n,b=this.helper.ellipse(x,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class t1{constructor(t){this.helper=t}fillPolygons(t,r){const i=es(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((n=>{const o=ra(n),l=Math.floor(o/(i+s)),c=(o+s-l*(i+s))/2;let h=n[0],u=n[1];h[0]>u[0]&&(h=n[1],u=n[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let g=0;g<l;g++){const p=g*(i+s),m=p+i,x=[h[0]+p*Math.cos(d)+c*Math.cos(d),h[1]+p*Math.sin(d)+c*Math.sin(d)],C=[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(x[0],x[1],C[0],C[1],r))}})),a}}class e1{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=es(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=ra(a),o=Math.round(n/(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<o;u++){const d=2*u*r,g=2*(u+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[l[0]+g*Math.cos(h),l[1]+g*Math.sin(h)],C=[m[0]+p*Math.cos(h+Math.PI/4),m[1]+p*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const he={};class r1{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const i1=0,Sa=1,jl=2,os={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 Ta(e,t){return e.type===t}function bn(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:i1,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Sa,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:jl,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!Ta(a,jl);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return bn("M0,0"+e);s++,n=os[a.text],i=a.text}else Ta(a,Sa)?n=os[i]:(s++,n=os[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let l=s;l<s+n;l++){const c=r[l];if(!Ta(c,Sa))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof os[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Cd(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((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:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.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:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((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:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function xd(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=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,n]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],o=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-o),d=s+(s-l)):(u=i,d=s),t.push({key:"C",data:[u,d,...h]}),o=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,d]=h;let g=0,p=0;r==="Q"||r==="T"?(g=i+(i-o),p=s+(s-l)):(g=i,p=s);const m=i+2*(g-i)/3,x=s+2*(p-s)/3,C=u+2*(g-u)/3,b=d+2*(p-d)/3;t.push({key:"C",data:[m,x,C,b,u,d]}),o=g,l=p,i=u,s=d;break}case"Q":{const[u,d,g,p]=h,m=i+2*(u-i)/3,x=s+2*(d-s)/3,C=g+2*(u-g)/3,b=p+2*(d-p)/3;t.push({key:"C",data:[m,x,C,b,g,p]}),o=u,l=d,i=g,s=p;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),g=h[2],p=h[3],m=h[4],x=h[5],C=h[6];u===0||d===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(bd(i,s,x,C,u,d,g,p,m).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=c}return t}function bi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function bd(e,t,r,i,s,a,n,o,l,c){const h=(u=n,Math.PI*u/180);var u;let d=[],g=0,p=0,m=0,x=0;if(c)[g,p,m,x]=c;else{[e,t]=bi(e,t,-h),[r,i]=bi(r,i,-h);const M=(e-r)/2,F=(t-i)/2;let E=M*M/(s*s)+F*F/(a*a);E>1&&(E=Math.sqrt(E),s*=E,a*=E);const B=s*s,P=a*a,O=B*P-B*F*F-P*M*M,W=B*F*F+P*M*M,X=(o===l?-1:1)*Math.sqrt(Math.abs(O/W));m=X*s*F/a+(e+r)/2,x=X*-a*M/s+(t+i)/2,g=Math.asin(parseFloat(((t-x)/a).toFixed(9))),p=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<m&&(g=Math.PI-g),r<m&&(p=Math.PI-p),g<0&&(g=2*Math.PI+g),p<0&&(p=2*Math.PI+p),l&&g>p&&(g-=2*Math.PI),!l&&p>g&&(p-=2*Math.PI)}let C=p-g;if(Math.abs(C)>120*Math.PI/180){const M=p,F=r,E=i;p=l&&p>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,d=bd(r=m+s*Math.cos(p),i=x+a*Math.sin(p),F,E,s,a,n,0,l,[p,M,m,x])}C=p-g;const b=Math.cos(g),w=Math.sin(g),T=Math.cos(p),_=Math.sin(p),v=Math.tan(C/4),A=4/3*s*v,L=4/3*a*v,Y=[e,t],N=[e+A*w,t-L*b],I=[r+A*_,i-L*T],Q=[r,i];if(N[0]=2*Y[0]-N[0],N[1]=2*Y[1]-N[1],c)return[N,I,Q].concat(d);{d=[N,I,Q].concat(d);const M=[];for(let F=0;F<d.length;F+=3){const E=bi(d[F][0],d[F][1],h),B=bi(d[F+1][0],d[F+1][1],h),P=bi(d[F+2][0],d[F+2][1],h);M.push([E[0],E[1],B[0],B[1],P[0],P[1]])}return M}}const s1={randOffset:function(e,t){return Tt(e,t)},randOffsetWithRange:function(e,t,r){return Ns(e,t,r)},ellipse:function(e,t,r,i,s){const a=wd(r,i,s);return To(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return rr(e,t,r,i,s,!0)}};function kd(e,t,r,i,s){return{type:"path",ops:rr(e,t,r,i,s)}}function ks(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...rr(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...rr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?kd(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function a1(e,t,r,i,s){return(function(a,n){return ks(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Yl(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=ns(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:ns(r[0],1.5*(1+.22*t.roughness),Xl(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=ns(n,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:ns(n,1.5*(1+.22*t.roughness),Xl(t));for(const c of o)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 wd(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return n+=Tt(n*l,r),o+=Tt(o*l,r),{increment:a,rx:n,ry:o}}function To(e,t,r,i){const[s,a]=Vl(i.increment,e,t,i.rx,i.ry,1,i.increment*Ns(.1,Ns(.4,1,r),r),r);let n=Ws(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Vl(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ws(o,null,r);n=n.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function Ul(e,t,r,i,s,a,n,o,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=Tt(.01*u,l),d+=Tt(.01*d,l);let g=s,p=a;for(;g<0;)g+=2*Math.PI,p+=2*Math.PI;p-g>2*Math.PI&&(g=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,x=Math.min(m/2,(p-g)/2),C=Zl(x,c,h,u,d,g,p,1,l);if(!l.disableMultiStroke){const b=Zl(x,c,h,u,d,g,p,1.5,l);C.push(...b)}return n&&(o?C.push(...rr(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l),...rr(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(g),h+d*Math.sin(g)]})),{type:"path",ops:C}}function Gl(e,t){const r=xd(Cd(bn(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...rr(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,d,g]=o;i.push(...o1(l,c,h,u,d,g,a,t)),a=[d,g];break}case"Z":i.push(...rr(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function _a(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]+Tt(s,t),i[0][1]+Tt(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Tt(s,t),i[n][1]+Tt(s,t)]})}}return{type:"fillPath",ops:r}}function Ar(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!he[s])switch(s){case"zigzag":he[s]||(he[s]=new Kb(i));break;case"cross-hatch":he[s]||(he[s]=new Qb(i));break;case"dots":he[s]||(he[s]=new Jb(i));break;case"dashed":he[s]||(he[s]=new t1(i));break;case"zigzag-line":he[s]||(he[s]=new e1(i));break;default:s="hachure",he[s]||(he[s]=new xn(i))}return he[s]})(t,s1).fillPolygons(e,t)}function Xl(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Sd(e){return e.randomizer||(e.randomizer=new r1(e.seed||0)),e.randomizer.next()}function Ns(e,t,r,i=1){return r.roughness*i*(Sd(r)*(t-e)+e)}function Tt(e,t,r=1){return Ns(-e,e,t,r)}function rr(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=_o(e,t,r,i,s,!0,!1);if(n)return o;const l=_o(e,t,r,i,s,!0,!0);return o.concat(l)}function _o(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,d=.2+.2*Sd(s);let g=s.bowing*s.maxRandomnessOffset*(i-t)/200,p=s.bowing*s.maxRandomnessOffset*(e-r)/200;g=Tt(g,s,c),p=Tt(p,s,c);const m=[],x=()=>Tt(u,s,c),C=()=>Tt(h,s,c),b=s.preserveVertices;return n?m.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):m.push({op:"move",data:[e+(b?0:Tt(h,s,c)),t+(b?0:Tt(h,s,c))]}),n?m.push({op:"bcurveTo",data:[g+e+(r-e)*d+x(),p+t+(i-t)*d+x(),g+e+2*(r-e)*d+x(),p+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}):m.push({op:"bcurveTo",data:[g+e+(r-e)*d+C(),p+t+(i-t)*d+C(),g+e+2*(r-e)*d+C(),p+t+2*(i-t)*d+C(),r+(b?0:C()),i+(b?0:C())]}),m}function ns(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Tt(t,r),e[0][1]+Tt(t,r)]),i.push([e[0][0]+Tt(t,r),e[0][1]+Tt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Tt(t,r),e[s][1]+Tt(t,r)]),s===e.length-1&&i.push([e[s][0]+Tt(t,r),e[s][1]+Tt(t,r)]);return Ws(i,null,r)}function Ws(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*e[o+1][0]-n*e[o-1][0])/6,l[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(..._o(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Vl(e,t,r,i,s,a,n,o){const l=[],c=[];if(o.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=Tt(.5,o)-Math.PI/2;c.push([Tt(a,o)+t+.9*i*Math.cos(h-e),Tt(a,o)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const g=[Tt(a,o)+t+i*Math.cos(d),Tt(a,o)+r+s*Math.sin(d)];l.push(g),c.push(g)}c.push([Tt(a,o)+t+i*Math.cos(h+2*Math.PI+.5*n),Tt(a,o)+r+s*Math.sin(h+2*Math.PI+.5*n)]),c.push([Tt(a,o)+t+.98*i*Math.cos(h+n),Tt(a,o)+r+.98*s*Math.sin(h+n)]),c.push([Tt(a,o)+t+.9*i*Math.cos(h+.5*n),Tt(a,o)+r+.9*s*Math.sin(h+.5*n)])}return[c,l]}function Zl(e,t,r,i,s,a,n,o,l){const c=a+Tt(.1,l),h=[];h.push([Tt(o,l)+t+.9*i*Math.cos(c-e),Tt(o,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=n;u+=e)h.push([Tt(o,l)+t+i*Math.cos(u),Tt(o,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(n),r+s*Math.sin(n)]),h.push([t+i*Math.cos(n),r+s*Math.sin(n)]),Ws(h,null,l)}function o1(e,t,r,i,s,a,n,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let g=0;g<u;g++)g===0?l.push({op:"move",data:[n[0],n[1]]}):l.push({op:"move",data:[n[0]+(d?0:Tt(c[0],o)),n[1]+(d?0:Tt(c[0],o))]}),h=d?[s,a]:[s+Tt(c[g],o),a+Tt(c[g],o)],l.push({op:"bcurveTo",data:[e+Tt(c[g],o),t+Tt(c[g],o),r+Tt(c[g],o),i+Tt(c[g],o),h[0],h[1]]});return l}function ki(e){return[...e]}function Kl(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(ki(e[0]),ki(e[1]),ki(e[2]),ki(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(ki(s[0]));for(let o=1;o+2<s.length;o++){const l=s[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(n*s[o+1][0]-n*s[o-1][0])/6,l[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function ws(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function n1(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,hr(t,r,s))}function hr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Bo(e,t,r,i){const s=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],d=o[l+3];let g=3*h[0]-2*c[0]-d[0];g*=g;let p=3*h[1]-2*c[1]-d[1];p*=p;let m=3*u[0]-2*d[0]-c[0];m*=m;let x=3*u[1]-2*d[1]-c[1];return x*=x,g<m&&(g=m),p<x&&(p=x),g+p})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(ws(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=hr(l,c,.5),g=hr(c,h,.5),p=hr(h,u,.5),m=hr(d,g,.5),x=hr(g,p,.5),C=hr(m,x,.5);Bo([l,d,m,C],0,r,s),Bo([C,x,p,u],0,r,s)}var a,n;return s}function l1(e,t){return zs(e,0,e.length,t)}function zs(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=n1(e[h],n,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(zs(e,t,c+1,i,a),zs(e,c,r,i,a)):(a.length||a.push(n),a.push(o)),a}function Ba(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Bo(e,3*a,t,i);return r&&r>0?zs(i,0,i.length,r):i}const de="none";class Hs{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const n=this._o(a);return this._d("line",[kd(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],l=a1(t,r,i,s,n);if(n.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(_a([c],n)):o.push(Ar([c],n))}return n.stroke!==de&&o.push(l),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],l=wd(i,s,n),c=To(t,r,n,l);if(n.fill)if(n.fillStyle==="solid"){const h=To(t,r,n,l).opset;h.type="fillPath",o.push(h)}else o.push(Ar([c.estimatedPoints],n));return n.stroke!==de&&o.push(c.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ks(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,l){const c=this._o(l),h=[],u=Ul(t,r,i,s,a,n,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const g=Ul(t,r,i,s,a,n,!0,!1,d);g.type="fillPath",h.push(g)}else h.push((function(d,g,p,m,x,C,b){const w=d,T=g;let _=Math.abs(p/2),v=Math.abs(m/2);_+=Tt(.01*_,b),v+=Tt(.01*v,b);let A=x,L=C;for(;A<0;)A+=2*Math.PI,L+=2*Math.PI;L-A>2*Math.PI&&(A=0,L=2*Math.PI);const Y=(L-A)/b.curveStepCount,N=[];for(let I=A;I<=L;I+=Y)N.push([w+_*Math.cos(I),T+v*Math.sin(I)]);return N.push([w+_*Math.cos(L),T+v*Math.sin(L)]),N.push([w,T]),Ar([N],b)})(t,r,i,s,a,n,c));return c.stroke!==de&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=Yl(t,i);if(i.fill&&i.fill!==de)if(i.fillStyle==="solid"){const n=Yl(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?n.push(...c):c.length===3?n.push(...Ba(Kl([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):n.push(...Ba(Kl(c),10,(1+i.roughness)/2))}n.length&&s.push(Ar([n],i))}return i.stroke!==de&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=ks(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(_a([t],i)):s.push(Ar([t],i))),i.stroke!==de&&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!==de,n=i.stroke!==de,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const g=xd(Cd(bn(h))),p=[];let m=[],x=[0,0],C=[];const b=()=>{C.length>=4&&m.push(...Ba(C,u)),C=[]},w=()=>{b(),m.length&&(p.push(m),m=[])};for(const{key:_,data:v}of g)switch(_){case"M":w(),x=[v[0],v[1]],m.push(x);break;case"L":b(),m.push([v[0],v[1]]);break;case"C":if(!C.length){const A=m.length?m[m.length-1]:x;C.push([A[0],A[1]])}C.push([v[0],v[1]]),C.push([v[2],v[3]]),C.push([v[4],v[5]]);break;case"Z":b(),m.push([x[0],x[1]])}if(w(),!d)return p;const T=[];for(const _ of p){const v=l1(_,d);v.length&&T.push(v)}return T})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=Gl(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Gl(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(_a(l,i));else s.push(Ar(l,i));return n&&(o?l.forEach((h=>{s.push(ks(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((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:de};break;case"fillPath":n={d:this.opsToPath(a),stroke:de,strokeWidth:0,fill:i.fill||de};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||de,strokeWidth:i,fill:de}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class h1{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Hs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,n,o=!1,l){const c=this.gen.arc(t,r,i,s,a,n,o,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 ls="http://www.w3.org/2000/svg";class c1{constructor(t,r){this.svg=t,this.gen=new Hs(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(ls,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=s.createElementNS(ls,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(ls,"path"),l.setAttribute("d",this.opsToPath(o,n)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(ls,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,n,o=!1,l){const c=this.gen.arc(t,r,i,s,a,n,o,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 ct={canvas:(e,t)=>new h1(e,t),svg:(e,t)=>new c1(e,t),generator:e=>new Hs(e),newSeed:()=>Hs.newSeed()},u1=1,d1=3;async function kn(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!wn(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const n=$t().fontSize?$t().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[l=Fc.fontSize]=Ks(n),c=l*o+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}f(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}f(kn,"configureLabelImages");function wn(e){var r;return e.nodeType===d1?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==u1||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(wn)}f(wn,"hasTextBesidesImages");var Ql=3,g1=32,f1=f(async(e,t,r)=>{var C,b,w;const i=$t(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",Vt(t.labelStyle)),o=[{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(T=>({text:T,cssClass:"c4-descr"}))].filter(T=>T.text),l=t.width?Math.max(t.width-2*(t.padding??0),g1):((b=$t().flowchart)==null?void 0:b.wrappingWidth)??200,h=((w=i.c4)==null?void 0:w.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(o.map(async T=>{const _=a.append("g").attr("class",T.cssClass),v=await _e(_,pe(er(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 g=0;for(const{el:T,box:_}of u)T.attr("transform",`translate(${d/2-_.x-_.width/2}, ${g-_.y})`),g+=_.height+Ql;const p=u.length>0?g-Ql:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-d/2}, ${-p/2})`);const m=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:m,halfPadding:x,label:a}},"c4LabelHelper"),mt=f(async(e,t,r)=>{var g,p;if(t.stereotype!==void 0)return f1(e,t,r);let i;const s=t.useHtmlLabels||Ie((g=$t())==null?void 0:g.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),n=a.insert("g").attr("class","label").attr("style",Vt(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await _e(n,pe(er(o),$t()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((p=$t().flowchart)==null?void 0:p.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},$t()),u=((t==null?void 0:t.padding)??0)/2;let d;if(s){const m=h.children[0],x=Ft(h);await kn(m),d=await yr.measure(()=>m.getBoundingClientRect()),x.attr("width",d.width),x.attr("height",d.height)}else d=await yr.measure(()=>h.getBBox());return s?n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):n.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:u,label:n}},"labelHelper"),va=f(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??oe($t()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await _e(s,pe(er(t),$t()),{useHtmlLabels:i,width:r.width||((c=(l=$t())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let o;if(oe($t())){const h=a.children[0],u=Ft(a);o=await yr.measure(()=>h.getBoundingClientRect()),u.attr("width",o.width),u.attr("height",o.height)}else o=await yr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),dt=f((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"),Ct=f((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(" ")}f(Dt,"createPathFromPoints");function ir(e,t,r,i,s,a){const n=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let g=0;g<=50;g++){const p=g/50,m=e+p*l,x=d+s*Math.sin(u*(m-e));n.push({x:m,y:x})}return n}f(ir,"generateFullSineWavePoints");function Ee(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,g=e+r*Math.cos(d),p=t+r*Math.sin(d);n.push({x:-g,y:-p})}return n}f(Ee,"generateCirclePoints");function vo(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),n=f((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}f(vo,"mergePaths");var p1=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,l,c;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),l=a===0?0:o*s/a,c=o):(s<0&&(n=-n),l=n,c=s===0?0:n*a/s),{x:r+l,y:i+c}},"intersectRect"),kr=p1,Ce=f((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"),y1=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=$t(),o=oe(n);return await _e(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),Ke=y1;function Td(e,t){return e.intersect(t)}f(Td,"intersectNode");var m1=Td;function _d(e,t,r,i){var s=e.x,a=e.y,n=s-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*n*n),c=Math.abs(t*r*n/l);i.x<s&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}f(_d,"intersectEllipse");var Bd=_d;function vd(e,t,r){return Bd(e,t,t,r)}f(vd,"intersectCircle");var C1=vd;function Ld(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,l=s*i.x+a*i.y+n,c=1e-6;if(o!==0&&l!==0&&Lo(o,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,g=h*e.x+u*e.y+d,p=h*t.x+u*t.y+d;if(Math.abs(g)<c&&Math.abs(p)<c&&Lo(g,p))return;const m=s*u-h*a;if(m===0)return;const x=Math.abs(m/2);let C=a*d-u*n;const b=C<0?(C-x)/m:(C+x)/m;C=h*n-s*d;const w=C<0?(C-x)/m:(C+x)/m;return{x:b,y:w}}}f(Ld,"intersectLine");function Lo(e,t){return e*t>0}f(Lo,"sameSign");var x1=Ld;function Fd(e,t,r){let i=e.x,s=e.y,a=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){n=Math.min(n,h.x),o=Math.min(o,h.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let l=i-e.width/2-n,c=s-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],g=x1(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});g&&a.push(g)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,g=h.y-r.y,p=Math.sqrt(d*d+g*g),m=u.x-r.x,x=u.y-r.y,C=Math.sqrt(m*m+x*x);return p<C?-1:p===C?0:1}),a[0]):e}f(Fd,"intersectPolygon");var b1=Fd,st={node:m1,circle:C1,ellipse:Bd,polygon:b1,rect:kr};function Ad(e,t){const{labelStyles:r}=ft(t);t.labelStyle=r;const i=Ct(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,l=ct.svg(a),c=lt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,n*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",Vt(o)),dt(t,u),t.intersect=function(d){return q.info("Circle intersect",t,n,d),st.circle(t,n,d)},a}f(Ad,"anchor");function Fo(e,t,r,i,s,a,n){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,g=u/s,p=d/a,m=Math.sqrt(g**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-m**2),C=l+x*a*Math.sin(h)*(n?-1:1),b=c-x*s*Math.cos(h)*(n?-1:1),w=Math.atan2((t-b)/a,(e-C)/s);let _=Math.atan2((i-b)/a,(r-C)/s)-w;n&&_<0&&(_+=2*Math.PI),!n&&_>0&&(_-=2*Math.PI);const v=[];for(let A=0;A<20;A++){const L=A/19,Y=w+L*_,N=C+s*Math.cos(Y),I=b+a*Math.sin(Y);v.push({x:N,y:I})}return v}f(Fo,"generateArcPoints");function Md(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Md,"calculateArcSagitta");async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=f(Y=>Y+n,"calcTotalHeight"),l=f(Y=>{const N=Y/2;return[N/(2.5+Y/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await mt(e,t,Ct(t)),u=o(t!=null&&t.height?t==null?void 0:t.height:h.height),[d,g]=l(u),p=Md(u,d,g),x=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+p-p,C=u,{cssStyles:b}=t,w=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...Fo(-x/2,-C/2,-x/2,C/2,d,g,!1),{x:x/2,y:C/2},...Fo(x/2,C/2,x/2,-C/2,d,g,!0)],T=ct.svg(c),_=lt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=Dt(w),A=T.path(v,_),L=c.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d/2}, 0)`),dt(t,L),t.intersect=function(Y){return st.polygon(t,w,Y)},c}f(Ed,"bowTieRect");async function $d(e,t,{config:{themeVariables:r}}){var A;const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await mt(e,t,Ct(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(n.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),d=Math.max(n.height+c*2+u,t.height??0),g=-d/2+u,p=d/2,m=h*.72,x=[`M${-h/2},${g}`,`L${-m/2},${p}`,`A${m/2},${u} 0 0 0 ${m/2},${p}`,`L${h/2},${g}`,`A${h/2},${u} 0 0 0 ${-h/2},${g}`,"Z"].join(" "),{cssStyles:C}=t,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const Y=ct.svg(a).path(x,lt(t,{}));(A=b.node())==null||A.appendChild(Y),C&&b.attr("style",C)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",g).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),dt(t,b);const w=g+(p-g)/2;o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${w-n.height/2-(n.y-(n.top??0))})`);const T=12,_=f((L,Y,N)=>Array.from({length:T+1},(I,Q)=>{const M=Math.PI-Q*Math.PI/T;return{x:L*Math.cos(M),y:Y+N*u*Math.sin(M)}}),"arc"),v=[..._(h/2,g,-1),..._(m/2,p,1).reverse()];return t.intersect=function(L){return st.polygon(t,v,L)},a}f($d,"bucket");var Jl=20,th=8,k1=80,La=8;async function Od(e,t){const{themeVariables:r}=$t(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:a}=ft(t),{shapeSvg:n,bbox:o}=await mt(e,t,Ct(t)),l=t.padding??8,c=o.height,h=Math.max(o.width+l*2,k1,(t==null?void 0:t.width)??0),u=Math.max(c+th+Jl+l*2,(t==null?void 0:t.height)??0),d=-h/2,g=-u/2,p=-28/2,m=n.select(".label");m&&(t.useHtmlLabels??oe($t())?m.attr("transform",`translate(${-o.width/2}, ${-o.height/2+p})`):m.attr("transform",`translate(0, ${-o.height/2+p})`));let x;if(t.look==="handDrawn"){const _=ct.svg(n),v=lt(t,{fill:i,stroke:s,fillStyle:"solid"}),A=_.path(Ce(d,g,h,u,La),v);x=n.insert(()=>A,":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",Vt(t.cssStyles))}else x=n.insert("rect",":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",La).attr("ry",La).attr("x",d).attr("y",g).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const C=g+l+c+th;n.append("line").attr("class","collapsed-separator").attr("x1",d+8).attr("y1",C).attr("x2",d+h-8).attr("y2",C).attr("stroke",s).attr("stroke-dasharray","3, 3");const b=C+Jl/2,w=2.5,T=10;for(let _=-1;_<=1;_++)n.append("circle").attr("class","collapsed-indicator").attr("cx",_*T).attr("cy",b).attr("r",w).attr("fill",s);return dt(t,x),t.calcIntersect=function(_,v){return st.rect(_,v)},t.intersect=function(_){return st.rect(t,_)},n}f(Od,"collapsedGroup");function Re(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+")")}f(Re,"insertPolygonShape");var w1=["right","left","up","down"],Sn="point",S1=f(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"),T1=f(e=>w1.filter(t=>e.has(t)).join("|")||Sn,"getDirectionKey"),eh={"right|left|up|down":f(({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":f(({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":f(({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":f(({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":f(({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":f(({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":f(({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":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":f(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":f(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:f(({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:f(({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:f(({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:f(({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"),[Sn]:()=>[{x:0,y:0}]},_1=f((e,t,r,i)=>{const s=S1(e),a=(r.padding??0)/2,n=t.height+4*a,o=n/2,l=i??t.width+2*o+2*a,c=T1(s);return(eh[c]??eh[Sn])({height:n,midpoint:o,padding:a,width:l})},"getArrowPoints");async function Pd(e,t){const r=t,{shapeSvg:i,bbox:s}=await mt(e,r,Ct(r)),a=r.padding??0,n=s.height+2*a,o=n/2,l=s.width+2*o+a,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,d=_1(r.directions??[],s,r,u),g=Re(i,u,n,d);return g.attr("style",r.style??null),dt(r,g),r.intersect=function(p){return st.polygon(r,d,p)},i}f(Pd,"block_arrow");async function Dd(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await mt(e,t,Ct(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(n.width+c*2,t.width??0,90),g=Math.max(n.height+c*2+h,t.height??0),p=-g/2,{cssStyles:m}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=ct.svg(a).path(Ce(-d/2,p,d,g,u),lt(t,{}));(b=x.node())==null||b.appendChild(T),m&&x.attr("style",m)}else x.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",g).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-d/2).attr("y1",p+h).attr("x2",d/2).attr("y2",p+h).attr("style",`stroke:${l};stroke-width:1px`);for(let w=0;w<3;w++)x.append("circle").attr("cx",-d/2+12+w*9).attr("cy",p+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",p+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`),dt(t,x);const C=p+h+(g-h)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(w){return st.rect(t,w)},a}f(Dd,"browser");var hs=12;async function Id(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+hs),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?n*2:n),u=0,d=c,g=-h,p=0,m=[{x:u+hs,y:g},{x:d,y:g},{x:d,y:p},{x:u,y:p},{x:u,y:g+hs},{x:u+hs,y:g}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=ct.svg(o),w=lt(t,{}),T=Dt(m),_=b.path(T,w);x=o.insert(()=>_,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&x.attr("style",C)}else x=Re(o,c,h,m);return i&&x.attr("style",i),dt(t,x),t.intersect=function(b){return st.polygon(t,m,b)},o}f(Id,"card");function Rd(e,t){const{nodeStyles:r}=ft(t);t.label="";const i=e.insert("g").attr("class",Ct(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=ct.svg(i),l=lt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Dt(n),h=o.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,n,d)},i}f(Rd,"choice");async function Tn(e,t,r){const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await mt(e,t,Ct(t)),l=16,c=(r==null?void 0:r.padding)??o,h=t.look==="neo"?n.width/2+l*2:n.width/2+c;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=ct.svg(a),p=lt(t,{}),m=g.circle(0,0,h*2,p);u=a.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",Vt(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 dt(t,u),t.calcIntersect=function(g,p){const m=g.width/2;return st.circle(g,m,p)},t.intersect=function(g){return q.info("Circle intersect",t,h,g),st.circle(t,h,g)},a}f(Tn,"circle");async function qd(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:n}=await mt(e,r,i),o=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-n,d=r.positioned?-h/2:-a.height/2-n;return o.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),dt(r,o),r.intersect=function(g){return st.rect(r,g)},s}f(qd,"composite");async function Nd(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await mt(e,t,Ct(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(n.width+c*2,t.width??0,90),g=Math.max(n.height+c*2+h,t.height??0),p=-g/2,{cssStyles:m}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=ct.svg(a).path(Ce(-d/2,p,d,g,u),lt(t,{}));(b=x.node())==null||b.appendChild(T),m&&x.attr("style",m)}else x.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",g).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-d/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),dt(t,x);const C=p+h+(g-h)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(w){return st.rect(t,w)},a}f(Nd,"consoleWindow");function Wd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
199
+ M ${s.x},${s.y} L ${n.x},${n.y}`}f(Wd,"createLine");function zd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Ct(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=ct.svg(s),l=lt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Wd(a),u=o.path(h,l),d=s.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),dt(t,d),t.intersect=function(g){return q.info("crossedCircle intersect",t,{radius:a,point:g}),st.circle(t,a,g)},s}f(zd,"crossedCircle");function Ne(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,g=e+r*Math.cos(d),p=t+r*Math.sin(d);n.push({x:-g,y:-p})}return n}f(Ne,"generateCirclePoints");async function Hd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+o,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:d}=t,g=[...Ne(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Ne(c/2+u*2,-u,u,20,-180,-270),...Ne(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Ne(c/2,h/2,u,20,0,90)],p=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...Ne(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ne(c/2+c*.1,-u,u,20,-180,-270),...Ne(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Ne(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],m=ct.svg(s),x=lt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Dt(g).replace("Z",""),w=m.path(b,x),T=Dt(p),_=m.path(T,{...x}),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)`),n.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),dt(t,v),t.intersect=function(A){return st.polygon(t,p,A)},s}f(Hd,"curlyBraceLeft");function We(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,g=e+r*Math.cos(d),p=t+r*Math.sin(d);n.push({x:g,y:p})}return n}f(We,"generateCirclePoints");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?o*2:o),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,g=[...We(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...We(c/2+u*2,-u,u,20,-180,-270),...We(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...We(c/2,h/2,u,20,0,90)],p=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...We(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...We(c/2+u*2,-u,u,20,-180,-270),...We(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...We(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],m=ct.svg(s),x=lt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Dt(g).replace("Z",""),w=m.path(b,x),T=Dt(p),_=m.path(T,{...x}),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)`),n.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))})`),dt(t,v),t.intersect=function(A){return st.polygon(t,p,A)},s}f(jd,"curlyBraceRight");function Jt(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,g=e+r*Math.cos(d),p=t+r*Math.sin(d);n.push({x:-g,y:-p})}return n}f(Jt,"generateCirclePoints");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?o*2:o),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:d}=t,g=[...Jt(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...Jt(c/2+u*2,-u,u,20,-180,-270),...Jt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...Jt(c/2,h/2,u,20,0,90)],p=[...Jt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Jt(-c/2-u/2,-u,u,20,0,90),...Jt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Jt(-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},...Jt(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...Jt(c/2+u*2,-u,u,20,-180,-270),...Jt(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...Jt(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},...Jt(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...Jt(-c/2-u/2,-u,u,20,0,90),...Jt(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...Jt(-c/2+u+u/2,h/2,u,30,-180,-270)],x=ct.svg(s),C=lt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=Dt(g).replace("Z",""),T=x.path(w,C),v=Dt(p).replace("Z",""),A=x.path(v,C),L=Dt(m),Y=x.path(L,{...C}),N=s.insert("g",":first-child");return N.insert(()=>Y,":first-child").attr("stroke-opacity",0),N.insert(()=>T,":first-child"),N.insert(()=>A,":first-child"),N.attr("class","text"),d&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),n.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))})`),dt(t,N),t.intersect=function(I){return st.polygon(t,m,I)},s}f(Yd,"curlyBraces");async function Ud(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,l=5,{shapeSvg:c,bbox:h}=await mt(e,t,Ct(t)),u=Math.max(o,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),d=Math.max(l,h.height+n*2,(t==null?void 0:t.height)??0),g=d/2,{cssStyles:p}=t,m=ct.svg(c),x=lt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=u,b=d,w=C-g,T=b/4,_=[{x:w,y:0},{x:T,y:0},{x:0,y:b/2},{x:T,y:b},{x:w,y:b},...Ee(-w,-b/2,g,50,270,90)],v=Dt(_),A=m.path(v,x),L=c.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-u/2}, ${-d/2})`),dt(t,L),t.intersect=function(Y){return st.polygon(t,_,Y)},c}f(Ud,"curvedTrapezoid");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=t.padding??20,l=Math.max(a.width+o*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(a.height+o*2,t.height?t.height-(2*c-h):0),d=Math.min(l*.177,u*.45),g=u+2*c-h,p=-g/2,m=p+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const L=ct.svg(s),Y=lt(t,{}),N=L.path(Ce(-l/2,m,l,u,d),Y),I=L.circle(0,p+c,c*2,Y);x.insert(()=>I,":first-child"),x.insert(()=>N,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",m).attr("width",l).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),x.append("circle").attr("cx",0).attr("cy",p+c).attr("r",c).attr("style",i);dt(t,x);const b=m+u/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);const w=p+c,T=Math.asin(Math.min(1,(m-w)/c))*180/Math.PI,A=[...Ee(0,-w,c,24,180+T,-T),...Ee(-(-l/2+d),-(m+d),d,12,90,0),...Ee(-(-l/2+d),-(g/2-d),d,12,360,270),...Ee(-(l/2-d),-(g/2-d),d,12,270,180),...Ee(-(l/2-d),-(m+d),d,12,180,90)];return t.intersect=function(L){return st.polygon(t,A,L)},s}f(Gd,"person");var B1=f((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"),v1=f((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"),L1=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),rh=8,ih=8;async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s,o=t.width??0;if(t.width&&(t.width=t.width-n,t.width<ih&&(t.width=ih)),t.height){const b=o/2/(2.5+o/50);t.height=t.height-a-b*3,t.height<rh&&(t.height=rh)}const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,Ct(t)),u=Math.max(t.width??0,c.width)+n,d=u/2,g=d/(2.5+u/50),p=Math.max(t.height??0,c.height)+a+g;let m;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=ct.svg(l),b=v1(0,0,u,p,d,g),w=L1(0,g,u,p,d,g),T=lt(t,{}),_=C.path(b,T),v=C.path(w,lt(t,{fill:"none"}));m=l.insert(()=>v,":first-child"),m=l.insert(()=>_,":first-child"),m.attr("class","basic label-container"),x&&m.attr("style",x)}else{const C=B1(0,0,u,p,d,g);m=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Vt(x)).attr("style",i)}return m.attr("label-offset-y",g),m.attr("transform",`translate(${-u/2}, ${-(p/2+g)})`),dt(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(C){const b=st.rect(t,C),w=b.x-(t.x??0);if(d!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-g)){let T=g*g*(1-w*w/(d*d));T>0&&(T=Math.sqrt(T)),T=g-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},l}f(Xd,"cylinder");async function ni(e,t,r){const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await mt(e,t,Ct(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-o/2,h=-l/2;let u,{rx:d,ry:g}=t;const{cssStyles:p}=t;if(r!=null&&r.rx&&r.ry&&(d=r.rx,g=r.ry),t.look==="handDrawn"){const m=ct.svg(a),x=lt(t,{}),C=d||g?m.path(Ce(c,h,o,l,d||0),x):m.rectangle(c,h,o,l,x);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",Vt(p))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",Vt(d)).attr("ry",Vt(g)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return dt(t,u,t.look==="handDrawn"?void 0:{width:o,height:l}),t.calcIntersect=function(m,x){return st.rect(m,x)},t.intersect=function(m){return st.rect(t,m)},a}f(ni,"drawRect");async function Vd(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:n,height:o}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await ni(e,t,l);if(t.look==="handDrawn"){const g=ct.svg(c),p=lt(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),x=m.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>g.line(C.x,C.y,C.x+C.width,C.y,p),".basic.label-container g.label"),c.insert(()=>g.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,p),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||n)??0,d=(Number(h.attr("height"))||o)??0;return u>0&&d>0&&h.attr("stroke-dasharray",`${u} ${d}`),c}f(Vd,"datastore");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await mt(e,t,Ct(t)),c=o.width+s,h=o.height+a,u=h*.2,d=-c/2,g=-h/2-u/2,{cssStyles:p}=t,m=ct.svg(n),x=lt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:d,y:g+u},{x:-d,y:g+u},{x:-d,y:-g},{x:d,y:-g},{x:d,y:g},{x:-d,y:g},{x:-d,y:g+u}],b=m.polygon(C.map(T=>[T.x,T.y]),x),w=n.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${d+(t.padding??0)/2-(o.x-(o.left??0))}, ${g+u+(t.padding??0)/2-(o.y-(o.top??0))})`),dt(t,w),t.intersect=function(T){return st.rect(t,T)},n}f(Zd,"dividedRectangle");async function Kd(e,t){var g,p;const{labelStyles:r,nodeStyles:i}=ft(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(n??0),h=c-s;let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ct.svg(o),x=lt(t,{roughness:.2,strokeWidth:2.5}),C=lt(t,{roughness:.2,strokeWidth:1.5}),b=m.circle(0,0,c*2,x),w=m.circle(0,0,h*2,C);u=o.insert("g",":first-child"),u.attr("class",Vt(t.cssClasses)).attr("style",Vt(d)),(g=u.node())==null||g.appendChild(b),(p=u.node())==null||p.appendChild(w)}else{u=o.insert("g",":first-child");const m=u.insert("circle",":first-child"),x=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),x.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return dt(t,u),t.intersect=function(m){return q.info("DoubleCircle intersect",t,c,m),st.circle(t,c,m)},o}f(Kd,"doublecircle");function Qd(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ft(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",Ct(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,l=ct.svg(a),{nodeBorder:c}=r,h=lt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,n*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),dt(t,d),t.intersect=function(g){return q.info("filledCircle intersect",t,{radius:n,point:g}),st.circle(t,n,g)},a}f(Qd,"filledCircle");var sh=10,ah=10;async function Jd(e,t){const{labelStyles:r,nodeStyles:i}=ft(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<sh&&(t.height=sh),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<ah&&(t.width=ah));const{shapeSvg:n,bbox:o,label:l}=await mt(e,t,Ct(t)),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+o.height,u=h,d=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:g}=t,p=ct.svg(n),m=lt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=Dt(d),C=p.path(x,m),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,dt(t,b),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(w){return q.info("Triangle intersect",t,d,w),st.polygon(t,d,w)},n}f(Jd,"flippedTriangle");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=t.padding??12,l=Math.max(a.width+o*2,t.width??0,90),c=a.height+o*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),d=u-h,g=Math.max(l*.38,28),p=-u/2,m=[{x:-l/2,y:p},{x:-l/2+g,y:p},{x:-l/2+g,y:p+h},{x:l/2,y:p+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],x=[`M${m[0].x},${m[0].y}`,...m.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:C}=t;let b;if(t.look==="handDrawn"){const _=ct.svg(s).path(x,lt(t,{}));b=s.insert(()=>_,":first-child").attr("class","basic label-container"),C&&b.attr("style",C)}else b=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?dt(t,b):dt(t,b,{width:l,height:u});const w=p+h+d/2;return n.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}f(tg,"folder");function eg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=ft(t);t.label="";const n=e.insert("g").attr("class",Ct(t)).attr("id",t.domId??t.id),{cssStyles:o}=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=ct.svg(n),g=lt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const p=d.rectangle(h,u,l,c,g),m=n.insert(()=>p,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),dt(t,m);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return st.rect(t,C)},n}f(eg,"forkJoin");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await mt(e,t,Ct(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+n*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+o*2,d=u/2,{cssStyles:g}=t,p=ct.svg(l),m=lt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-h/2,y:-u/2},{x:h/2-d,y:-u/2},...Ee(-h/2+d,0,d,50,90,270),{x:h/2-d,y:u/2},{x:-h/2,y:u/2}],C=Dt(x),b=p.path(C,m),w=l.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),dt(t,w),t.intersect=function(T){return q.info("Pill intersect",t,{radius:d,point:T}),st.polygon(t,x,T)},l}f(rg,"halfRoundedRectangle");var F1=f((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 ig(e,t){const{labelStyles:r,nodeStyles:i}=ft(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,l=t.look==="neo"?n:a,c=t.look==="neo"?o: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,Ct(t)),d=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,g=d/s,p=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*g+c,m=[{x:g,y:0},{x:p-g,y:0},{x:p,y:-d/2},{x:p-g,y:-d},{x:g,y:-d},{x:0,y:-d/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=ct.svg(h),w=lt(t,{}),T=F1(0,0,p,d,g),_=b.path(T,w);x=h.insert(()=>_,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),C&&x.attr("style",C)}else x=Re(h,p,d,m);return i&&x.attr("style",i),t.width=p,t.height=d,dt(t,x),t.intersect=function(b){return st.polygon(t,m,b)},h}f(ig,"hexagon");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await mt(e,t,Ct(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=ct.svg(s),c=lt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],u=Dt(h),d=l.path(u,c),g=s.insert(()=>d,":first-child");return g.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-a/2}, ${-n/2})`),dt(t,g),t.intersect=function(p){return q.info("Pill intersect",t,{points:h}),st.polygon(t,h,p)},s}f(sg,"hourglass");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ft(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),d=t.pos==="t",g=o,p=o,{nodeBorder:m}=r,{stylesMap:x}=oi(t),C=-p/2,b=-g/2,w=t.label?8:0,T=ct.svg(c),_=lt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=T.rectangle(C,b,p,g,_),A=Math.max(p,h.width),L=g+h.height+w,Y=T.rectangle(-A/2,-L/2,A,L,{..._,fill:"transparent",stroke:"none"}),N=c.insert(()=>v,":first-child"),I=c.insert(()=>Y);if(t.icon){const Q=c.append("g");Q.html(`<g>${await Qi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const M=Q.node().getBBox(),F=M.width,E=M.height,B=M.x,P=M.y;Q.attr("transform",`translate(${-F/2-B},${d?h.height/2+w/2-E/2-P:-h.height/2-w/2-E/2-P})`),Q.attr("style",`color: ${x.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-L/2:L/2-h.height})`),N.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),dt(t,I),t.intersect=function(Q){if(q.info("iconSquare intersect",t,Q),!t.label)return st.rect(t,Q);const M=t.x??0,F=t.y??0,E=t.height??0;let B=[];return d?B=[{x:M-h.width/2,y:F-E/2},{x:M+h.width/2,y:F-E/2},{x:M+h.width/2,y:F-E/2+h.height+w},{x:M+p/2,y:F-E/2+h.height+w},{x:M+p/2,y:F+E/2},{x:M-p/2,y:F+E/2},{x:M-p/2,y:F-E/2+h.height+w},{x:M-h.width/2,y:F-E/2+h.height+w}]:B=[{x:M-p/2,y:F-E/2},{x:M+p/2,y:F-E/2},{x:M+p/2,y:F-E/2+g},{x:M+h.width/2,y:F-E/2+g},{x:M+h.width/2/2,y:F+E/2},{x:M-h.width/2,y:F+E/2},{x:M-h.width/2,y:F-E/2+g},{x:M-p/2,y:F-E/2+g}],st.polygon(t,B,Q)},c}f(ag,"icon");async function og(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ft(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await mt(e,t,"icon-shape default"),d=20,g=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:x}=r,{stylesMap:C}=oi(t),b=ct.svg(c),w=lt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=C.get("fill");w.stroke=T??x;const _=c.append("g");t.icon&&_.html(`<g>${await Qi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=_.node().getBBox(),A=v.width,L=v.height,Y=v.x,N=v.y,I=Math.max(A,L)*Math.SQRT2+d*2,Q=b.circle(0,0,I,w),M=Math.max(I,h.width),F=I+h.height+g,E=b.rectangle(-M/2,-F/2,M,F,{...w,fill:"transparent",stroke:"none"}),B=c.insert(()=>Q,":first-child"),P=c.insert(()=>E);return _.attr("transform",`translate(${-A/2-Y},${p?h.height/2+g/2-L/2-N:-h.height/2-g/2-L/2-N})`),_.attr("style",`color: ${C.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-F/2:F/2-h.height})`),B.attr("transform",`translate(0,${p?h.height/2+g/2:-h.height/2-g/2})`),dt(t,P),t.intersect=function(O){return q.info("iconSquare intersect",t,O),st.rect(t,O)},c}f(og,"iconCircle");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ft(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await mt(e,t,"icon-shape default"),g=t.pos==="t",p=o+u*2,m=o+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=oi(t),w=-m/2,T=-p/2,_=t.label?8:0,v=ct.svg(c),A=lt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const L=b.get("fill");A.stroke=L??C;const Y=v.path(Ce(w,T,m,p,5),A),N=Math.max(m,h.width),I=p+h.height+_,Q=v.rectangle(-N/2,-I/2,N,I,{...A,fill:"transparent",stroke:"none"}),M=c.insert(()=>Y,":first-child").attr("class","icon-shape2"),F=c.insert(()=>Q);if(t.icon){const E=c.append("g");E.html(`<g>${await Qi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=E.node().getBBox(),P=B.width,O=B.height,W=B.x,X=B.y;E.attr("transform",`translate(${-P/2-W},${g?h.height/2+_/2-O/2-X:-h.height/2-_/2-O/2-X})`),E.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),M.attr("transform",`translate(0,${g?h.height/2+_/2:-h.height/2-_/2})`),dt(t,F),t.intersect=function(E){if(q.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const B=t.x??0,P=t.y??0,O=t.height??0;let W=[];return g?W=[{x:B-h.width/2,y:P-O/2},{x:B+h.width/2,y:P-O/2},{x:B+h.width/2,y:P-O/2+h.height+_},{x:B+m/2,y:P-O/2+h.height+_},{x:B+m/2,y:P+O/2},{x:B-m/2,y:P+O/2},{x:B-m/2,y:P-O/2+h.height+_},{x:B-h.width/2,y:P-O/2+h.height+_}]:W=[{x:B-m/2,y:P-O/2},{x:B+m/2,y:P-O/2},{x:B+m/2,y:P-O/2+p},{x:B+h.width/2,y:P-O/2+p},{x:B+h.width/2/2,y:P+O/2},{x:B-h.width/2,y:P+O/2},{x:B-h.width/2,y:P-O/2+p},{x:B-m/2,y:P-O/2+p}],st.polygon(t,W,E)},c}f(ng,"iconRounded");async function lg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=ft(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await mt(e,t,"icon-shape default"),g=t.pos==="t",p=o+u*2,m=o+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=oi(t),w=-m/2,T=-p/2,_=t.label?8:0,v=ct.svg(c),A=lt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const L=b.get("fill");A.stroke=L??C;const Y=v.path(Ce(w,T,m,p,.1),A),N=Math.max(m,h.width),I=p+h.height+_,Q=v.rectangle(-N/2,-I/2,N,I,{...A,fill:"transparent",stroke:"none"}),M=c.insert(()=>Y,":first-child"),F=c.insert(()=>Q);if(t.icon){const E=c.append("g");E.html(`<g>${await Qi(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const B=E.node().getBBox(),P=B.width,O=B.height,W=B.x,X=B.y;E.attr("transform",`translate(${-P/2-W},${g?h.height/2+_/2-O/2-X:-h.height/2-_/2-O/2-X})`),E.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-I/2:I/2-h.height})`),M.attr("transform",`translate(0,${g?h.height/2+_/2:-h.height/2-_/2})`),dt(t,F),t.intersect=function(E){if(q.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const B=t.x??0,P=t.y??0,O=t.height??0;let W=[];return g?W=[{x:B-h.width/2,y:P-O/2},{x:B+h.width/2,y:P-O/2},{x:B+h.width/2,y:P-O/2+h.height+_},{x:B+m/2,y:P-O/2+h.height+_},{x:B+m/2,y:P+O/2},{x:B-m/2,y:P+O/2},{x:B-m/2,y:P-O/2+h.height+_},{x:B-h.width/2,y:P-O/2+h.height+_}]:W=[{x:B-m/2,y:P-O/2},{x:B+m/2,y:P-O/2},{x:B+m/2,y:P-O/2+p},{x:B+h.width/2,y:P-O/2+p},{x:B+h.width/2/2,y:P+O/2},{x:B-h.width/2,y:P+O/2},{x:B-h.width/2,y:P-O/2+p},{x:B-m/2,y:P-O/2+p}],st.polygon(t,W,E)},c}f(lg,"iconSquare");async function hg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=ft(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),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,o??0);const{shapeSvg:u,bbox:d,label:g}=await mt(e,t,"image-shape default"),p=t.pos==="t",m=-c/2,x=-h/2,C=t.label?8:0,b=ct.svg(u),w=lt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const T=b.rectangle(m,x,c,h,w),_=Math.max(c,d.width),v=h+d.height+C,A=b.rectangle(-_/2,-v/2,_,v,{...w,fill:"none",stroke:"none"}),L=u.insert(()=>T,":first-child"),Y=u.insert(()=>A);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${p?v/2-h:-v/2})`)}return g.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-h/2-d.height/2-C/2:h/2-d.height/2+C/2})`),L.attr("transform",`translate(0,${p?d.height/2+C/2:-d.height/2-C/2})`),dt(t,Y),t.intersect=function(N){if(q.info("iconSquare intersect",t,N),!t.label)return st.rect(t,N);const I=t.x??0,Q=t.y??0,M=t.height??0;let F=[];return p?F=[{x:I-d.width/2,y:Q-M/2},{x:I+d.width/2,y:Q-M/2},{x:I+d.width/2,y:Q-M/2+d.height+C},{x:I+c/2,y:Q-M/2+d.height+C},{x:I+c/2,y:Q+M/2},{x:I-c/2,y:Q+M/2},{x:I-c/2,y:Q-M/2+d.height+C},{x:I-d.width/2,y:Q-M/2+d.height+C}]:F=[{x:I-c/2,y:Q-M/2},{x:I+c/2,y:Q-M/2},{x:I+c/2,y:Q-M/2+h},{x:I+d.width/2,y:Q-M/2+h},{x:I+d.width/2/2,y:Q+M/2},{x:I-d.width/2,y:Q+M/2},{x:I-d.width/2,y:Q-M/2+h},{x:I-c/2,y:Q-M/2+h}],st.polygon(t,F,N)},u}f(hg,"imageSquare");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+n*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:g}=t;if(t.look==="handDrawn"){const p=ct.svg(o),m=lt(t,{}),x=Dt(u),C=p.path(x,m);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&d.attr("style",g)}else d=Re(o,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,dt(t,d),t.intersect=function(p){return st.polygon(t,u,p)},o}f(cg,"inv_trapezoid");async function ug(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))})`),dt(t,a),t.intersect=function(l){return st.rect(t,l)},r}f(ug,"labelRect");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+n,(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:g}=t;if(t.look==="handDrawn"){const p=ct.svg(o),m=lt(t,{}),x=Dt(u),C=p.path(x,m);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&d.attr("style",g)}else d=Re(o,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,dt(t,d),t.intersect=function(p){return st.polygon(t,u,p)},o}f(dg,"lean_left");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+n,(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:g}=t;if(t.look==="handDrawn"){const p=ct.svg(o),m=lt(t,{}),x=Dt(u),C=p.path(x,m);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&d.attr("style",g)}else d=Re(o,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,dt(t,d),t.intersect=function(p){return st.polygon(t,u,p)},o}f(gg,"lean_right");function fg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Ct(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:n,y:0},{x:0,y:o+l/2},{x:n-2*l,y:o+l/2},{x:0,y:2*o},{x:n,y:o-l/2},{x:2*l,y:o-l/2}],h=ct.svg(s),u=lt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=Dt(c),g=h.path(d,u),p=s.insert(()=>g,":first-child");return p.attr("class","outer-path"),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${n/2},${-o})`),dt(t,p),t.intersect=function(m){return q.info("lightningBolt intersect",t,m),st.polygon(t,c,m)},s}f(fg,"lightningBolt");var A1=f((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),M1=f((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),E1=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),oh=10,nh=10;async function pg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<nh&&(t.width=nh);const w=C/2/(2.5+C/50);t.height=(t.height??0)-n-w*3,t.height<oh&&(t.height=oh)}const{shapeSvg:o,bbox:l,label:c}=await mt(e,t,Ct(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),g=(t!=null&&t.height?t==null?void 0:t.height:l.height)+d+n*2,p=g*.1;let m;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=ct.svg(o),b=M1(0,0,h,g,u,d,p),w=E1(0,d,h,g,u,d),T=lt(t,{}),_=C.path(b,T),v=C.path(w,T);o.insert(()=>v,":first-child").attr("class","line"),m=o.insert(()=>_,":first-child"),m.attr("class","basic label-container"),x&&m.attr("style",x)}else{const C=A1(0,0,h,g,u,d,p);m=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",Vt(x)).attr("style",i)}return m.attr("label-offset-y",d),m.attr("transform",`translate(${-h/2}, ${-(g/2+d)})`),dt(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(C){const b=st.rect(t,C),w=b.x-(t.x??0);if(u!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(b.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,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},o}f(pg,"linedCylinder");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const T=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)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:c}=await mt(e,t,Ct(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)+(n??0)*2,d=t.look==="neo"?u/4:u/8,g=u+d,{cssStyles:p}=t,m=ct.svg(o),x=lt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:g/2},...ir(-h/2-h/2*.1,g/2,h/2+h/2*.1,g/2,d,.8),{x:h/2+h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:-g/2},{x:-h/2,y:-g/2},{x:-h/2,y:g/2*1.1},{x:-h/2,y:-g/2}],b=m.polygon(C.map(T=>[T.x,T.y]),x),w=o.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",p),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))})`),dt(t,w),t.intersect=function(T){return st.polygon(t,C,T)},o}f(yg,"linedWaveEdgedRect");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,Ct(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*o,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2+2*o,g=u-2*o,p=d-2*o,m=-g/2,x=-p/2,{cssStyles:C}=t,b=ct.svg(l),w=lt(t,{}),T=[{x:m-o,y:x+o},{x:m-o,y:x+p+o},{x:m+g-o,y:x+p+o},{x:m+g-o,y:x+p},{x:m+g,y:x+p},{x:m+g,y:x+p-o},{x:m+g+o,y:x+p-o},{x:m+g+o,y:x-o},{x:m+o,y:x-o},{x:m+o,y:x},{x:m,y:x},{x:m,y:x+o}],_=[{x:m,y:x+o},{x:m+g-o,y:x+o},{x:m+g-o,y:x+p},{x:m+g,y:x+p},{x:m+g,y:x},{x:m,y:x}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=Dt(T);let A=b.path(v,w);const L=Dt(_);let Y=b.path(L,w);t.look!=="handDrawn"&&(A=vo(A),Y=vo(Y));const N=l.insert("g",":first-child");return N.insert(()=>A),N.insert(()=>Y),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-o-(c.x-(c.left??0))}, ${-(c.height/2)+o-(c.y-(c.top??0))})`),dt(t,N),t.intersect=function(I){return st.polygon(t,T,I)},l}f(mg,"multiRect");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;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,g=t.look==="neo"?d/4:d/8,p=d+(h?g/2:-g/2),m=-u/2,x=-p/2,C=10,{cssStyles:b}=t,w=ir(m-C,x+p+C,m+u-C,x+p+C,g,.8),T=w==null?void 0:w[w.length-1],_=[{x:m-C,y:x+C},{x:m-C,y:x+p+C},...w,{x:m+u-C,y:T.y-C},{x:m+u,y:T.y-C},{x:m+u,y:T.y-2*C},{x:m+u+C,y:T.y-2*C},{x:m+u+C,y:x-C},{x:m+C,y:x-C},{x:m+C,y:x},{x:m,y:x},{x:m,y:x+C}],v=[{x:m,y:x+C},{x:m+u-C,y:x+C},{x:m+u-C,y:T.y-C},{x:m+u,y:T.y-C},{x:m+u,y:x},{x:m,y:x}],A=ct.svg(s),L=lt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const Y=Dt(_),N=A.path(Y,L),I=Dt(v),Q=A.path(I,L),M=s.insert(()=>N,":first-child");return M.insert(()=>Q),M.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-g/2})`),n.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-g/2-(a.y-(a.top??0))})`),dt(t,M),t.intersect=function(F){return st.polygon(t,_,F)},s}f(Cg,"multiWaveEdgedRectangle");async function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i,t.useHtmlLabels||oe(jt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:l}=await mt(e,t,Ct(t)),c=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,d=-h/2,{cssStyles:g}=t,p=ct.svg(n),m=lt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=p.rectangle(u,d,c,h,m),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),dt(t,C),t.intersect=function(b){return st.rect(t,b)},n}f(xg,"note");var $1=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await mt(e,t,Ct(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),l=n+o,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 g=ct.svg(s),p=lt(t,{}),m=$1(0,0,l),x=g.path(m,p);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=Re(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),dt(t,u),t.calcIntersect=function(g,p){const m=g.width,x=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],C=st.polygon(g,x,p);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(g){return this.calcIntersect(t,g)},s}f(bg,"question");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:l,label:c}=await mt(e,t,Ct(t)),h=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?n*2:n),t.height??0),d=u/4,p=-Math.max(h,(t.width??0)-d)/2,m=-u/2,x=m/2,C=[{x:p+x,y:m},{x:p,y:0},{x:p+x,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:b}=t,w=ct.svg(o),T=lt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=Dt(C),v=w.path(_,T),A=o.insert(()=>v,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),dt(t,A),t.intersect=function(L){return st.polygon(t,C,L)},o}f(kg,"rect_left_inv_arrow");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Ke(o,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(oe($t())){const L=h.children[0],Y=Ft(h);u=L.getBoundingClientRect(),Y.attr("width",u.width),Y.attr("height",u.height)}q.info("Text 2",l);const d=l||[],g=h.getBBox(),p=await Ke(o,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),m=p.children[0],x=Ft(p);u=m.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;Ft(p).attr("transform","translate( "+(u.width>g.width?0:(g.width-u.width)/2)+", "+(g.height+C+5)+")"),Ft(h).attr("transform","translate( "+(u.width<g.width?0:-(g.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),w=u.height+(t.padding||0),T=-u.width/2-C,_=-u.height/2-C;let v,A;if(t.look==="handDrawn"){const L=ct.svg(a),Y=lt(t,{}),N=L.path(Ce(T,_,b,w,t.rx||0),Y),I=L.line(-u.width/2-C,-u.height/2-C+g.height+C,u.width/2+C,-u.height/2-C+g.height+C,Y);A=a.insert(()=>(q.debug("Rough node insert CXC",N),I),":first-child"),v=a.insert(()=>(q.debug("Rough node insert CXC",N),N),":first-child")}else v=n.insert("rect",":first-child"),A=n.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),A.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+g.height+C).attr("y2",-u.height/2-C+g.height+C);return dt(t,v),t.intersect=function(L){return st.rect(t,L)},a}f(wg,"rectWithTitle");async function Sg(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 ni(e,t,s)}f(Sg,"roundedRect");var ar=8;async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:l}=await mt(e,t,Ct(t)),c=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?ar:ar*2),h=((t==null?void 0:t.height)??o.height)+a*2,u=c-ar,d=h,g=ar-c/2,p=-h/2,{cssStyles:m}=t,x=ct.svg(n),C=lt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:g,y:p},{x:g+u,y:p},{x:g+u,y:p+d},{x:g-ar,y:p+d},{x:g-ar,y:p},{x:g,y:p},{x:g,y:p+d}],w=x.polygon(b.map(_=>[_.x,_.y]),C),T=n.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Vt(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(${ar/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),dt(t,T),t.intersect=function(_){return st.rect(t,_)},n}f(Tg,"shadedProcess");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:l,label:c}=await mt(e,t,Ct(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)+n*2)*1.5,d=h,g=u/1.5,p=-d/2,m=-g/2,{cssStyles:x}=t,C=ct.svg(o),b=lt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=[{x:p,y:m},{x:p,y:m+g},{x:p+d,y:m+g},{x:p+d,y:m-g/2}],T=Dt(w),_=C.path(T,b),v=o.insert(()=>_,":first-child");return v.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(0, ${g/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))}, ${-g/4+(t.padding??0)-(l.y-(l.top??0))})`),dt(t,v),t.intersect=function(A){return st.polygon(t,w,A)},o}f(_g,"slopedRect");async function Bg(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 ni(e,t,a)}f(Bg,"squareRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=l.height+(t.look==="neo"?n*2:n),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:d}=t,g=ct.svg(o),p=lt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...Ee(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...Ee(h/2-u,0,u,50,270,450)],x=Dt(m),C=g.path(x,p),b=o.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),dt(t,b),t.intersect=function(w){return st.polygon(t,m,w)},o}f(vg,"stadium");async function Lg(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return ni(e,t,r)}f(Lg,"state");function Fg(e,t,{config:{themeVariables:r}}){var b,w;const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,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=ct.svg(h),d=lt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=u.circle(0,0,t.width,{...d,stroke:n,strokeWidth:2}),p=o??l,m=(t.width??0)*5/14,x=u.circle(0,0,m,{...d,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>g,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const T=((w=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:w.id)??"",_=T?`${T}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${_})`)}return dt(t,C),t.intersect=function(T){return st.circle(t,(t.width??0)/2,T)},h}f(Fg,"stateEnd");function Ag(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const h=ct.svg(a).circle(0,0,t.width,E0(i));n=a.insert(()=>h),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${h})`)}return dt(t,n),t.intersect=function(c){return st.circle(t,(t.width??7)/2,c)},a}f(Ag,"stateStart");var Mr=8;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=Math.max(l.width+2*Mr+a,t.width??0),h=Math.max(l.height+n,t.height??0),u=c-2*Mr,d=h,g=-c/2,p=-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 x=ct.svg(o),C=lt(t,{}),b=x.rectangle(g,p,u+16,d,C),w=x.line(g+Mr,p,g+Mr,p+d,C),T=x.line(g+Mr+u,p,g+Mr+u,p+d,C);o.insert(()=>w,":first-child"),o.insert(()=>T,":first-child");const _=o.insert(()=>b,":first-child"),{cssStyles:v}=t;_.attr("class","basic label-container").attr("style",Vt(v)),dt(t,_)}else{const x=Re(o,u,d,m);i&&x.attr("style",i),dt(t,x)}return t.intersect=function(x){return st.polygon(t,m,x)},o}f(Mg,"subroutine");var Fa=.2;async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Fa*(t.height+n*2),10));const{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,h=Fa*c,u=Fa*c,g=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,p=c,m=-g/2,x=-p/2,{cssStyles:C}=t,b=ct.svg(o),w=lt(t,{}),T=[{x:m-h/2,y:x},{x:m+g+h/2,y:x},{x:m+g+h/2,y:x+p},{x:m-h/2,y:x+p}],_=[{x:m+g-h/2,y:x+p},{x:m+g+h/2,y:x+p},{x:m+g+h/2,y:x+p-u}];t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=Dt(T),A=b.path(v,w),L=Dt(_),Y=b.path(L,{...w,fillStyle:"solid"}),N=o.insert(()=>Y,":first-child");return N.insert(()=>A,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),dt(t,N),t.intersect=function(I){return st.polygon(t,T,I)},o}f(Eg,"taggedRect");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await mt(e,t,Ct(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*o,u=.2*l,d=l+c,{cssStyles:g}=t,p=ct.svg(s),m=lt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:d/2},...ir(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],C=-o/2+o/2*.1,b=-d/2-u*.4,w=[{x:C+o-h,y:(b+l)*1.3},{x:C+o,y:b+l-u},{x:C+o,y:(b+l)*.9},...ir(C+o,(b+l)*1.25,C+o-h,(b+l)*1.3,-l*.02,.5)],T=Dt(x),_=p.path(T,m),v=Dt(w),A=p.path(v,{...m,fillStyle:"solid"}),L=s.insert(()=>A,":first-child");return L.insert(()=>_,":first-child"),L.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-c/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),dt(t,L),t.intersect=function(Y){return st.polygon(t,x,Y)},s}f($g,"taggedWaveEdgedRectangle");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await mt(e,t,Ct(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-n/2,c=-o/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",n).attr("height",o),dt(t,h),t.intersect=function(u){return st.rect(t,u)},s}f(Og,"text");var O1=f((e,t,r,i,s,a)=>`M${e},${t}
200
+ a${s},${a} 0,0,1 0,${-i}
201
+ l${r},0
202
+ a${s},${a} 0,0,1 0,${i}
203
+ M${r},${-i}
204
+ a${s},${a} 0,0,0 0,${i}
205
+ l${-r},0`,"createCylinderPathD"),P1=f((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"),D1=f((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),lh=5,hh=10;async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,n=t.height??0;if(t.height&&(t.height=t.height-a,t.height<lh&&(t.height=lh)),t.width){const C=n/2/(2.5+n/50);t.width=t.width-a-C*3,t.width<hh&&(t.width=hh)}const{shapeSvg:o,bbox:l,label:c}=await mt(e,t,Ct(t)),h=Math.max(t.height??0,l.height)+a,u=h/2,d=u/(2.5+h/50),g=Math.max(t.width??0,l.width)+d+a,{cssStyles:p}=t;let m;if(t.look==="handDrawn"){const x=ct.svg(o),C=P1(0,0,g,h,d,u),b=D1(0,0,g,h,d,u),w=x.path(C,lt(t,{})),T=x.path(b,lt(t,{fill:"none"}));m=o.insert(()=>T,":first-child"),m=o.insert(()=>w,":first-child"),m.attr("class","basic label-container"),p&&m.attr("style",p)}else{const x=O1(0,0,g,h,d,u);m=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",Vt(p)).attr("style",i),m.attr("class","basic label-container outer-path"),p&&m.selectAll("path").attr("style",p),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",d),m.attr("transform",`translate(${-g/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-d-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),dt(t,m),t.intersect=function(x){const C=st.rect(t,x),b=C.y-(t.y??0);if(u!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-d)){let w=d*d*(1-b*b/(u*u));w!=0&&(w=Math.sqrt(Math.abs(w))),w=d-w,x.x-(t.x??0)>0&&(w=-w),C.x+=w}return C},o}f(Pg,"tiltedCylinder");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:l}=await mt(e,t,Ct(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+n,(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:g}=t;if(t.look==="handDrawn"){const p=ct.svg(o),m=lt(t,{}),x=Dt(u),C=p.path(x,m);d=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&d.attr("style",g)}else d=Re(o,h,c,u);return i&&d.attr("style",i),t.width=h,t.height=c,dt(t,d),t.intersect=function(p){return st.polygon(t,u,p)},o}f(Dg,"trapezoid");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:c,bbox:h}=await mt(e,t,Ct(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)+n*2,{cssStyles:g}=t,p=ct.svg(c),m=lt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{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}],C=Dt(x),b=p.path(C,m),w=c.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),dt(t,w),t.intersect=function(T){return st.polygon(t,x,T)},c}f(Ig,"trapezoidalPentagon");var ch=10,uh=10;async function Rg(e,t){var T;const{labelStyles:r,nodeStyles:i}=ft(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<uh&&(t.width=uh),t.height=(t==null?void 0:t.height)??0,t.height<ch&&(t.height=ch));const{shapeSvg:n,bbox:o,label:l}=await mt(e,t,Ct(t)),c=Ie((T=$t().flowchart)==null?void 0:T.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+o.height,d=u,g=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:p}=t,m=ct.svg(n),x=lt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Dt(g),b=m.path(C,x),w=n.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),t.width=h,t.height=u,dt(t,w),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${u/2-(o.height+(t.padding??0)/(c?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(_){return q.info("Triangle intersect",t,g,_),st.polygon(t,g,_)},n}f(Rg,"triangle");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await mt(e,t,Ct(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)+(n??0)*2,g=t.look==="neo"?d/4:d/8,p=d+(o?g:-g),{cssStyles:m}=t,C=14-u,b=C>0?C/2:0,w=ct.svg(l),T=lt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const _=[{x:-u/2-b,y:p/2},...ir(-u/2-b,p/2,u/2+b,p/2,g,.8),{x:u/2+b,y:-p/2},{x:-u/2-b,y:-p/2}],v=Dt(_),A=w.path(v,T),L=l.insert(()=>A,":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,${-g/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-g-(c.y-(c.top??0))})`),dt(t,L),t.intersect=function(Y){return st.polygon(t,_,Y)},l}f(qg,"waveEdgedRectangle");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-T*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:l}=await mt(e,t,Ct(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)+n,u=h/8,d=h+u*2,{cssStyles:g}=t,p=ct.svg(o),m=lt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-c/2,y:d/2},...ir(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...ir(c/2,-d/2,-c/2,-d/2,u,-1)],C=Dt(x),b=p.path(C,m),w=o.insert(()=>b,":first-child");return w.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),dt(t,w),t.intersect=function(T){return st.polygon(t,x,T)},o}f(Ng,"waveRectangle");var Yt=10;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=ft(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-Yt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-Yt,10));const{shapeSvg:n,bbox:o,label:l}=await mt(e,t,Ct(t)),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+Yt,h=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+Yt,u=c-Yt,d=h-Yt,g=-u/2,p=-d/2,{cssStyles:m}=t,x=ct.svg(n),C=lt(t,{}),b=[{x:g-Yt,y:p-Yt},{x:g-Yt,y:p+d},{x:g+u,y:p+d},{x:g+u,y:p-Yt}],w=`M${g-Yt},${p-Yt} L${g+u},${p-Yt} L${g+u},${p+d} L${g-Yt},${p+d} L${g-Yt},${p-Yt}
206
+ M${g-Yt},${p} L${g+u},${p}
207
+ M${g},${p-Yt} L${g},${p+d}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=x.path(w,C),_=n.insert(()=>T,":first-child");return _.attr("transform",`translate(${Yt/2}, ${Yt/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(${-(o.width/2)+Yt/2-(o.x-(o.left??0))}, ${-(o.height/2)+Yt/2-(o.y-(o.top??0))})`),dt(t,_),t.intersect=function(v){return st.polygon(t,b,v)},n}f(Wg,"windowPane");var dh=new Set(["redux-color","redux-dark-color"]),I1=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function _n(e,t){var St,kt,Mt,bt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=jt(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:it}=jt(),{background:ht}=it,Bt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ht}`]};await _n(e,Bt)}const c=jt();t.useHtmlLabels=c.htmlLabels;let h=((St=c.er)==null?void 0:St.diagramPadding)??10,u=((kt=c.er)==null?void 0:kt.entityPadding)??6;const{cssStyles:d}=t,{labelStyles:g,nodeStyles:p}=ft(t);if(r.attributes.length===0&&t.label){const it={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ye(t.label,c)+it.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ht=await ni(e,t,it);if(i!=null&&dh.has(i)){const Bt=r.colorIndex??0;ht.attr("data-color-id",`color-${Bt%l.length}`)}if(!Ie(c.htmlLabels)){const Bt=ht.select("text"),Et=(Mt=Bt.node())==null?void 0:Mt.getBBox();Bt.attr("transform",`translate(${-Et.width/2}, 0)`)}return ht}c.htmlLabels||(h*=1.25,u*=1.25);let m=Ct(t);m||(m="node default");const x=e.insert("g").attr("class",m).attr("id",t.domId||t.id),C=await Er(x,t.label??"",c,0,0,["name"],g);C.height+=u;let b=0;const w=[],T=[];let _=0,v=0,A=0,L=0,Y=!0,N=!0;for(const it of r.attributes){const ht=await Er(x,it.type,c,0,b,["attribute-type"],g);_=Math.max(_,ht.width+h);const Bt=await Er(x,it.name,c,0,b,["attribute-name"],g);v=Math.max(v,Bt.width+h);const Et=await Er(x,it.keys.join(),c,0,b,["attribute-keys"],g);A=Math.max(A,Et.width+h);const qt=await Er(x,it.comment,c,0,b,["attribute-comment"],g);L=Math.max(L,qt.width+h);const z=Math.max(ht.height,Bt.height,Et.height,qt.height)+u;T.push({yOffset:b,rowHeight:z}),b+=z}let I=4;A<=h&&(Y=!1,A=0,I--),L<=h&&(N=!1,L=0,I--);const Q=x.node().getBBox();if(C.width+h*2-(_+v+A+L)>0){const it=C.width+h*2-(_+v+A+L);_+=it/I,v+=it/I,A>0&&(A+=it/I),L>0&&(L+=it/I)}const M=_+v+A+L,F=ct.svg(x),E=lt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let B=0;T.length>0&&(B=T.reduce((it,ht)=>it+((ht==null?void 0:ht.rowHeight)??0),0));const P=Math.max(Q.width+h*2,(t==null?void 0:t.width)||0,M),O=Math.max((B??0)+C.height,(t==null?void 0:t.height)||0),W=-P/2,X=-O/2;if(x.selectAll("g:not(:first-child)").each((it,ht,Bt)=>{const Et=Ft(Bt[ht]),qt=Et.attr("transform");let z=0,vt=0;if(qt){const Be=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(qt);Be&&(z=parseFloat(Be[1]),vt=parseFloat(Be[2]),Et.attr("class").includes("attribute-name")?z+=_:Et.attr("class").includes("attribute-keys")?z+=_+v:Et.attr("class").includes("attribute-comment")&&(z+=_+v+A))}Et.attr("transform",`translate(${W+h/2+z}, ${vt+X+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(X+u/2)+")"),i!=null&&dh.has(i)){const it=r.colorIndex??0;x.attr("data-color-id",`color-${it%l.length}`)}const at=F.rectangle(W,X,P,O,E),ot=x.insert(()=>at,":first-child").attr("class","outer-path").attr("style",d.join(""));w.push(0);for(const[it,ht]of T.entries()){const Et=(it+1)%2===0&&ht.yOffset!==0,qt=F.rectangle(W,C.height+X+(ht==null?void 0:ht.yOffset),P,ht==null?void 0:ht.rowHeight,{...E,fill:Et?a:n,stroke:o});x.insert(()=>qt,"g.label").attr("style",d.join("")).attr("class",`row-rect-${Et?"even":"odd"}`)}const gt=1e-4;let yt=$r(W,C.height+X,P+W,C.height+X,gt),nt=F.polygon(yt.map(it=>[it.x,it.y]),E);if(x.insert(()=>nt).attr("class","divider"),yt=$r(_+W,C.height+X,_+W,O+X,gt),nt=F.polygon(yt.map(it=>[it.x,it.y]),E),x.insert(()=>nt).attr("class","divider"),Y){const it=_+v+W;yt=$r(it,C.height+X,it,O+X,gt),nt=F.polygon(yt.map(ht=>[ht.x,ht.y]),E),x.insert(()=>nt).attr("class","divider")}if(N){const it=_+v+A+W;yt=$r(it,C.height+X,it,O+X,gt),nt=F.polygon(yt.map(ht=>[ht.x,ht.y]),E),x.insert(()=>nt).attr("class","divider")}for(const it of w){const ht=C.height+X+it;yt=$r(W,ht,P+W,ht,gt),nt=F.polygon(yt.map(Bt=>[Bt.x,Bt.y]),E),x.insert(()=>nt).attr("class","divider")}if(dt(t,ot),p&&t.look!=="handDrawn")if(i!=null&&I1.has(i))x.selectAll("path").attr("style",p);else{const it=p.split(";"),ht=(bt=it==null?void 0:it.filter(Bt=>Bt.includes("stroke")))==null?void 0:bt.map(Bt=>`${Bt}`).join("; ");x.selectAll("path").attr("style",ht??""),x.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(it){return st.rect(t,it)},x}f(_n,"erBox");async function Er(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==ul(t)&&(t=ul(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await _e(o,t,{width:Ye(t,r)+100,style:n,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(Ie(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}f(Er,"addText");function $r(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}]}f($r,"lineToPolygon");async function zg(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",Ct(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,d=0,g=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Li(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=n.insert("g").attr("class","label-group text"),await Li(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();d=p.height,c=n.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const w=await Li(c,b,m,[b.parseClassifier()]);m+=w+a}g=c.node().getBBox().height,g<=0&&(g=s/2),h=n.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const w=await Li(h,b,x,[b.parseClassifier()]);x+=w+a}let C=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${u})`),C=n.node().getBBox(),c.attr("transform",`translate(0, ${u+d+s*2})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(g?g+s*4:s*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}f(zg,"textHelper");async function Li(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=jt();let n="useHtmlLabels"in t?t.useHtmlLabels:Ie(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),Wi(o)&&(n=!0);const l=await _e(s,Xo(er(o)),{width:Ye(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let c,h=1;if(n){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 kn(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=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[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}f(Li,"addText");async function Hg(e,t){var F,E;const r=$t(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,n=a,o=t.useHtmlLabels??Ie(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await zg(e,t,r,o,n),{labelStyles:u,nodeStyles:d}=ft(t);t.labelStyle=u,t.cssStyles=l.styles||"";const g=((F=l.styles)==null?void 0:F.join(";"))||d||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!((E=r.class)!=null&&E.hideEmptyMembersBox),m=ct.svg(c),x=lt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const w=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=n:l.members.length>0&&l.methods.length===0&&(b+=n*2);const T=-C/2,_=-b/2;let v=p?a*2:l.members.length===0&&l.methods.length===0?-a:0;w&&(v=a*2);const A=m.rectangle(T-a,_-a-(p?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,b+2*a+v,x),L=c.insert(()=>A,":first-child");L.attr("class","basic label-container outer-path");const Y=L.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(p?a/2:0)||0,I=c.select(".label-group").node().getBBox().height-(p?a/2:0)||0,Q=c.select(".members-group").node().getBBox().height-(p?a/2:0)||0,M=(N+I+_+a-(_-a-(p?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((B,P,O)=>{var yt,nt;const W=Ft(O[P]),X=W.attr("transform");let at=0;if(X){const kt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(X);kt&&(at=parseFloat(kt[2]))}let ot=at+_+a-(p?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(W.attr("class").includes("methods-group")){const St=Math.max(Q,n/2);w?ot=Math.max(M,N+I+St+_+n*2+a)+n*2:ot=N+I+St+_+n*4+a}l.members.length===0&&l.methods.length===0&&((yt=r.class)!=null&&yt.hideEmptyMembersBox)&&(l.annotations.length>0?ot=at-n:ot=at),o||(ot-=4);let gt=T;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(gt=-((nt=W.node())==null?void 0:nt.getBBox().width)/2||0,c.selectAll("text").each(function(St,kt,Mt){window.getComputedStyle(Mt[kt]).textAnchor==="middle"&&(gt=0)})),W.attr("transform",`translate(${gt}, ${ot})`)}),l.members.length>0||l.methods.length>0||p){const B=N+I+_+a,P=m.line(Y.x,B,Y.x+Y.width,B+.001,x);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",g)}if(p||l.members.length>0||l.methods.length>0){const B=N+I+Q+_+n*2+a,P=m.line(Y.x,w?Math.max(M,B):B,Y.x+Y.width,(w?Math.max(M,B):B)+.001,x);c.insert(()=>P).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",g)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",g),L.select(":nth-child(2)").attr("style",g),c.selectAll(".divider").select("path").attr("style",g),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",g),!o){const B=RegExp(/color\s*:\s*([^;]*)/),P=B.exec(g);if(P){const O=P[0].replace("color","fill");c.selectAll("tspan").attr("style",O)}else if(u){const O=B.exec(u);if(O){const W=O[0].replace("color","fill");c.selectAll("tspan").attr("style",W)}}}return dt(t,L),t.intersect=function(B){return st.rect(t,B)},c}f(Hg,"classBox");async function jg(e,t){var I,Q;const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,l="verifyMethod"in t,c=Ct(t),h=$t(),{themeVariables:u}=h,{borderColorArray:d,requirementEdgeLabelBackground:g}=u,p=h.layout==="elk"?"start":"center",m=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await Fe(m,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):x=await Fe(m,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let C=x;const b=await Fe(m,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=b+o,l){const M=await Fe(m,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,p);C+=M;const F=await Fe(m,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,p);C+=F;const E=await Fe(m,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,p);C+=E,await Fe(m,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,p)}else{const M=await Fe(m,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,p);C+=M,await Fe(m,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,p)}const w=(((I=m.node())==null?void 0:I.getBBox().width)??200)+n,T=(((Q=m.node())==null?void 0:Q.getBBox().height)??200)+n,_=-w/2,v=-T/2,A=ct.svg(m),L=lt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const Y=A.rectangle(_,v,w,T,L),N=m.insert(()=>Y,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",i),d!=null&&d.length){const M=t.colorIndex??0;m.attr("data-color-id",`color-${M%d.length}`)}if(m.selectAll(".label").each((M,F,E)=>{const B=Ft(E[F]),P=B.attr("transform");let O=0,W=0;if(P){const gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);gt&&(O=parseFloat(gt[1]),W=parseFloat(gt[2]))}const X=W-T/2;let at=_+n/2;(F===0||F===1)&&(at=O),B.attr("transform",`translate(${at}, ${X+n})`)}),C>x+b+o){const M=v+x+b+o;let F;if(t.look==="neo"){const P=[[_,M],[_+w,M],[_+w,M+.001],[_,M+.001]];F=A.polygon(P,L)}else F=A.line(_,M,_+w,M,L);m.insert(()=>F).attr("class","divider")}return dt(t,N),t.intersect=function(M){return st.rect(t,M)},i&&t.look!=="handDrawn"&&(g||d!=null&&d.length)&&m.selectAll("path").attr("style",i),m}f(jg,"requirementBox");async function Fe(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=$t(),o=n.htmlLabels??!0,l=await _e(a,Xo(er(t)),{width:Ye(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let c;if(o){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}f(Fe,"addText");var R1=f(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 Yg(e,t,{config:r}){var Q,M;const{labelStyles:i,nodeStyles:s}=ft(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await mt(e,t,Ct(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&((Q=r==null?void 0:r.kanban)!=null&&Q.ticketBaseUrl)&&(u=(M=r==null?void 0:r.kanban)==null?void 0:M.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;d?{label:p,bbox:m}=await va(d,"ticket"in t&&t.ticket||"",g):{label:p,bbox:m}=await va(o,"ticket"in t&&t.ticket||"",g);const{label:x,bbox:C}=await va(o,"assigned"in t&&t.assigned||"",g);t.width=n;const b=10,w=(t==null?void 0:t.width)||0,T=Math.max(m.height,C.height)/2,_=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+T,v=-w/2,A=-_/2;c.attr("transform","translate("+(h-w/2)+", "+(-T-l.height/2)+")"),p.attr("transform","translate("+(h-w/2)+", "+(-T+l.height/2)+")"),x.attr("transform","translate("+(h+w/2-C.width-2*a)+", "+(-T+l.height/2)+")");let L;const{rx:Y,ry:N}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const F=ct.svg(o),E=lt(t,{}),B=Y||N?F.path(Ce(v,A,w,_,Y||0),E):F.rectangle(v,A,w,_,E);L=o.insert(()=>B,":first-child"),L.attr("class","basic label-container").attr("style",I||null)}else{L=o.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",Y??5).attr("ry",N??5).attr("x",v).attr("y",A).attr("width",w).attr("height",_);const F="priority"in t&&t.priority;if(F){const E=o.append("line"),B=v+2,P=A+Math.floor((Y??0)/2),O=A+_-Math.floor((Y??0)/2);E.attr("x1",B).attr("y1",P).attr("x2",B).attr("y2",O).attr("stroke-width","4").attr("stroke",R1(F))}}return dt(t,L),t.height=_,t.intersect=function(F){return st.rect(t,F)},o}f(Yg,"kanbanItem");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await mt(e,t,Ct(t)),l=a.width+10*n,c=a.height+8*n,h=.15*l,{cssStyles:u}=t,d=a.width+20,g=a.height+20,p=Math.max(l,d),m=Math.max(c,g);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
208
+ a${h},${h} 1 0,0 ${p*.25},${-1*m*.1}
209
+ a${h},${h} 1 0,0 ${p*.25},0
210
+ a${h},${h} 1 0,0 ${p*.25},0
211
+ a${h},${h} 1 0,0 ${p*.25},${m*.1}
212
+
213
+ a${h},${h} 1 0,0 ${p*.15},${m*.33}
214
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
215
+ a${h},${h} 1 0,0 ${-1*p*.15},${m*.33}
216
+
217
+ a${h},${h} 1 0,0 ${-1*p*.25},${m*.15}
218
+ a${h},${h} 1 0,0 ${-1*p*.25},0
219
+ a${h},${h} 1 0,0 ${-1*p*.25},0
220
+ a${h},${h} 1 0,0 ${-1*p*.25},${-1*m*.15}
221
+
222
+ a${h},${h} 1 0,0 ${-1*p*.1},${-1*m*.33}
223
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
224
+ a${h},${h} 1 0,0 ${p*.1},${-1*m*.33}
225
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=ct.svg(s),w=lt(t,{}),T=b.path(C,w);x=s.insert(()=>T,":first-child"),x.attr("class","basic label-container").attr("style",Vt(u))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-p/2}, ${-m/2})`),dt(t,x),t.calcIntersect=function(b,w){return st.rect(b,w)},t.intersect=function(b){return q.info("Bang intersect",t,b),st.rect(t,b)},s}f(Ug,"bang");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await mt(e,t,Ct(t)),l=a.width+2*n,c=a.height+2*n,h=.15*l,u=.25*l,d=.35*l,g=.2*l,{cssStyles:p}=t;let m;const x=`M0 0
226
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
227
+ a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
228
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
229
+
230
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
231
+ a${g},${g} 1 0,1 ${-1*l*.15},${c*.65}
232
+
233
+ a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
234
+ a${d},${d} 1 0,1 ${-1*l*.5},0
235
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
236
+
237
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
238
+ a${g},${g} 1 0,1 ${l*.1},${-1*c*.65}
239
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=ct.svg(s),b=lt(t,{}),w=C.path(x,b);m=s.insert(()=>w,":first-child"),m.attr("class","basic label-container").attr("style",Vt(p))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),dt(t,m),t.calcIntersect=function(C,b){return st.rect(C,b)},t.intersect=function(C){return q.info("Cloud intersect",t,C),st.rect(t,C)},s}f(Gg,"cloud");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=ft(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await mt(e,t,Ct(t)),l=a.width+8*n,c=a.height+2*n,h=5,u=t.look==="neo"?`
240
+ M${-l/2} ${c/2-h}
241
+ v${-c+2*h}
242
+ q0,-${h} ${h},-${h}
243
+ h${l-2*h}
244
+ q${h},0 ${h},${h}
245
+ v${c-h}
246
+ H${-l/2}
247
+ Z
248
+ `:`
249
+ M${-l/2} ${c/2-h}
250
+ v${-c+2*h}
251
+ q0,-${h} ${h},-${h}
252
+ h${l-2*h}
253
+ q${h},0 ${h},${h}
254
+ v${c-2*h}
255
+ q0,${h} ${-h},${h}
256
+ h${-(l-2*h)}
257
+ q${-h},0 ${-h},${-h}
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),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),dt(t,d),t.calcIntersect=function(g,p){return st.rect(g,p)},t.intersect=function(g){return st.rect(t,g)},s}f(Xg,"defaultMindmapNode");async function Vg(e,t){const r={padding:t.padding??0};return Tn(e,t,r)}f(Vg,"mindmapCircle");var q1=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Bg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Sg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:vg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Mg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Xd},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Vd},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:tg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:$d},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Nd},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Dd},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Gd},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Tn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ug},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Gg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:bg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ig},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:gg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:dg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Dg},{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:cg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Kd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Og},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Id},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Tg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ag},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Fg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:eg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:sg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Hd},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:jd},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Yd},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:fg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:rg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Pg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:pg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Ud},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Zd},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Rg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Wg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Qd},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ig},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Jd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:_g},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Cg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:mg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ed},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:zd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:$g},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Eg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ng},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:yg}],N1=f(()=>{const t=[...Object.entries({state:Lg,choice:Rd,note:xg,composite:qd,rectWithTitle:wg,labelRect:ug,block_arrow:Pd,collapsedGroup:Od,iconSquare:lg,iconCircle:og,icon:ag,iconRounded:ng,imageSquare:hg,anchor:Ad,kanbanItem:Yg,mindmapCircle:Vg,defaultMindmapNode:Xg,classBox:Hg,erBox:_n,requirementBox:jg}),...q1.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Zg=N1();function W1(e){return e in Zg}f(W1,"isValidShape");var ia=f(({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"),sa=new Map;async function Bn(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Zg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",Vt(t.look)),t.tooltip&&s.attr("title",t.tooltip),sa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Bn,"insertNode");var AL=f((e,t)=>{sa.set(t.id,e)},"setNodeElem"),z1=f(()=>{sa.clear()},"clear"),gh=f(e=>{const t=sa.get(e.id);q.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"),H1=f(async(e,t)=>{const r=$t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,o=n,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=ft(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),g=Ie(r.flowchart.htmlLabels),p=t.direction==="LR",m=d.insert("g").attr("class","cluster-label swimlane-label"),x=await _e(m,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let C=x.getBBox();if(g){const M=x.children[0],F=Ft(x);C=M.getBoundingClientRect(),F.attr("width",C.width),F.attr("height",C.height)}const b=t.padding??0,w=t.width<=C.width+b?C.width+b:t.width;t.width<=C.width+b?t.diff=(w-t.width)/2-b:t.diff=-b;const T=t.height,_=t.y-T/2,v=t.y+T/2,A=t.x-w/2,L=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:_+T/3,Y=p?4:0,N=C.height+2*Y;let I,Q;if(p){const M=Math.max(N,C.height+2*Y),F=A+M,E=Math.max(0,w-M);if(t.look==="handDrawn"){const O=ct.svg(d),W=lt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),X=lt(t,{roughness:.7,fill:"none",stroke:o,seed:s}),at=O.rectangle(A,_,M,T,W);I=d.insert(()=>at,":first-child");const ot=O.rectangle(F,_,E,T,X);Q=d.insert(()=>ot,":first-child"),I.select("path:nth-child(2)").attr("style",h.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=d.insert("rect",":first-child"),Q=d.insert("rect",":first-child"),I.attr("class","swimlane-title").attr("style",c).attr("x",A).attr("y",_).attr("width",M).attr("height",T).attr("fill",a).attr("stroke",o),Q.attr("class","swimlane-body").attr("style",c).attr("x",F).attr("y",_).attr("width",E).attr("height",T).attr("fill","none").attr("stroke",o);const B=A+M/2,P=t.y;m.attr("transform",`translate(${B}, ${P}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const M=Math.max(0,L-_),F=Math.min(N,M),E=_+F,B=Math.max(0,v-E),P=t.x-w/2;if(t.look==="handDrawn"){const X=ct.svg(d),at=lt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),ot=lt(t,{roughness:.7,fill:"none",stroke:o,seed:s}),gt=X.rectangle(P,_,w,F,at);I=d.insert(()=>gt,":first-child");const yt=X.rectangle(P,E,w,B,ot);Q=d.insert(()=>yt,":first-child"),I.select("path:nth-child(2)").attr("style",h.join(";")),I.select("path").attr("style",u.join(";").replace("fill","stroke"))}else I=d.insert("rect",":first-child"),Q=d.insert("rect",":first-child"),I.attr("class","swimlane-title").attr("style",c).attr("x",P).attr("y",_).attr("width",w).attr("height",F).attr("fill",a).attr("stroke",o),Q.attr("class","swimlane-body").attr("style",c).attr("x",P).attr("y",E).attr("width",w).attr("height",B).attr("fill","none").attr("stroke",o);const O=t.x-C.width/2,W=_+(F-C.height)/2;m.attr("transform",`translate(${O}, ${W})`)}if(q.trace("Swimlane data ",t,JSON.stringify(t)),l){const M=m.select("span");M&&M.attr("style",l)}return t.offsetX=0,t.width=w,t.height=T,t.offsetY=C.height-b/2,t.intersect=function(M){return kr(t,M)},{cluster:d,labelBBox:C}},"swimlane"),Kg=f(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=$t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ft(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=oe(r),g=u.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await _e(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):p=await Ke(g,t.label,t.labelStyle||"",!1,!0);let m=p.getBBox();if(oe(r)){const A=p.children[0],L=Ft(p);m=A.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const x=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,w=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const A=ct.svg(u),L=lt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Y=A.path(Ce(b,w,x,C,0),L);T=u.insert(()=>(q.debug("Rough node insert CXC",Y),Y),":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",b).attr("y",w).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:_}=ia(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),o){const A=g.select("span");A&&A.attr("style",o)}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(A){return kr(t,A)},{cluster:u,labelBBox:m}},"rect"),j1=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return kr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Y1=f(async(e,t)=>{const r=$t(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:n,compositeTitleBackground:o,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 g=await Ke(u,t.label,t.labelStyle,void 0,!0);let p=g.getBBox();if(oe(r)){const Y=g.children[0],N=Ft(g);p=Y.getBoundingClientRect(),N.attr("width",p.width),N.attr("height",p.height)}const m=0*t.padding,x=m/2,C=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,w=t.height+m-p.height-6,T=t.x-C/2,_=t.y-b/2;t.width=C;const v=t.y-t.height/2-x+p.height+2;let A;if(t.look==="handDrawn"){const Y=t.cssClasses.includes("statediagram-cluster-alt"),N=ct.svg(c),I=t.rx||t.ry?N.path(Ce(T,_,C,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(T,_,C,b,{seed:s});A=c.insert(()=>I,":first-child");const Q=N.rectangle(T,v,C,w,{fill:Y?a:n,fillStyle:Y?"hachure":"solid",stroke:l,seed:s});A=c.insert(()=>I,":first-child"),d=c.insert(()=>Q)}else A=h.insert("rect",":first-child"),A.attr("class","outer").attr("x",T).attr("y",_).attr("width",C).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",T).attr("y",v).attr("width",C).attr("height",w);u.attr("transform",`translate(${t.x-p.width/2}, ${_+1-(oe(r)?0:3)})`);const L=A.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(Y){return kr(t,Y)},{cluster:c,labelBBox:p}},"roundedWithTitle"),U1=f(async(e,t)=>{q.info("Creating subgraph rect for ",t.id,t);const r=$t(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=ft(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=oe(r),g=u.insert("g").attr("class","cluster-label "),p=await _e(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=p.getBBox();if(oe(r)){const A=p.children[0],L=Ft(p);m=A.getBoundingClientRect(),L.attr("width",m.width),L.attr("height",m.height)}const x=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,w=t.y-C/2;q.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const A=ct.svg(u),L=lt(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),Y=A.path(Ce(b,w,x,C,t.rx),L);T=u.insert(()=>(q.debug("Rough node insert CXC",Y),Y),":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",b).attr("y",w).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:_}=ia(r);if(g.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),o){const A=g.select("span");A&&A.attr("style",o)}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(A){return kr(t,A)},{cluster:u,labelBBox:m}},"kanbanSection"),G1=f((e,t)=>{const r=$t(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,n=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=n.insert("g",":first-child"),l=0*t.padding,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 g;if(t.look==="handDrawn"){const x=ct.svg(n).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});g=n.insert(()=>x,":first-child")}else{g=o.insert("rect",":first-child");let m="outer";t.look,m="divider",g.attr("class",m).attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=g.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return kr(t,m)},{cluster:n,labelBBox:{}}},"divider"),X1=Kg,V1={rect:Kg,squareRect:X1,roundedWithTitle:Y1,noteGroup:j1,divider:G1,kanbanSection:U1,swimlane:H1},Qg=new Map,Jg=f(async(e,t)=>{const r=t.shape||"rect",i=await V1[r](e,t);return Qg.set(t.id,i),i},"insertCluster"),Z1=f(()=>{Qg=new Map},"clear"),wi=f((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"),se={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},fh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Fi(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],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}f(Fi,"calculateDeltaAndAngle");var Ht=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),K1=f(e=>({x:f(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(se,e.arrowTypeStart)){const{angle:g,deltaX:p}=Fi(i[0],i[1]);s=se[e.arrowTypeStart]*Math.cos(g)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(se,e.arrowTypeEnd)){const{angle:g,deltaX:p}=Fi(i[i.length-1],i[i.length-2]);s=se[e.arrowTypeEnd]*Math.cos(g)*(p>=0?1:-1)}const n=Math.abs(Ht(t).x-Ht(i[i.length-1]).x),o=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=se[e.arrowTypeStart],u=se[e.arrowTypeEnd],d=1;if(n<u&&n>0&&o<u){let g=u+d-n;g*=a==="right"?-1:1,s-=g}if(l<h&&l>0&&c<h){let g=h+d-l;g*=a==="right"?-1:1,s+=g}return Ht(t).x+s},"x"),y:f(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(se,e.arrowTypeStart)){const{angle:g,deltaY:p}=Fi(i[0],i[1]);s=se[e.arrowTypeStart]*Math.abs(Math.sin(g))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(se,e.arrowTypeEnd)){const{angle:g,deltaY:p}=Fi(i[i.length-1],i[i.length-2]);s=se[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(p>=0?1:-1)}const n=Math.abs(Ht(t).y-Ht(i[i.length-1]).y),o=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=se[e.arrowTypeStart],u=se[e.arrowTypeEnd],d=1;if(n<u&&n>0&&o<u){let g=u+d-n;g*=a==="up"?-1:1,s-=g}if(l<h&&l>0&&c<h){let g=h+d-l;g*=a==="up"?-1:1,s+=g}return Ht(t).y+s},"y")}),"getLineFunctionsWithOffset"),Q1=f((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&ph(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&ph(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),J1={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}},tk=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ph=f((e,t,r,i,s,a,n=!1,o)=>{var p;if(!r||r==="none")return;const l=J1[r],c=l&&tk.includes(l.type);if(!l){q.warn(`Unknown arrow type: ${r}`);return}const h=l.type,g=`${s}_${a}-${h}${t==="start"?"Start":"End"}${n&&c?"-margin":""}`;if(o&&o.trim()!==""){const m=o.replace(/[^\dA-Za-z]/g,"_"),x=`${g}_${m}`;if(!document.getElementById(x)){const C=document.getElementById(g);if(C){const b=C.cloneNode(!0);b.id=x,b.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),l.fill&&T.setAttribute("fill",o)}),(p=C.parentNode)==null||p.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${g})`)},"addEdgeMarker"),ek=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=$t())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),ii=new Map,Ut=new Map,rk=f(()=>{ii.clear(),Ut.clear()},"clear"),tf=f(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Si=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),vn=f(async(e,t)=>{const r=$t();let i=oe(r);const{labelStyles:s}=ft(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",c=await _e(e,t.label,{style:Si(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(c),q.info("abc82",t,t.labelType);let h,u;if(i){const g=c.children[0],p=Ft(c);h=await yr.measure(()=>g.getBoundingClientRect()),u=h,p.attr("width",h.width),p.attr("height",h.height)}else{const g=Ft(c).select("text").node();await yr.measure(()=>{h=c.getBBox(),g&&typeof g.getBBox=="function"?u=g.getBBox():u=h})}n.attr("transform",wi(u,i)),ii.set(t.id,a),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),m=await Ke(p,t.startLabelLeft,Si(t.labelStyle)||"",!1,!1);d=m;let x=m.getBBox();if(i){const C=m.children[0],b=Ft(m);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",wi(x,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startLeft=g,Ai(d,t.startLabelLeft)}if(t.startLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),m=await Ke(p,t.startLabelRight,Si(t.labelStyle)||"",!1,!1);d=m;let x=m.getBBox();if(i){const C=m.children[0],b=Ft(m);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",wi(x,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).startRight=g,Ai(d,t.startLabelRight)}if(t.endLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),m=await Ke(g,t.endLabelLeft,Si(t.labelStyle)||"",!1,!1);d=m;let x=m.getBBox();if(i){const C=m.children[0],b=Ft(m);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",wi(x,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endLeft=g,Ai(d,t.endLabelLeft)}if(t.endLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),m=await Ke(g,t.endLabelRight,Si(t.labelStyle)||"",!1,!1);d=m;let x=m.getBBox();if(i){const C=m.children[0],b=Ft(m);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",wi(x,i)),Ut.get(t.id)||Ut.set(t.id,{}),Ut.get(t.id).endRight=g,Ai(d,t.endLabelRight)}return c},"insertEdgeLabel");function Ai(e,t){oe($t())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Ai,"setTerminalWidth");var ik=f((e,t)=>{q.debug("Moving label abc88 ",e.id,e.label,ii.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=$t(),{subGraphTitleTotalMargin:s}=ia(i);if(e.label){const a=ii.get(e.id);let n=e.x,o=e.y;if(r){const l=ae.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",n,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(n=l.x,o=l.y)}a.attr("transform",`translate(${n}, ${o+s/2})`)}if(e.startLabelLeft){const a=Ut.get(e.id).startLeft;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),sk=f((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!((n=e==null?void 0:e.id)!=null&&n.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"),ak=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),ok=f((e,t,r)=>{q.debug(`intersection calc abc89:
260
+ outsidePoint: ${JSON.stringify(t)}
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),n=e.width/2;let o=r.x<t.x?n-a:n+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)*n>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;o=h*u/c;const d={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),q.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,d),d}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let u=c*o/h,d=r.x<t.x?r.x+h-o:r.x-h+o,g=r.y<t.y?r.y+u:r.y-u;return q.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:d,_y:g}),o===0&&(d=t.x,g=t.y),h===0&&(d=t.x),c===0&&(g=t.y),{x:d,y:g}}},"intersection"),yh=f((e,t)=>{q.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(q.info("abc88 checking point",a,t),!ak(t,a)&&!s){const n=ok(t,i,a);q.debug("abc88 inside",a,i,n),q.debug("abc88 intersection",n,t);let o=!1;r.forEach(l=>{o=o||l.x===n.x&&l.y===n.y}),r.some(l=>l.x===n.x&&l.y===n.y)?q.warn("abc88 no intersect",n,r):r.push(n),s=!0}else q.warn("abc88 outside",a,i),i=a,s||r.push(a)}),q.debug("returning points",r),r},"cutPathAtIntersect");function ef(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(ef,"extractCornerPoints");var mh=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),nk=f(function(e){const{cornerPointPositions:t}=ef(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=mh(s,n,5),l=mh(a,n,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let d={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){q.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const g=5;n.x===o.x?d={x:c<0?o.x-g+u:o.x+g-u,y:h<0?o.y-u:o.y+u}:d={x:c<0?o.x-u:o.x+u,y:h<0?o.y-g+u:o.y+g-u}}else q.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"),lk=f((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),l=Number.isFinite(o)?Math.max(0,o):0,c=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),rf=f(function(e,t,r,i,s,a,n,o=!1){var O;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=$t();let h=t.points,u=!1;const d=s;var g=a;const p=[];for(const W in t.cssCompiledStyles)vu(W)||p.push(t.cssCompiledStyles[W]);if(c==="swimlane"){if(g.intersect&&d.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[d.intersect(h[0]),g.intersect(h[1])];else{const W=h.slice(1,-1),X=W[0],at=W[W.length-1],ot=.5,gt=Math.abs(h[h.length-1].x-at.x)<ot&&Math.abs(h[h.length-1].y-at.y)<ot,yt=d.intersect(X),nt=gt?at:g.intersect(at),St=Math.abs(nt.x-at.x)<ot&&Math.abs(nt.y-at.y)<ot,Mt=Math.abs(yt.x-X.x)<ot&&Math.abs(yt.y-X.y)<ot?[]:[yt],bt=St?[]:[nt];h=[...Mt,...W,...bt]}h=sk(t,h)}else g.intersect&&d.intersect&&!o&&(h=h.slice(1,t.points.length-1),h.unshift(d.intersect(h[0])),h.push(g.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(q.info("to cluster abc88",r.get(t.toCluster)),h=yh(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(q.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=yh(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let x=h.filter(W=>!Number.isNaN(W.y));const C=ek(t.curve);C!=="rounded"&&(x=nk(x));let b=Di;switch(C){case"linear":b=Di;break;case"basis":b=fo;break;case"cardinal":b=du;break;case"bumpX":b=nu;break;case"bumpY":b=lu;break;case"catmullRom":b=fu;break;case"monotoneX":b=bu;break;case"monotoneY":b=ku;break;case"natural":b=Su;break;case"step":b=Tu;break;case"stepAfter":b=Bu;break;case"stepBefore":b=_u;break;case"rounded":b=Di;break;default:b=fo}const{x:w,y:T}=K1(t),_=b0().x(w).y(T).curve(b);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 A,L=C==="rounded"?sf(af(x,t),5):_(x);const Y=Array.isArray(t.style)?t.style:[t.style];let N=Y.find(W=>W==null?void 0:W.startsWith("stroke:")),I="";t.animate&&(I="edge-animation-fast"),t.animation&&(I="edge-animation-"+t.animation);let Q=!1;if(t.look==="handDrawn"){const W=ct.svg(e);Object.assign([],x);const X=W.path(L,{roughness:.3,seed:l});v+=" transition",A=Ft(X).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",Y?Y.reduce((ot,gt)=>ot+";"+gt,""):"");let at=A.attr("d");A.attr("d",at),e.node().appendChild(A.node())}else{const W=p.join(";"),X=Y?Y.reduce((St,kt)=>St+kt+";",""):"",at=(W?W+";"+X+";":X)+";"+(Y?Y.reduce((St,kt)=>St+";"+kt,""):"");A=e.append("path").attr("d",L).attr("id",`${n}-${t.id}`).attr("class"," "+v+(t.classes?" "+t.classes:"")+(I?" "+I:"")).attr("style",at),N=(O=at.match(/stroke:([^;]+)/))==null?void 0:O[1],Q=t.animate===!0||!!t.animation||W.includes("animation");const ot=A.node(),gt=typeof ot.getTotalLength=="function"?ot.getTotalLength():0,yt=fh[t.arrowTypeStart]||0,nt=fh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!Q){const kt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?lk(gt,yt,nt):`0 ${yt} ${gt-yt-nt} ${nt}`}; stroke-dashoffset: 0;`;A.attr("style",kt+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",t.id),A.attr("data-points",m),A.attr("data-look",Vt(t.look)),t.showPoints&&x.forEach(W=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",W.x).attr("cy",W.y)});let M="";($t().flowchart.arrowMarkerAbsolute||$t().state.arrowMarkerAbsolute)&&(M=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,M=M.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),q.info("arrowTypeStart",t.arrowTypeStart),q.info("arrowTypeEnd",t.arrowTypeEnd);const F=!Q&&(t==null?void 0:t.look)==="neo";Q1(A,t,M,n,i,F,N);const E=Math.floor(h.length/2),B=h[E];ae.isLabelCoordinateInPath(B,A.attr("d"))||(u=!0);let P={};return u&&(P.updatedPath=h),P.originalPath=t.points,P},"insertEdge");function sf(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const c=n.x-o.x,h=n.y-o.y,u=l.x-n.x,d=l.y-n.y,g=Math.hypot(c,h),p=Math.hypot(u,d);if(g<s||p<s){r+=`L${n.x},${n.y}`;continue}const m=c/g,x=h/g,C=u/p,b=d/p,w=m*C+x*b,T=Math.max(-1,Math.min(1,w)),_=Math.acos(T);if(_<s||Math.abs(Math.PI-_)<s){r+=`L${n.x},${n.y}`;continue}const v=Math.min(t/Math.sin(_/2),g/2,p/2),A=n.x-m*v,L=n.y-x*v,Y=n.x+C*v,N=n.y+b*v;r+=`L${A},${L}`,r+=`Q${n.x},${n.y} ${Y},${N}`}}return r}f(sf,"generateRoundedPath");function Ao(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(Ao,"calculateDeltaAndAngle");function af(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&se[t.arrowTypeStart]){const s=se[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=Ao(a,n),l=s*Math.cos(o),c=s*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&se[t.arrowTypeEnd]){const s=se[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=Ao(n,a),l=s*Math.cos(o),c=s*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}f(af,"applyMarkerOffsetsToPoints");var hk=f((e,t,r,i)=>{t.forEach(s=>{Ek[s](e,r,i)})},"insertMarkers"),ck=f((e,t,r)=>{q.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"),uk=f((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"),dk=f((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"),gk=f((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"),fk=f((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"),pk=f((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"),yk=f((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"),mk=f((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"),Ck=f((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"),xk=f((e,t,r)=>{const i=jt(),{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"),bk=f((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"),kk=f((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"),wk=f((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"),Sk=f((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"),Tk=f((e,t,r)=>{const i=jt(),{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"),_k=f((e,t,r)=>{const i=jt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Bk=f((e,t,r)=>{const i=jt(),{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"),vk=f((e,t,r)=>{const i=jt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),Lk=f((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
+ L20,10
264
+ M20,10
265
+ L0,20`)},"requirement_arrow"),Fk=f((e,t,r)=>{const i=jt(),{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
+ L20,10
267
+ M20,10
268
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Ak=f((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"),Mk=f((e,t,r)=>{const i=jt(),{themeVariables:s}=i,{strokeWidth:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Ek={extension:ck,composition:uk,aggregation:dk,dependency:gk,lollipop:fk,point:pk,circle:yk,cross:mk,barb:Ck,barbNeo:xk,only_one:bk,zero_or_one:kk,one_or_more:wk,zero_or_more:Sk,only_one_neo:Tk,zero_or_one_neo:_k,one_or_more_neo:Bk,zero_or_more_neo:vk,requirement_arrow:Lk,requirement_contains:Ak,requirement_arrow_neo:Fk,requirement_contains_neo:Mk},of=hk,nf=typeof global=="object"&&global&&global.Object===Object&&global,$k=typeof self=="object"&&self&&self.Object===Object&&self,Ue=nf||$k||Function("return this")(),Oe=Ue.Symbol,lf=Object.prototype,Ok=lf.hasOwnProperty,Pk=lf.toString,Ti=Oe?Oe.toStringTag:void 0;function Dk(e){var t=Ok.call(e,Ti),r=e[Ti];try{e[Ti]=void 0;var i=!0}catch{}var s=Pk.call(e);return i&&(t?e[Ti]=r:delete e[Ti]),s}var Ik=Object.prototype,Rk=Ik.toString;function qk(e){return Rk.call(e)}var Nk="[object Null]",Wk="[object Undefined]",Ch=Oe?Oe.toStringTag:void 0;function li(e){return e==null?e===void 0?Wk:Nk:Ch&&Ch in Object(e)?Dk(e):qk(e)}function mr(e){return e!=null&&typeof e=="object"}var zk="[object Symbol]";function Ln(e){return typeof e=="symbol"||mr(e)&&li(e)==zk}function hf(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 ue=Array.isArray,xh=Oe?Oe.prototype:void 0,bh=xh?xh.toString:void 0;function cf(e){if(typeof e=="string")return e;if(ue(e))return hf(e,cf)+"";if(Ln(e))return bh?bh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Fn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function aa(e){return e}var Hk="[object AsyncFunction]",jk="[object Function]",Yk="[object GeneratorFunction]",Uk="[object Proxy]";function js(e){if(!Fn(e))return!1;var t=li(e);return t==jk||t==Yk||t==Hk||t==Uk}var Aa=Ue["__core-js_shared__"],kh=(function(){var e=/[^.]+$/.exec(Aa&&Aa.keys&&Aa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Gk(e){return!!kh&&kh in e}var Xk=Function.prototype,Vk=Xk.toString;function wr(e){if(e!=null){try{return Vk.call(e)}catch{}try{return e+""}catch{}}return""}var Zk=/[\\^$.*+?()[\]{}|]/g,Kk=/^\[object .+?Constructor\]$/,Qk=Function.prototype,Jk=Object.prototype,t2=Qk.toString,e2=Jk.hasOwnProperty,r2=RegExp("^"+t2.call(e2).replace(Zk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function i2(e){if(!Fn(e)||Gk(e))return!1;var t=js(e)?r2:Kk;return t.test(wr(e))}function s2(e,t){return e==null?void 0:e[t]}function Sr(e,t){var r=s2(e,t);return i2(r)?r:void 0}var Mo=Sr(Ue,"WeakMap");function a2(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 o2(){}var n2=800,l2=16,h2=Date.now;function c2(e){var t=0,r=0;return function(){var i=h2(),s=l2-(i-r);if(r=i,s>0){if(++t>=n2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Mi(e){return function(){return e}}var wh=(function(){try{var e=Sr(Object,"defineProperty");return e({},"",{}),e}catch{}})(),u2=wh?function(e,t){return wh(e,"toString",{configurable:!0,enumerable:!1,value:Mi(t),writable:!0})}:aa,d2=c2(u2);function g2(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function f2(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 p2(e){return e!==e}function y2(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function m2(e,t,r){return t===t?y2(e,t,r):f2(e,p2,r)}function C2(e,t){var r=e==null?0:e.length;return!!r&&m2(e,t,0)>-1}var x2=9007199254740991,b2=/^(?:0|[1-9]\d*)$/;function uf(e,t){var r=typeof e;return t=t??x2,!!t&&(r=="number"||r!="symbol"&&b2.test(e))&&e>-1&&e%1==0&&e<t}function df(e,t){return e===t||e!==e&&t!==t}var Sh=Math.max;function k2(e,t,r){return t=Sh(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=Sh(i.length-t,0),n=Array(a);++s<a;)n[s]=i[t+s];s=-1;for(var o=Array(t+1);++s<t;)o[s]=i[s];return o[t]=r(n),a2(e,this,o)}}function w2(e,t){return d2(k2(e,t,aa),e+"")}var S2=9007199254740991;function An(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=S2}function oa(e){return e!=null&&An(e.length)&&!js(e)}var T2=Object.prototype;function gf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||T2;return e===r}function _2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var B2="[object Arguments]";function Th(e){return mr(e)&&li(e)==B2}var ff=Object.prototype,v2=ff.hasOwnProperty,L2=ff.propertyIsEnumerable,na=Th((function(){return arguments})())?Th:function(e){return mr(e)&&v2.call(e,"callee")&&!L2.call(e,"callee")};function F2(){return!1}var pf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_h=pf&&typeof module=="object"&&module&&!module.nodeType&&module,A2=_h&&_h.exports===pf,Bh=A2?Ue.Buffer:void 0,M2=Bh?Bh.isBuffer:void 0,Ys=M2||F2,E2="[object Arguments]",$2="[object Array]",O2="[object Boolean]",P2="[object Date]",D2="[object Error]",I2="[object Function]",R2="[object Map]",q2="[object Number]",N2="[object Object]",W2="[object RegExp]",z2="[object Set]",H2="[object String]",j2="[object WeakMap]",Y2="[object ArrayBuffer]",U2="[object DataView]",G2="[object Float32Array]",X2="[object Float64Array]",V2="[object Int8Array]",Z2="[object Int16Array]",K2="[object Int32Array]",Q2="[object Uint8Array]",J2="[object Uint8ClampedArray]",tw="[object Uint16Array]",ew="[object Uint32Array]",zt={};zt[G2]=zt[X2]=zt[V2]=zt[Z2]=zt[K2]=zt[Q2]=zt[J2]=zt[tw]=zt[ew]=!0;zt[E2]=zt[$2]=zt[Y2]=zt[O2]=zt[U2]=zt[P2]=zt[D2]=zt[I2]=zt[R2]=zt[q2]=zt[N2]=zt[W2]=zt[z2]=zt[H2]=zt[j2]=!1;function rw(e){return mr(e)&&An(e.length)&&!!zt[li(e)]}function iw(e){return function(t){return e(t)}}var yf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qi=yf&&typeof module=="object"&&module&&!module.nodeType&&module,sw=qi&&qi.exports===yf,Ma=sw&&nf.process,vh=(function(){try{var e=qi&&qi.require&&qi.require("util").types;return e||Ma&&Ma.binding&&Ma.binding("util")}catch{}})(),Lh=vh&&vh.isTypedArray,Mn=Lh?iw(Lh):rw,aw=Object.prototype,ow=aw.hasOwnProperty;function nw(e,t){var r=ue(e),i=!r&&na(e),s=!r&&!i&&Ys(e),a=!r&&!i&&!s&&Mn(e),n=r||i||s||a,o=n?_2(e.length,String):[],l=o.length;for(var c in e)(t||ow.call(e,c))&&!(n&&(c=="length"||s&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||uf(c,l)))&&o.push(c);return o}function lw(e,t){return function(r){return e(t(r))}}var hw=lw(Object.keys,Object),cw=Object.prototype,uw=cw.hasOwnProperty;function mf(e){if(!gf(e))return hw(e);var t=[];for(var r in Object(e))uw.call(e,r)&&r!="constructor"&&t.push(r);return t}function Me(e){return oa(e)?nw(e):mf(e)}var dw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gw=/^\w*$/;function En(e,t){if(ue(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ln(e)?!0:gw.test(e)||!dw.test(e)||t!=null&&e in Object(t)}var Hi=Sr(Object,"create");function fw(){this.__data__=Hi?Hi(null):{},this.size=0}function pw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yw="__lodash_hash_undefined__",mw=Object.prototype,Cw=mw.hasOwnProperty;function xw(e){var t=this.__data__;if(Hi){var r=t[e];return r===yw?void 0:r}return Cw.call(t,e)?t[e]:void 0}var bw=Object.prototype,kw=bw.hasOwnProperty;function ww(e){var t=this.__data__;return Hi?t[e]!==void 0:kw.call(t,e)}var Sw="__lodash_hash_undefined__";function Tw(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Hi&&t===void 0?Sw:t,this}function Cr(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])}}Cr.prototype.clear=fw;Cr.prototype.delete=pw;Cr.prototype.get=xw;Cr.prototype.has=ww;Cr.prototype.set=Tw;function _w(){this.__data__=[],this.size=0}function la(e,t){for(var r=e.length;r--;)if(df(e[r][0],t))return r;return-1}var Bw=Array.prototype,vw=Bw.splice;function Lw(e){var t=this.__data__,r=la(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():vw.call(t,r,1),--this.size,!0}function Fw(e){var t=this.__data__,r=la(t,e);return r<0?void 0:t[r][1]}function Aw(e){return la(this.__data__,e)>-1}function Mw(e,t){var r=this.__data__,i=la(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ge(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])}}Ge.prototype.clear=_w;Ge.prototype.delete=Lw;Ge.prototype.get=Fw;Ge.prototype.has=Aw;Ge.prototype.set=Mw;var ji=Sr(Ue,"Map");function Ew(){this.size=0,this.__data__={hash:new Cr,map:new(ji||Ge),string:new Cr}}function $w(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ha(e,t){var r=e.__data__;return $w(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ow(e){var t=ha(this,e).delete(e);return this.size-=t?1:0,t}function Pw(e){return ha(this,e).get(e)}function Dw(e){return ha(this,e).has(e)}function Iw(e,t){var r=ha(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Xe.prototype.clear=Ew;Xe.prototype.delete=Ow;Xe.prototype.get=Pw;Xe.prototype.has=Dw;Xe.prototype.set=Iw;var Rw="Expected a function";function $n(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Rw);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new($n.Cache||Xe),r}$n.Cache=Xe;var qw=500;function Nw(e){var t=$n(e,function(i){return r.size===qw&&r.clear(),i}),r=t.cache;return t}var Ww=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zw=/\\(\\)?/g,Hw=Nw(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ww,function(r,i,s,a){t.push(s?a.replace(zw,"$1"):i||r)}),t});function jw(e){return e==null?"":cf(e)}function Cf(e,t){return ue(e)?e:En(e,t)?[e]:Hw(jw(e))}function ca(e){if(typeof e=="string"||Ln(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function xf(e,t){t=Cf(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[ca(t[r++])];return r&&r==i?e:void 0}function Yw(e,t,r){var i=e==null?void 0:xf(e,t);return i===void 0?r:i}function bf(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var Fh=Oe?Oe.isConcatSpreadable:void 0;function Uw(e){return ue(e)||na(e)||!!(Fh&&e&&e[Fh])}function Gw(e,t,r,i,s){var a=-1,n=e.length;for(r||(r=Uw),s||(s=[]);++a<n;){var o=e[a];r(o)?bf(s,o):i||(s[s.length]=o)}return s}function Xw(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 Vw(){this.__data__=new Ge,this.size=0}function Zw(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Kw(e){return this.__data__.get(e)}function Qw(e){return this.__data__.has(e)}var Jw=200;function tS(e,t){var r=this.__data__;if(r instanceof Ge){var i=r.__data__;if(!ji||i.length<Jw-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xe(i)}return r.set(e,t),this.size=r.size,this}function je(e){var t=this.__data__=new Ge(e);this.size=t.size}je.prototype.clear=Vw;je.prototype.delete=Zw;je.prototype.get=Kw;je.prototype.has=Qw;je.prototype.set=tS;function kf(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var n=e[r];t(n,r,e)&&(a[s++]=n)}return a}function eS(){return[]}var rS=Object.prototype,iS=rS.propertyIsEnumerable,Ah=Object.getOwnPropertySymbols,sS=Ah?function(e){return e==null?[]:(e=Object(e),kf(Ah(e),function(t){return iS.call(e,t)}))}:eS;function aS(e,t,r){var i=t(e);return ue(e)?i:bf(i,r(e))}function Mh(e){return aS(e,Me,sS)}var Eo=Sr(Ue,"DataView"),$o=Sr(Ue,"Promise"),Rr=Sr(Ue,"Set"),Eh="[object Map]",oS="[object Object]",$h="[object Promise]",Oh="[object Set]",Ph="[object WeakMap]",Dh="[object DataView]",nS=wr(Eo),lS=wr(ji),hS=wr($o),cS=wr(Rr),uS=wr(Mo),ze=li;(Eo&&ze(new Eo(new ArrayBuffer(1)))!=Dh||ji&&ze(new ji)!=Eh||$o&&ze($o.resolve())!=$h||Rr&&ze(new Rr)!=Oh||Mo&&ze(new Mo)!=Ph)&&(ze=function(e){var t=li(e),r=t==oS?e.constructor:void 0,i=r?wr(r):"";if(i)switch(i){case nS:return Dh;case lS:return Eh;case hS:return $h;case cS:return Oh;case uS:return Ph}return t});var Ih=Ue.Uint8Array,dS="__lodash_hash_undefined__";function gS(e){return this.__data__.set(e,dS),this}function fS(e){return this.__data__.has(e)}function Yi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Xe;++t<r;)this.add(e[t])}Yi.prototype.add=Yi.prototype.push=gS;Yi.prototype.has=fS;function pS(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 wf(e,t){return e.has(t)}var yS=1,mS=2;function Sf(e,t,r,i,s,a){var n=r&yS,o=e.length,l=t.length;if(o!=l&&!(n&&l>o))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var u=-1,d=!0,g=r&mS?new Yi:void 0;for(a.set(e,t),a.set(t,e);++u<o;){var p=e[u],m=t[u];if(i)var x=n?i(m,p,u,t,e,a):i(p,m,u,e,t,a);if(x!==void 0){if(x)continue;d=!1;break}if(g){if(!pS(t,function(C,b){if(!wf(g,b)&&(p===C||s(p,C,r,i,a)))return g.push(b)})){d=!1;break}}else if(!(p===m||s(p,m,r,i,a))){d=!1;break}}return a.delete(e),a.delete(t),d}function CS(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function On(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var xS=1,bS=2,kS="[object Boolean]",wS="[object Date]",SS="[object Error]",TS="[object Map]",_S="[object Number]",BS="[object RegExp]",vS="[object Set]",LS="[object String]",FS="[object Symbol]",AS="[object ArrayBuffer]",MS="[object DataView]",Rh=Oe?Oe.prototype:void 0,Ea=Rh?Rh.valueOf:void 0;function ES(e,t,r,i,s,a,n){switch(r){case MS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case AS:return!(e.byteLength!=t.byteLength||!a(new Ih(e),new Ih(t)));case kS:case wS:case _S:return df(+e,+t);case SS:return e.name==t.name&&e.message==t.message;case BS:case LS:return e==t+"";case TS:var o=CS;case vS:var l=i&xS;if(o||(o=On),e.size!=t.size&&!l)return!1;var c=n.get(e);if(c)return c==t;i|=bS,n.set(e,t);var h=Sf(o(e),o(t),i,s,a,n);return n.delete(e),h;case FS:if(Ea)return Ea.call(e)==Ea.call(t)}return!1}var $S=1,OS=Object.prototype,PS=OS.hasOwnProperty;function DS(e,t,r,i,s,a){var n=r&$S,o=Mh(e),l=o.length,c=Mh(t),h=c.length;if(l!=h&&!n)return!1;for(var u=l;u--;){var d=o[u];if(!(n?d in t:PS.call(t,d)))return!1}var g=a.get(e),p=a.get(t);if(g&&p)return g==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var x=n;++u<l;){d=o[u];var C=e[d],b=t[d];if(i)var w=n?i(b,C,d,t,e,a):i(C,b,d,e,t,a);if(!(w===void 0?C===b||s(C,b,r,i,a):w)){m=!1;break}x||(x=d=="constructor")}if(m&&!x){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 IS=1,qh="[object Arguments]",Nh="[object Array]",cs="[object Object]",RS=Object.prototype,Wh=RS.hasOwnProperty;function qS(e,t,r,i,s,a){var n=ue(e),o=ue(t),l=n?Nh:ze(e),c=o?Nh:ze(t);l=l==qh?cs:l,c=c==qh?cs:c;var h=l==cs,u=c==cs,d=l==c;if(d&&Ys(e)){if(!Ys(t))return!1;n=!0,h=!1}if(d&&!h)return a||(a=new je),n||Mn(e)?Sf(e,t,r,i,s,a):ES(e,t,l,r,i,s,a);if(!(r&IS)){var g=h&&Wh.call(e,"__wrapped__"),p=u&&Wh.call(t,"__wrapped__");if(g||p){var m=g?e.value():e,x=p?t.value():t;return a||(a=new je),s(m,x,r,i,a)}}return d?(a||(a=new je),DS(e,t,r,i,s,a)):!1}function Pn(e,t,r,i,s){return e===t?!0:e==null||t==null||!mr(e)&&!mr(t)?e!==e&&t!==t:qS(e,t,r,i,Pn,s)}var NS=1,WS=2;function zS(e,t,r,i){var s=r.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var n=r[s];if(n[2]?n[1]!==e[n[0]]:!(n[0]in e))return!1}for(;++s<a;){n=r[s];var o=n[0],l=e[o],c=n[1];if(n[2]){if(l===void 0&&!(o in e))return!1}else{var h=new je,u;if(!(u===void 0?Pn(c,l,NS|WS,i,h):u))return!1}}return!0}function Tf(e){return e===e&&!Fn(e)}function HS(e){for(var t=Me(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Tf(s)]}return t}function _f(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function jS(e){var t=HS(e);return t.length==1&&t[0][2]?_f(t[0][0],t[0][1]):function(r){return r===e||zS(r,e,t)}}function YS(e,t){return e!=null&&t in Object(e)}function US(e,t,r){t=Cf(t,e);for(var i=-1,s=t.length,a=!1;++i<s;){var n=ca(t[i]);if(!(a=e!=null&&r(e,n)))break;e=e[n]}return a||++i!=s?a:(s=e==null?0:e.length,!!s&&An(s)&&uf(n,s)&&(ue(e)||na(e)))}function GS(e,t){return e!=null&&US(e,t,YS)}var XS=1,VS=2;function ZS(e,t){return En(e)&&Tf(t)?_f(ca(e),t):function(r){var i=Yw(r,e);return i===void 0&&i===t?GS(r,e):Pn(t,i,XS|VS)}}function KS(e){return function(t){return t==null?void 0:t[e]}}function QS(e){return function(t){return xf(t,e)}}function JS(e){return En(e)?KS(ca(e)):QS(e)}function Bf(e){return typeof e=="function"?e:e==null?aa:typeof e=="object"?ue(e)?ZS(e[0],e[1]):jS(e):JS(e)}function tT(e){return function(t,r,i){for(var s=-1,a=Object(t),n=i(t),o=n.length;o--;){var l=n[++s];if(r(a[l],l,a)===!1)break}return t}}var eT=tT();function rT(e,t){return e&&eT(e,t,Me)}function iT(e,t){return function(r,i){if(r==null)return r;if(!oa(r))return e(r,i);for(var s=r.length,a=-1,n=Object(r);++a<s&&i(n[a],a,n)!==!1;);return r}}var Dn=iT(rT);function sT(e){return mr(e)&&oa(e)}function aT(e){return typeof e=="function"?e:aa}function or(e,t){var r=ue(e)?g2:Dn;return r(e,aT(t))}function oT(e,t){var r=[];return Dn(e,function(i,s,a){t(i,s,a)&&r.push(i)}),r}function us(e,t){var r=ue(e)?kf:oT;return r(e,Bf(t))}function nT(e,t){return hf(t,function(r){return e[r]})}function $a(e){return e==null?[]:nT(e,Me(e))}var lT="[object Map]",hT="[object Set]",cT=Object.prototype,uT=cT.hasOwnProperty;function zh(e){if(e==null)return!0;if(oa(e)&&(ue(e)||typeof e=="string"||typeof e.splice=="function"||Ys(e)||Mn(e)||na(e)))return!e.length;var t=ze(e);if(t==lT||t==hT)return!e.size;if(gf(e))return!mf(e).length;for(var r in e)if(uT.call(e,r))return!1;return!0}function Or(e){return e===void 0}function dT(e,t,r,i,s){return s(e,function(a,n,o){r=i?(i=!1,a):t(r,a,n,o)}),r}function gT(e,t,r){var i=ue(e)?Xw:dT,s=arguments.length<3;return i(e,Bf(t),r,s,Dn)}var fT=1/0,pT=Rr&&1/On(new Rr([,-0]))[1]==fT?function(e){return new Rr(e)}:o2,yT=200;function mT(e,t,r){var i=-1,s=C2,a=e.length,n=!0,o=[],l=o;if(a>=yT){var c=pT(e);if(c)return On(c);n=!1,s=wf,l=new Yi}else l=o;t:for(;++i<a;){var h=e[i],u=h;if(h=h!==0?h:0,n&&u===u){for(var d=l.length;d--;)if(l[d]===u)continue t;o.push(h)}else s(l,u,r)||(l!==o&&l.push(u),o.push(h))}return o}var CT=w2(function(e){return mT(Gw(e,1,sT,!0))}),xT="\0",nr="\0",Hh="";class ua{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=Mi(void 0),this._defaultEdgeLabelFn=Mi(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[nr]={}),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 js(t)||(t=Mi(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Me(this._nodes)}sources(){var t=this;return us(this.nodes(),function(r){return zh(t._in[r])})}sinks(){var t=this;return us(this.nodes(),function(r){return zh(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return or(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]=nr,this._children[t]={},this._children[nr][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],or(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),or(Me(this._in[t]),r),delete this._in[t],delete this._preds[t],or(Me(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(Or(r))r=nr;else{r+="";for(var i=r;!Or(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!==nr)return r}}children(t){if(Or(t)&&(t=nr),this._isCompound){var r=this._children[t];if(r)return Me(r)}else{if(t===nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Me(r)}successors(t){var r=this._sucs[t];if(r)return Me(r)}neighbors(t){var r=this.predecessors(t);if(r)return CT(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;or(this._nodes,function(n,o){t(o)&&r.setNode(o,n)}),or(this._edgeObjs,function(n){r.hasNode(n.v)&&r.hasNode(n.w)&&r.setEdge(n,i.edge(n))});var s={};function a(n){var o=i.parent(n);return o===void 0||r.hasNode(o)?(s[n]=o,o):o in s?s[o]:a(o)}return this._isCompound&&or(r.nodes(),function(n){r.setParent(n,a(n))}),r}setDefaultEdgeLabel(t){return js(t)||(t=Mi(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return $a(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return gT(t,function(a,n){return s.length>1?i.setEdge(a,n,r):i.setEdge(a,n),n}),this}setEdge(){var t,r,i,s,a=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(t=n.v,r=n.w,i=n.name,arguments.length===2&&(s=arguments[1],a=!0)):(t=n,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,r=""+r,Or(i)||(i=""+i);var o=Ei(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return a&&(this._edgeLabels[o]=s),this;if(!Or(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=a?s:this._defaultEdgeLabelFn(t,r,i);var l=bT(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,jh(this._preds[r],t),jh(this._sucs[t],r),this._in[r][o]=l,this._out[t][o]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Oa(this._isDirected,arguments[0]):Ei(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Oa(this._isDirected,arguments[0]):Ei(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Oa(this._isDirected,arguments[0]):Ei(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],Yh(this._preds[r],t),Yh(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=$a(i);return r?us(s,function(a){return a.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=$a(i);return r?us(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))}}ua.prototype._nodeCount=0;ua.prototype._edgeCount=0;function jh(e,t){e[t]?e[t]++:e[t]=1}function Yh(e,t){--e[t]||delete e[t]}function Ei(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var n=s;s=a,a=n}return s+Hh+a+Hh+(Or(i)?xT:i)}function bT(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var n=s;s=a,a=n}var o={v:s,w:a};return i&&(o.name=i),o}function Oa(e,t){return Ei(e,t.v,t.w,t.name)}function vf(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"),n=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:a,nodes:n,rootGroups:r}}f(vf,"createLayoutElementGroups");async function Lf(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}}f(Lf,"measureGroupLabel");async function Ff(e,t,r){var a;const i=await Bn(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}f(Ff,"insertMeasuredNode");async function Af(e,t){const r=new ua({multigraph:!0,compound:!0}),i=[...t.edges],s=$t(),a=vf(e),{edgeLabels:n,nodes:o}=a,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Lf(o,h),r.setNode(h.id,{...h});else{if(c){const u=await Ff(o,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&tf(h)&&await vn(n,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 At(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-CT4uqGe1.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2]));h(e,t)}return{graph:r,groups:a,nodeElements:l}}f(Af,"createGraphWithElements");var Pt=new Map,ur=new Map,Mf=new Map,kT=f(()=>{ur.clear(),Mf.clear(),Pt.clear()},"clear"),Ui=f((e,t)=>{const r=ur.get(t)||[];return q.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),wT=f((e,t)=>{const r=ur.get(t)||[];return q.info("Descendants of ",t," is ",r),q.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Ui(e.v,t)||Ui(e.w,t)||r.includes(e.w):(q.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Ef=f((e,t,r,i)=>{q.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),q.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)Ef(a,t,r,i);else{const n=t.node(a);q.info("cp ",a," to ",i," with parent ",e),r.setNode(a,n),i!==t.parent(a)&&(q.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(q.debug("Setting parent",a,e),r.setParent(a,e)):(q.info("In copy ",e,"root",i,"data",t.node(e),i),q.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));const o=t.edges(a);q.debug("Copying Edges",o),o.forEach(l=>{q.info("Edge",l);const c=t.edge(l.v,l.w,l.name);q.info("Edge data",c,i);try{wT(l,i)?(q.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),q.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):q.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){q.error(h)}})}q.debug("Removing node",a),t.removeNode(a)})},"copy"),$f=f((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)Mf.set(s,e),i=[...i,...$f(s,t)];return i},"extractDescendants"),ST=f((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})),n=s.map(l=>({v:l.v,w:l.w}));return a.filter(l=>n.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Us=f((e,t,r)=>{const i=t.children(e);if(q.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const a of i){const n=Us(a,t,r),o=ST(t,r,n);if(n)if(o.length>0)s=n;else return n}return s},"findNonClusterChild"),Uh=f(e=>!Pt.has(e)||!Pt.get(e).externalConnections?e:Pt.has(e)?Pt.get(e).id:e,"getAnchorId"),ML=f((e,t)=>{var r;if(!e||t>10){q.debug("Opting out, no graph ");return}else q.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(q.debug("Cluster identified",i," Replacement id in edges: ",Us(i,e,i)),ur.set(i,$f(i,e)),Pt.set(i,{id:Us(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),a=e.edges();s.length>0?(q.debug("Cluster identified",i,ur),a.forEach(n=>{const o=Ui(n.v,i),l=Ui(n.w,i);o^l&&(q.debug("Edge: ",n," leaves cluster ",i),q.debug("Descendants of XXX ",i,": ",ur.get(i)),Pt.get(i).externalConnections=!0)})):q.debug("Not a cluster ",i,ur)});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 n=e.edges().some(o=>o.v===i);if(s&&((r=Pt.get(i))!=null&&r.externalConnections)&&n&&Df(e,s,i)){const o=TT(e,i,e.parent(s));o&&(Pt.get(i).id=o)}}e.edges().forEach(function(i){const s=e.edge(i);q.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),q.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let a=i.v,n=i.w;if(q.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(q.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),a=Uh(i.v),n=Uh(i.w),e.removeEdge(i.v,i.w,i.name),a!==i.v){const o=e.parent(a);Pt.get(o).externalConnections=!0,s.fromCluster=i.v}if(n!==i.w){const o=e.parent(n);Pt.get(o).externalConnections=!0,s.toCluster=i.w}q.debug("Fix Replacing with XXX",a,n,i.name),e.setEdge(a,n,s,i.name)}}),Of(e,0),q.trace(Pt)},"adjustClustersAndEdges"),Of=f((e,t)=>{var s,a;if(t>10){q.error("Bailing out");return}let r=e.nodes(),i=!1;for(const n of r){const o=e.children(n);i=i||o.length>0}if(!i){q.debug("Done, no node has children",e.nodes());return}q.debug("Nodes = ",r,t);for(const n of r)if(q.debug("Extracting node",n,Pt,Pt.has(n)&&!Pt.get(n).externalConnections,!e.parent(n),e.node(n),e.children("D")," Depth ",t),!Pt.has(n))q.debug("Not a cluster",n,t);else if(!Pt.get(n).externalConnections&&e.children(n)&&e.children(n).length>0){q.debug("Cluster without external connections, without a parent and with children",n,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(s=Pt.get(n))==null?void 0:s.clusterData)!=null&&a.dir&&(l=Pt.get(n).clusterData.dir,q.debug("Fixing dir",Pt.get(n).clusterData.dir,l));const c=new ua({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Ef(n,e,c,n),e.setNode(n,{clusterNode:!0,id:n,clusterData:Pt.get(n).clusterData,label:Pt.get(n).label,graph:c})}else q.debug("Cluster ** ",n," **not meeting the criteria !externalConnections:",!Pt.get(n).externalConnections," no parent: ",!e.parent(n)," children ",e.children(n)&&e.children(n).length>0,e.children("D"),t),q.debug(Pt);r=e.nodes(),q.debug("New list of nodes",r);for(const n of r){const o=e.node(n);q.debug(" Now next level",n,o),o!=null&&o.clusterNode&&Of(o.graph,t+1)}},"extractor"),Pf=f((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),a=Pf(e,s);r=[...r,...a]}),r},"sorter"),EL=f(e=>Pf(e,e.children()),"sortNodesByHierarchy"),Df=f((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"),TT=f((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Ui(s,r))continue;const a=Us(s,e,t);if(a&&!Df(e,a,t))return a}return null},"findSafeAnchorNode");function If({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:a}){const n=t??Rn;return f(async function(l,c,h,u){const d=c.select("g");((h==null?void 0:h.insertMarkers)??of)(d,l.markers,l.type,l.diagramId),In();const g={element:d,helpers:h,options:u};g.preparedLayout=await(e==null?void 0:e(l,g));const p=await n(l,g),m=await r(l,g),x={...g,measure:p};i?await i(l,x,m):await qn(l,x,a),await(s==null?void 0:s(l,x,m))},"render")}f(If,"createCommonLayoutRenderer");function In(){z1(),rk(),Z1(),kT()}f(In,"clearLayoutRenderState");async function Rn(e,{element:t}){return await Af(t,e)}f(Rn,"defaultMeasureLayout");async function qn(e,t,r={}){var n,o;const{measure:i}=t,{groups:s}=i;for(const l of((n=r.getNodes)==null?void 0:n.call(r,e,t))??e.nodes)(o=r.skipNode)!=null&&o.call(r,l,t)||await Rf(s,l,t,r);const a=Nf(e.nodes);for(const l of e.edges)Wf(l,r)||await zf(s,l,a,e,r,t)}f(qn,"paintLayoutData");async function Rf(e,t,r,i){t.clusterNode?gh(t):qf(t,r,i)?await Jg(e.clusters,t):gh(t)}f(Rf,"paintLayoutNode");function qf(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}f(qf,"shouldPaintAsCluster");function Nf(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}f(Nf,"buildNodeLookup");function Wf(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}f(Wf,"shouldSkipPaintEdge");async function zf(e,t,r,i,s,a){const n=rf(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Oo(t.start,t,r,a,s),Oo(t.end,t,r,a,s),i.diagramId,Hf(t,s));tf(t)&&(ii.has(t.id)||await vn(e.edgeLabels,t),jf(t,n))}f(zf,"paintLayoutEdge");function Oo(e,t,r,i,s){var a;return((a=s.getEdgeNode)==null?void 0:a.call(s,e,t,i))??(e?r.get(e)??{}:{})}f(Oo,"getRenderedNode");function Hf(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}f(Hf,"shouldSkipIntersect");function jf(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=jt(),{subGraphTitleTotalMargin:s}=ia({flowchart:i.flowchart??{}});if(e.label){const a=ii.get(e.id);let n=e.x,o=e.y;if(r){const l=ae.calcLabelPosition(r);q.debug("Moving label "+e.label+" from (",n,",",o,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(n=l.x,o=l.y)}a.attr("transform",`translate(${n}, ${o+s/2})`)}if(e!=null&&e.startLabelLeft){const a=Ut.get(e.id).startLeft;let n=e==null?void 0:e.x,o=e==null?void 0:e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=Ut.get(e.id).startRight;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=Ut.get(e.id).endLeft;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=Ut.get(e.id).endRight;let n=e.x,o=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);n=l.x,o=l.y}a.attr("transform",`translate(${n}, ${o})`)}}f(jf,"positionRenderedEdgeLabel");function Yf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}f(Yf,"getDefaultExportFromCjs");var ee={},ds={},Ve={},Gh;function hi(){if(Gh)return Ve;Gh=1;function e(n){return typeof n>"u"||n===null}f(e,"isNothing");function t(n){return typeof n=="object"&&n!==null}f(t,"isObject");function r(n){return Array.isArray(n)?n:e(n)?[]:[n]}f(r,"toArray");function i(n,o){if(o){const l=Object.keys(o);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];n[u]=o[u]}}return n}f(i,"extend");function s(n,o){let l="";for(let c=0;c<o;c+=1)l+=n;return l}f(s,"repeat");function a(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}return f(a,"isNegativeZero"),Ve.isNothing=e,Ve.isObject=t,Ve.toArray=r,Ve.repeat=s,Ve.isNegativeZero=a,Ve.extend=i,Ve}f(hi,"requireCommon");var Pa,Xh;function ci(){if(Xh)return Pa;Xh=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
+
270
+ `+r.mark.snippet),a+" "+s):a}f(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 f(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=f(function(i){return this.name+": "+e(this,i)},"toString"),Pa=t,Pa}f(ci,"requireException");var Da,Vh;function Uf(){if(Vh)return Da;Vh=1;const e=hi();function t(s,a,n,o,l){let c="",h="";const u=Math.floor(l/2)-1;return o-a>u&&(c=" ... ",a=o-u+c.length),n-o>u&&(h=" ...",n=o+u-h.length),{str:c+s.slice(a,n).replace(/\t/g,"→")+h,pos:o-a+c.length}}f(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}f(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 n=/\r?\n|\r|\0/g,o=[0],l=[];let c,h=-1;for(;c=n.exec(s.buffer);)l.push(c.index),o.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=o.length-2);h<0&&(h=o.length-1);let u="";const d=Math.min(s.line+a.linesAfter,l.length).toString().length,g=a.maxLength-(a.indent+d+3);for(let m=1;m<=a.linesBefore&&!(h-m<0);m++){const x=t(s.buffer,o[h-m],l[h-m],s.position-(o[h]-o[h-m]),g);u=e.repeat(" ",a.indent)+r((s.line-m+1).toString(),d)+" | "+x.str+`
271
+ `+u}const p=t(s.buffer,o[h],l[h],s.position,g);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),d)+" | "+p.str+`
272
+ `,u+=e.repeat("-",a.indent+d+3+p.pos)+`^
273
+ `;for(let m=1;m<=a.linesAfter&&!(h+m>=l.length);m++){const x=t(s.buffer,o[h+m],l[h+m],s.position-(o[h]-o[h+m]),g);u+=e.repeat(" ",a.indent)+r((s.line+m+1).toString(),d)+" | "+x.str+`
274
+ `}return u.replace(/\n$/,"")}return f(i,"makeSnippet"),Da=i,Da}f(Uf,"requireSnippet");var Ia,Zh;function ne(){if(Zh)return Ia;Zh=1;const e=ci(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const n={};return a!==null&&Object.keys(a).forEach(function(o){a[o].forEach(function(l){n[String(l)]=o})}),n}f(i,"compileStyleAliases");function s(a,n){if(n=n||{},Object.keys(n).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+a+'" YAML type.')}),this.options=n,this.tag=a,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=i(n.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return f(s,"Type2"),Ia=s,Ia}f(ne,"requireType");var Ra,Kh;function Nn(){if(Kh)return Ra;Kh=1;const e=ci(),t=ne();function r(a,n){const o=[];return a[n].forEach(function(l){let c=o.length;o.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),o[c]=l}),o}f(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(o){o.multi?(a.multi[o.kind].push(o),a.multi.fallback.push(o)):a[o.kind][o.tag]=a.fallback[o.tag]=o}f(n,"collectType");for(let o=0,l=arguments.length;o<l;o+=1)arguments[o].forEach(n);return a}f(i,"compileMap");function s(a){return this.extend(a)}return f(s,"Schema2"),s.prototype.extend=f(function(n){let o=[],l=[];if(n instanceof t)l.push(n);else if(Array.isArray(n))l=l.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(o=o.concat(n.implicit)),n.explicit&&(l=l.concat(n.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.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(o),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"),Ra=s,Ra}f(Nn,"requireSchema");var qa,Qh;function Wn(){if(Qh)return qa;Qh=1;const e=ne();return qa=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(t){return t!==null?t:""},"construct")}),qa}f(Wn,"requireStr");var Na,Jh;function zn(){if(Jh)return Na;Jh=1;const e=ne();return Na=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(t){return t!==null?t:[]},"construct")}),Na}f(zn,"requireSeq");var Wa,tc;function Hn(){if(tc)return Wa;tc=1;const e=ne();return Wa=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(t){return t!==null?t:{}},"construct")}),Wa}f(Hn,"requireMap");var za,ec;function jn(){if(ec)return za;ec=1;const e=Nn();return za=new e({explicit:[Wn(),zn(),Hn()]}),za}f(jn,"requireFailsafe");var Ha,rc;function Yn(){if(rc)return Ha;rc=1;const e=ne();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}f(t,"resolveYamlNull");function r(){return null}f(r,"constructYamlNull");function i(s){return s===null}return f(i,"isNull"),Ha=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"}),Ha}f(Yn,"require_null");var ja,ic;function Un(){if(ic)return ja;ic=1;const e=ne();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")}f(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}f(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return f(i,"isBoolean"),ja=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:f(function(s){return s?"true":"false"},"lowercase"),uppercase:f(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),ja}f(Un,"requireBool");var Ya,sc;function Gn(){if(sc)return Ya;sc=1;const e=hi(),t=ne();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}f(r,"isHexCode");function i(c){return c>=48&&c<=55}f(i,"isOctCode");function s(c){return c>=48&&c<=57}f(s,"isDecCode");function a(c){if(c===null)return!1;const h=c.length;let u=0,d=!1;if(!h)return!1;let g=c[u];if((g==="-"||g==="+")&&(g=c[++u]),g==="0"){if(u+1===h)return!0;if(g=c[++u],g==="b"){for(u++;u<h;u++){if(g=c[u],g!=="0"&&g!=="1")return!1;d=!0}return d&&isFinite(n(c))}if(g==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(n(c))}if(g==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(n(c))}}for(;u<h;u++){if(!s(c.charCodeAt(u)))return!1;d=!0}return d?isFinite(n(c)):!1}f(a,"resolveYamlInteger");function n(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)}f(n,"parseYamlInteger");function o(c){return n(c)}f(o,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return f(l,"isInteger"),Ya=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:o,predicate:l,represent:{binary:f(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:f(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:f(function(c){return c.toString(10)},"decimal"),hexadecimal:f(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"]}}),Ya}f(Gn,"requireInt");var Ua,ac;function Xn(){if(ac)return Ua;ac=1;const e=hi(),t=ne(),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)}f(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)}f(a,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function o(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 n.test(u)?u.replace("e",".e"):u}f(o,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return f(l,"isFloat"),Ua=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:o,defaultStyle:"lowercase"}),Ua}f(Xn,"requireFloat");var Ga,oc;function Vn(){return oc||(oc=1,Ga=jn().extend({implicit:[Yn(),Un(),Gn(),Xn()]})),Ga}f(Vn,"requireJson");var Xa,nc;function Zn(){return nc||(nc=1,Xa=Vn()),Xa}f(Zn,"requireCore");var Va,lc;function Kn(){if(lc)return Va;lc=1;const e=ne(),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(n){return n===null?!1:t.exec(n)!==null||r.exec(n)!==null}f(i,"resolveYamlTimestamp");function s(n){let o=0,l=null,c=t.exec(n);if(c===null&&(c=r.exec(n)),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 g=+c[4],p=+c[5],m=+c[6];if(c[7]){for(o=c[7].slice(0,3);o.length<3;)o+="0";o=+o}if(c[9]){const C=+c[10],b=+(c[11]||0);l=(C*60+b)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,u,d,g,p,m,o));return l&&x.setTime(x.getTime()-l),x}f(s,"constructYamlTimestamp");function a(n){return n.toISOString()}return f(a,"representYamlTimestamp"),Va=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),Va}f(Kn,"requireTimestamp");var Za,hc;function Qn(){if(hc)return Za;hc=1;const e=ne();function t(r){return r==="<<"||r===null}return f(t,"resolveYamlMerge"),Za=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Za}f(Qn,"requireMerge");var Ka,cc;function Jn(){if(cc)return Ka;cc=1;const e=ne(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
275
+ \r`;function r(n){if(n===null)return!1;let o=0;const l=n.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(n.charAt(h));if(!(u>64)){if(u<0)return!1;o+=6}}return o%8===0}f(r,"resolveYamlBinary");function i(n){const o=n.replace(/[\r\n=]/g,""),l=o.length,c=t;let h=0;const u=[];for(let g=0;g<l;g++)g%4===0&&g&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(o.charAt(g));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)}f(i,"constructYamlBinary");function s(n){let o="",l=0;const c=n.length,h=t;for(let d=0;d<c;d++)d%3===0&&d&&(o+=h[l>>18&63],o+=h[l>>12&63],o+=h[l>>6&63],o+=h[l&63]),l=(l<<8)+n[d];const u=c%3;return u===0?(o+=h[l>>18&63],o+=h[l>>12&63],o+=h[l>>6&63],o+=h[l&63]):u===2?(o+=h[l>>10&63],o+=h[l>>4&63],o+=h[l<<2&63],o+=h[64]):u===1&&(o+=h[l>>2&63],o+=h[l<<4&63],o+=h[64],o+=h[64]),o}f(s,"representYamlBinary");function a(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}return f(a,"isBinary"),Ka=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),Ka}f(Jn,"requireBinary");var Qa,uc;function tl(){if(uc)return Qa;uc=1;const e=ne(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const n=[],o=a;for(let l=0,c=o.length;l<c;l+=1){const h=o[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(n.indexOf(d)===-1)n.push(d);else return!1}return!0}f(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return f(s,"constructYamlOmap"),Qa=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Qa}f(tl,"requireOmap");var Ja,dc;function el(){if(dc)return Ja;dc=1;const e=ne(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,n=new Array(a.length);for(let o=0,l=a.length;o<l;o+=1){const c=a[o];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;n[o]=[h[0],c[h[0]]]}return!0}f(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,n=new Array(a.length);for(let o=0,l=a.length;o<l;o+=1){const c=a[o],h=Object.keys(c);n[o]=[h[0],c[h[0]]]}return n}return f(i,"constructYamlPairs"),Ja=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Ja}f(el,"requirePairs");var to,gc;function rl(){if(gc)return to;gc=1;const e=ne(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const n in a)if(t.call(a,n)&&a[n]!==null)return!1;return!0}f(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return f(i,"constructYamlSet"),to=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),to}f(rl,"requireSet");var eo,fc;function da(){return fc||(fc=1,eo=Zn().extend({implicit:[Kn(),Qn()],explicit:[Jn(),tl(),el(),rl()]})),eo}f(da,"require_default");var pc;function Gf(){if(pc)return ds;pc=1;const e=hi(),t=ci(),r=Uf(),i=da(),s=Object.prototype.hasOwnProperty,a=1,n=2,o=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]/,g=/[\x85\u2028\u2029]/,p=/[,\[\]{}]/,m=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(y){return Object.prototype.toString.call(y)}f(C,"_class");function b(y){return y===10||y===13}f(b,"isEol");function w(y){return y===9||y===32}f(w,"isWhiteSpace");function T(y){return y===9||y===32||y===10||y===13}f(T,"isWsOrEol");function _(y){return y===44||y===91||y===93||y===123||y===125}f(_,"isFlowIndicator");function v(y){if(y>=48&&y<=57)return y-48;const D=y|32;return D>=97&&D<=102?D-97+10:-1}f(v,"fromHexCode");function A(y){return y===120?2:y===117?4:y===85?8:0}f(A,"escapedHexLen");function L(y){return y>=48&&y<=57?y-48:-1}f(L,"fromDecimalCode");function Y(y){switch(y){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
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""}}f(Y,"simpleEscapeSequence");function N(y){return y<=65535?String.fromCharCode(y):String.fromCharCode((y-65536>>10)+55296,(y-65536&1023)+56320)}f(N,"charFromCodepoint");function I(y,D,G){D==="__proto__"?Object.defineProperty(y,D,{configurable:!0,enumerable:!0,writable:!0,value:G}):y[D]=G}f(I,"setProperty");const Q=new Array(256),M=new Array(256);for(let y=0;y<256;y++)Q[y]=Y(y)?1:0,M[y]=Y(y);function F(y,D){this.input=y,this.filename=D.filename||null,this.schema=D.schema||i,this.onWarning=D.onWarning||null,this.legacy=D.legacy||!1,this.json=D.json||!1,this.listener=D.listener||null,this.maxDepth=typeof D.maxDepth=="number"?D.maxDepth:100,this.maxTotalMergeKeys=typeof D.maxTotalMergeKeys=="number"?D.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=y.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=[]}f(F,"State");function E(y,D){const G={name:y.filename,buffer:y.input.slice(0,-1),position:y.position,line:y.line,column:y.position-y.lineStart};return G.snippet=r(G),new t(D,G)}f(E,"generateError");function B(y,D){throw E(y,D)}f(B,"throwError");function P(y,D){y.onWarning&&y.onWarning.call(null,E(y,D))}f(P,"throwWarning");function O(y,D,G){const K=y.anchorMapTransactions;if(K.length!==0){const U=K[K.length-1];s.call(U,D)||(U[D]={existed:s.call(y.anchorMap,D),value:y.anchorMap[D]})}y.anchorMap[D]=G}f(O,"storeAnchor");function W(y){y.anchorMapTransactions.push(Object.create(null))}f(W,"beginAnchorTransaction");function X(y){const D=y.anchorMapTransactions.pop(),G=y.anchorMapTransactions;if(G.length===0)return;const K=G[G.length-1],U=Object.keys(D);for(let rt=0,S=U.length;rt<S;rt+=1){const R=U[rt];s.call(K,R)||(K[R]=D[R])}}f(X,"commitAnchorTransaction");function at(y){const D=y.anchorMapTransactions.pop(),G=Object.keys(D);for(let K=G.length-1;K>=0;K-=1){const U=D[G[K]];U.existed?y.anchorMap[G[K]]=U.value:delete y.anchorMap[G[K]]}}f(at,"rollbackAnchorTransaction");function ot(y){return{position:y.position,line:y.line,lineStart:y.lineStart,lineIndent:y.lineIndent,firstTabInLine:y.firstTabInLine,tag:y.tag,anchor:y.anchor,kind:y.kind,result:y.result}}f(ot,"snapshotState");function gt(y,D){y.position=D.position,y.line=D.line,y.lineStart=D.lineStart,y.lineIndent=D.lineIndent,y.firstTabInLine=D.firstTabInLine,y.tag=D.tag,y.anchor=D.anchor,y.kind=D.kind,y.result=D.result}f(gt,"restoreState");const yt={YAML:f(function(D,G,K){D.version!==null&&B(D,"duplication of %YAML directive"),K.length!==1&&B(D,"YAML directive accepts exactly one argument");const U=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);U===null&&B(D,"ill-formed argument of the YAML directive");const rt=parseInt(U[1],10),S=parseInt(U[2],10);rt!==1&&B(D,"unacceptable YAML version of the document"),D.version=K[0],D.checkLineBreaks=S<2,S!==1&&S!==2&&P(D,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(D,G,K){let U;K.length!==2&&B(D,"TAG directive accepts exactly two arguments");const rt=K[0];U=K[1],m.test(rt)||B(D,"ill-formed tag handle (first argument) of the TAG directive"),s.call(D.tagMap,rt)&&B(D,'there is a previously declared suffix for "'+rt+'" tag handle'),x.test(U)||B(D,"ill-formed tag prefix (second argument) of the TAG directive");try{U=decodeURIComponent(U)}catch{B(D,"tag prefix is malformed: "+U)}D.tagMap[rt]=U},"handleTagDirective")};function nt(y,D,G,K){if(D<G){const U=y.input.slice(D,G);if(K)for(let rt=0,S=U.length;rt<S;rt+=1){const R=U.charCodeAt(rt);R===9||R>=32&&R<=1114111||B(y,"expected valid JSON character")}else d.test(U)&&B(y,"the stream contains non-printable characters");y.result+=U}}f(nt,"captureSegment");function St(y,D,G,K){e.isObject(G)||B(y,"cannot merge mappings; the provided source object is unacceptable");const U=Object.keys(G);for(let rt=0,S=U.length;rt<S;rt+=1){const R=U[rt];y.maxTotalMergeKeys!==-1&&++y.totalMergeKeys>y.maxTotalMergeKeys&&B(y,"merge keys exceeded maxTotalMergeKeys ("+y.maxTotalMergeKeys+")"),s.call(D,R)||(I(D,R,G[R]),K[R]=!0)}}f(St,"mergeMappings");function kt(y,D,G,K,U,rt,S,R,tt){if(Array.isArray(U)){U=Array.prototype.slice.call(U);for(let V=0,Z=U.length;V<Z;V+=1)Array.isArray(U[V])&&B(y,"nested arrays are not supported inside keys"),typeof U=="object"&&C(U[V])==="[object Object]"&&(U[V]="[object Object]")}if(typeof U=="object"&&C(U)==="[object Object]"&&(U="[object Object]"),U=String(U),D===null&&(D={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(rt))for(let V=0,Z=rt.length;V<Z;V+=1)St(y,D,rt[V],G);else St(y,D,rt,G);else!y.json&&!s.call(G,U)&&s.call(D,U)&&(y.line=S||y.line,y.lineStart=R||y.lineStart,y.position=tt||y.position,B(y,"duplicated mapping key")),I(D,U,rt),delete G[U];return D}f(kt,"storeMappingPair");function Mt(y){const D=y.input.charCodeAt(y.position);D===10?y.position++:D===13?(y.position++,y.input.charCodeAt(y.position)===10&&y.position++):B(y,"a line break is expected"),y.line+=1,y.lineStart=y.position,y.firstTabInLine=-1}f(Mt,"readLineBreak");function bt(y,D,G){let K=0,U=y.input.charCodeAt(y.position);for(;U!==0;){for(;w(U);)U===9&&y.firstTabInLine===-1&&(y.firstTabInLine=y.position),U=y.input.charCodeAt(++y.position);if(D&&U===35)do U=y.input.charCodeAt(++y.position);while(U!==10&&U!==13&&U!==0);if(b(U))for(Mt(y),U=y.input.charCodeAt(y.position),K++,y.lineIndent=0;U===32;)y.lineIndent++,U=y.input.charCodeAt(++y.position);else break}return G!==-1&&K!==0&&y.lineIndent<G&&P(y,"deficient indentation"),K}f(bt,"skipSeparationSpace");function it(y){let D=y.position,G=y.input.charCodeAt(D);return!!((G===45||G===46)&&G===y.input.charCodeAt(D+1)&&G===y.input.charCodeAt(D+2)&&(D+=3,G=y.input.charCodeAt(D),G===0||T(G)))}f(it,"testDocumentSeparator");function ht(y,D){D===1?y.result+=" ":D>1&&(y.result+=e.repeat(`
277
+ `,D-1))}f(ht,"writeFoldedLines");function Bt(y,D,G){let K,U,rt,S,R,tt;const V=y.kind,Z=y.result;let et=y.input.charCodeAt(y.position);if(T(et)||_(et)||et===35||et===38||et===42||et===33||et===124||et===62||et===39||et===34||et===37||et===64||et===96)return!1;if(et===63||et===45){const J=y.input.charCodeAt(y.position+1);if(T(J)||G&&_(J))return!1}for(y.kind="scalar",y.result="",K=U=y.position,rt=!1;et!==0;){if(et===58){const J=y.input.charCodeAt(y.position+1);if(T(J)||G&&_(J))break}else if(et===35){const J=y.input.charCodeAt(y.position-1);if(T(J))break}else{if(y.position===y.lineStart&&it(y)||G&&_(et))break;if(b(et))if(S=y.line,R=y.lineStart,tt=y.lineIndent,bt(y,!1,-1),y.lineIndent>=D){rt=!0,et=y.input.charCodeAt(y.position);continue}else{y.position=U,y.line=S,y.lineStart=R,y.lineIndent=tt;break}}rt&&(nt(y,K,U,!1),ht(y,y.line-S),K=U=y.position,rt=!1),w(et)||(U=y.position+1),et=y.input.charCodeAt(++y.position)}return nt(y,K,U,!1),y.result?!0:(y.kind=V,y.result=Z,!1)}f(Bt,"readPlainScalar");function Et(y,D){let G,K,U=y.input.charCodeAt(y.position);if(U!==39)return!1;for(y.kind="scalar",y.result="",y.position++,G=K=y.position;(U=y.input.charCodeAt(y.position))!==0;)if(U===39)if(nt(y,G,y.position,!0),U=y.input.charCodeAt(++y.position),U===39)G=y.position,y.position++,K=y.position;else return!0;else b(U)?(nt(y,G,K,!0),ht(y,bt(y,!1,D)),G=K=y.position):y.position===y.lineStart&&it(y)?B(y,"unexpected end of the document within a single quoted scalar"):(y.position++,w(U)||(K=y.position));B(y,"unexpected end of the stream within a single quoted scalar")}f(Et,"readSingleQuotedScalar");function qt(y,D){let G,K,U,rt=y.input.charCodeAt(y.position);if(rt!==34)return!1;for(y.kind="scalar",y.result="",y.position++,G=K=y.position;(rt=y.input.charCodeAt(y.position))!==0;){if(rt===34)return nt(y,G,y.position,!0),y.position++,!0;if(rt===92){if(nt(y,G,y.position,!0),rt=y.input.charCodeAt(++y.position),b(rt))bt(y,!1,D);else if(rt<256&&Q[rt])y.result+=M[rt],y.position++;else if((U=A(rt))>0){let S=U,R=0;for(;S>0;S--)rt=y.input.charCodeAt(++y.position),(U=v(rt))>=0?R=(R<<4)+U:B(y,"expected hexadecimal character");y.result+=N(R),y.position++}else B(y,"unknown escape sequence");G=K=y.position}else b(rt)?(nt(y,G,K,!0),ht(y,bt(y,!1,D)),G=K=y.position):y.position===y.lineStart&&it(y)?B(y,"unexpected end of the document within a double quoted scalar"):(y.position++,w(rt)||(K=y.position))}B(y,"unexpected end of the stream within a double quoted scalar")}f(qt,"readDoubleQuotedScalar");function z(y,D){let G=!0,K,U,rt;const S=y.tag;let R;const tt=y.anchor;let V,Z,et,J;const pt=Object.create(null);let ut,xt,wt,Ot=y.input.charCodeAt(y.position);if(Ot===91)V=93,J=!1,R=[];else if(Ot===123)V=125,J=!0,R={};else return!1;for(y.anchor!==null&&O(y,y.anchor,R),Ot=y.input.charCodeAt(++y.position);Ot!==0;){if(bt(y,!0,D),Ot=y.input.charCodeAt(y.position),Ot===V)return y.position++,y.tag=S,y.anchor=tt,y.kind=J?"mapping":"sequence",y.result=R,!0;if(G?Ot===44&&B(y,"expected the node content, but found ','"):B(y,"missed comma between flow collection entries"),xt=ut=wt=null,Z=et=!1,Ot===63){const Wt=y.input.charCodeAt(y.position+1);T(Wt)&&(Z=et=!0,y.position++,bt(y,!0,D))}K=y.line,U=y.lineStart,rt=y.position,be(y,D,a,!1,!0),xt=y.tag,ut=y.result,bt(y,!0,D),Ot=y.input.charCodeAt(y.position),(et||y.line===K)&&Ot===58&&(Z=!0,Ot=y.input.charCodeAt(++y.position),bt(y,!0,D),be(y,D,a,!1,!0),wt=y.result),J?kt(y,R,pt,xt,ut,wt,K,U,rt):Z?R.push(kt(y,null,pt,xt,ut,wt,K,U,rt)):R.push(ut),bt(y,!0,D),Ot=y.input.charCodeAt(y.position),Ot===44?(G=!0,Ot=y.input.charCodeAt(++y.position)):G=!1}B(y,"unexpected end of the stream within a flow collection")}f(z,"readFlowCollection");function vt(y,D){let G,K=c,U=!1,rt=!1,S=D,R=0,tt=!1,V,Z=y.input.charCodeAt(y.position);if(Z===124)G=!1;else if(Z===62)G=!0;else return!1;for(y.kind="scalar",y.result="";Z!==0;)if(Z=y.input.charCodeAt(++y.position),Z===43||Z===45)c===K?K=Z===43?u:h:B(y,"repeat of a chomping mode identifier");else if((V=L(Z))>=0)V===0?B(y,"bad explicit indentation width of a block scalar; it cannot be less than one"):rt?B(y,"repeat of an indentation width identifier"):(S=D+V-1,rt=!0);else break;if(w(Z)){do Z=y.input.charCodeAt(++y.position);while(w(Z));if(Z===35)do Z=y.input.charCodeAt(++y.position);while(!b(Z)&&Z!==0)}for(;Z!==0;){for(Mt(y),y.lineIndent=0,Z=y.input.charCodeAt(y.position);(!rt||y.lineIndent<S)&&Z===32;)y.lineIndent++,Z=y.input.charCodeAt(++y.position);if(!rt&&y.lineIndent>S&&(S=y.lineIndent),b(Z)){R++;continue}if(!rt&&S===0&&B(y,"missing indentation for block scalar"),y.lineIndent<S){K===u?y.result+=e.repeat(`
278
+ `,U?1+R:R):K===c&&U&&(y.result+=`
279
+ `);break}G?w(Z)?(tt=!0,y.result+=e.repeat(`
280
+ `,U?1+R:R)):tt?(tt=!1,y.result+=e.repeat(`
281
+ `,R+1)):R===0?U&&(y.result+=" "):y.result+=e.repeat(`
282
+ `,R):y.result+=e.repeat(`
283
+ `,U?1+R:R),U=!0,rt=!0,R=0;const et=y.position;for(;!b(Z)&&Z!==0;)Z=y.input.charCodeAt(++y.position);nt(y,et,y.position,!1)}return!0}f(vt,"readBlockScalar");function xe(y,D){const G=y.tag,K=y.anchor,U=[];let rt=!1;if(y.firstTabInLine!==-1)return!1;y.anchor!==null&&O(y,y.anchor,U);let S=y.input.charCodeAt(y.position);for(;S!==0&&(y.firstTabInLine!==-1&&(y.position=y.firstTabInLine,B(y,"tab characters must not be used in indentation")),S===45);){const R=y.input.charCodeAt(y.position+1);if(!T(R))break;if(rt=!0,y.position++,bt(y,!0,-1)&&y.lineIndent<=D){U.push(null),S=y.input.charCodeAt(y.position);continue}const tt=y.line;if(be(y,D,o,!1,!0),U.push(y.result),bt(y,!0,-1),S=y.input.charCodeAt(y.position),(y.line===tt||y.lineIndent>D)&&S!==0)B(y,"bad indentation of a sequence entry");else if(y.lineIndent<D)break}return rt?(y.tag=G,y.anchor=K,y.kind="sequence",y.result=U,!0):!1}f(xe,"readBlockSequence");function Be(y,D,G){let K,U,rt,S;const R=y.tag,tt=y.anchor,V={},Z=Object.create(null);let et=null,J=null,pt=null,ut=!1,xt=!1;if(y.firstTabInLine!==-1)return!1;y.anchor!==null&&O(y,y.anchor,V);let wt=y.input.charCodeAt(y.position);for(;wt!==0;){!ut&&y.firstTabInLine!==-1&&(y.position=y.firstTabInLine,B(y,"tab characters must not be used in indentation"));const Ot=y.input.charCodeAt(y.position+1),Wt=y.line;if((wt===63||wt===58)&&T(Ot))wt===63?(ut&&(kt(y,V,Z,et,J,null,U,rt,S),et=J=pt=null),xt=!0,ut=!0,K=!0):ut?(ut=!1,K=!0):B(y,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),y.position+=1,wt=Ot;else{if(U=y.line,rt=y.lineStart,S=y.position,!be(y,G,n,!1,!0))break;if(y.line===Wt){for(wt=y.input.charCodeAt(y.position);w(wt);)wt=y.input.charCodeAt(++y.position);if(wt===58)wt=y.input.charCodeAt(++y.position),T(wt)||B(y,"a whitespace character is expected after the key-value separator within a block mapping"),ut&&(kt(y,V,Z,et,J,null,U,rt,S),et=J=pt=null),xt=!0,ut=!1,K=!1,et=y.tag,J=y.result;else if(xt)B(y,"can not read an implicit mapping pair; a colon is missed");else return y.tag=R,y.anchor=tt,!0}else if(xt)B(y,"can not read a block mapping entry; a multiline key may not be an implicit key");else return y.tag=R,y.anchor=tt,!0}if((y.line===Wt||y.lineIndent>D)&&(ut&&(U=y.line,rt=y.lineStart,S=y.position),be(y,D,l,!0,K)&&(ut?J=y.result:pt=y.result),ut||(kt(y,V,Z,et,J,pt,U,rt,S),et=J=pt=null),bt(y,!0,-1),wt=y.input.charCodeAt(y.position)),(y.line===Wt||y.lineIndent>D)&&wt!==0)B(y,"bad indentation of a mapping entry");else if(y.lineIndent<D)break}return ut&&kt(y,V,Z,et,J,null,U,rt,S),xt&&(y.tag=R,y.anchor=tt,y.kind="mapping",y.result=V),xt}f(Be,"readBlockMapping");function di(y){let D=!1,G=!1,K,U,rt=y.input.charCodeAt(y.position);if(rt!==33)return!1;y.tag!==null&&B(y,"duplication of a tag property"),rt=y.input.charCodeAt(++y.position),rt===60?(D=!0,rt=y.input.charCodeAt(++y.position)):rt===33?(G=!0,K="!!",rt=y.input.charCodeAt(++y.position)):K="!";let S=y.position;if(D){do rt=y.input.charCodeAt(++y.position);while(rt!==0&&rt!==62);y.position<y.length?(U=y.input.slice(S,y.position),rt=y.input.charCodeAt(++y.position)):B(y,"unexpected end of the stream within a verbatim tag")}else{for(;rt!==0&&!T(rt);)rt===33&&(G?B(y,"tag suffix cannot contain exclamation marks"):(K=y.input.slice(S-1,y.position+1),m.test(K)||B(y,"named tag handle cannot contain such characters"),G=!0,S=y.position+1)),rt=y.input.charCodeAt(++y.position);U=y.input.slice(S,y.position),p.test(U)&&B(y,"tag suffix cannot contain flow indicator characters")}U&&!x.test(U)&&B(y,"tag name cannot contain such characters: "+U);try{U=decodeURIComponent(U)}catch{B(y,"tag name is malformed: "+U)}return D?y.tag=U:s.call(y.tagMap,K)?y.tag=y.tagMap[K]+U:K==="!"?y.tag="!"+U:K==="!!"?y.tag="tag:yaml.org,2002:"+U:B(y,'undeclared tag handle "'+K+'"'),!0}f(di,"readTagProperty");function Tr(y){let D=y.input.charCodeAt(y.position);if(D!==38)return!1;y.anchor!==null&&B(y,"duplication of an anchor property"),D=y.input.charCodeAt(++y.position);const G=y.position;for(;D!==0&&!T(D)&&!_(D);)D=y.input.charCodeAt(++y.position);return y.position===G&&B(y,"name of an anchor node must contain at least one character"),y.anchor=y.input.slice(G,y.position),!0}f(Tr,"readAnchorProperty");function _r(y){let D=y.input.charCodeAt(y.position);if(D!==42)return!1;D=y.input.charCodeAt(++y.position);const G=y.position;for(;D!==0&&!T(D)&&!_(D);)D=y.input.charCodeAt(++y.position);y.position===G&&B(y,"name of an alias node must contain at least one character");const K=y.input.slice(G,y.position);return s.call(y.anchorMap,K)||B(y,'unidentified alias "'+K+'"'),y.result=y.anchorMap[K],bt(y,!0,-1),!0}f(_r,"readAlias");function gi(y,D,G,K){const U=ot(y);return W(y),gt(y,D),y.tag=null,y.anchor=null,y.kind=null,y.result=null,Be(y,G,K)&&y.kind==="mapping"?(X(y),!0):(at(y),gt(y,U),!1)}f(gi,"tryReadBlockMappingFromProperty");function be(y,D,G,K,U){let rt,S,R=1,tt=!1,V=!1,Z=null,et,J,pt;y.depth>=y.maxDepth&&B(y,"nesting exceeded maxDepth ("+y.maxDepth+")"),y.depth+=1,y.listener!==null&&y.listener("open",y),y.tag=null,y.anchor=null,y.kind=null,y.result=null;const ut=rt=S=l===G||o===G;if(K&&bt(y,!0,-1)&&(tt=!0,y.lineIndent>D?R=1:y.lineIndent===D?R=0:y.lineIndent<D&&(R=-1)),R===1)for(;;){const xt=y.input.charCodeAt(y.position),wt=ot(y);if(tt&&(xt===33&&y.tag!==null||xt===38&&y.anchor!==null)||!di(y)&&!Tr(y))break;Z===null&&(Z=wt),bt(y,!0,-1)?(tt=!0,S=ut,y.lineIndent>D?R=1:y.lineIndent===D?R=0:y.lineIndent<D&&(R=-1)):S=!1}if(S&&(S=tt||U),R===1||l===G)if(a===G||n===G?J=D:J=D+1,pt=y.position-y.lineStart,R===1)if(S&&(xe(y,pt)||Be(y,pt,J))||z(y,J))V=!0;else{const xt=y.input.charCodeAt(y.position);Z!==null&&ut&&!S&&xt!==124&&xt!==62&&gi(y,Z,Z.position-Z.lineStart,J)||rt&&vt(y,J)||Et(y,J)||qt(y,J)?V=!0:_r(y)?(V=!0,(y.tag!==null||y.anchor!==null)&&B(y,"alias node should not have any properties")):Bt(y,J,a===G)&&(V=!0,y.tag===null&&(y.tag="?")),y.anchor!==null&&O(y,y.anchor,y.result)}else R===0&&(V=S&&xe(y,pt));if(y.tag===null)y.anchor!==null&&O(y,y.anchor,y.result);else if(y.tag==="?"){y.result!==null&&y.kind!=="scalar"&&B(y,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+y.kind+'"');for(let xt=0,wt=y.implicitTypes.length;xt<wt;xt+=1)if(et=y.implicitTypes[xt],et.resolve(y.result)){y.result=et.construct(y.result),y.tag=et.tag,y.anchor!==null&&O(y,y.anchor,y.result);break}}else if(y.tag!=="!"){if(s.call(y.typeMap[y.kind||"fallback"],y.tag))et=y.typeMap[y.kind||"fallback"][y.tag];else{et=null;const xt=y.typeMap.multi[y.kind||"fallback"];for(let wt=0,Ot=xt.length;wt<Ot;wt+=1)if(y.tag.slice(0,xt[wt].tag.length)===xt[wt].tag){et=xt[wt];break}}et||B(y,"unknown tag !<"+y.tag+">"),y.result!==null&&et.kind!==y.kind&&B(y,"unacceptable node kind for !<"+y.tag+'> tag; it should be "'+et.kind+'", not "'+y.kind+'"'),et.resolve(y.result,y.tag)?(y.result=et.construct(y.result,y.tag),y.anchor!==null&&O(y,y.anchor,y.result)):B(y,"cannot resolve a node with !<"+y.tag+"> explicit tag")}return y.listener!==null&&y.listener("close",y),y.depth-=1,y.tag!==null||y.anchor!==null||V}f(be,"composeNode");function fi(y){const D=y.position;let G=!1,K;for(y.version=null,y.checkLineBreaks=y.legacy,y.tagMap=Object.create(null),y.anchorMap=Object.create(null);(K=y.input.charCodeAt(y.position))!==0&&(bt(y,!0,-1),K=y.input.charCodeAt(y.position),!(y.lineIndent>0||K!==37));){G=!0,K=y.input.charCodeAt(++y.position);let U=y.position;for(;K!==0&&!T(K);)K=y.input.charCodeAt(++y.position);const rt=y.input.slice(U,y.position),S=[];for(rt.length<1&&B(y,"directive name must not be less than one character in length");K!==0;){for(;w(K);)K=y.input.charCodeAt(++y.position);if(K===35){do K=y.input.charCodeAt(++y.position);while(K!==0&&!b(K));break}if(b(K))break;for(U=y.position;K!==0&&!T(K);)K=y.input.charCodeAt(++y.position);S.push(y.input.slice(U,y.position))}K!==0&&Mt(y),s.call(yt,rt)?yt[rt](y,rt,S):P(y,'unknown document directive "'+rt+'"')}if(bt(y,!0,-1),y.lineIndent===0&&y.input.charCodeAt(y.position)===45&&y.input.charCodeAt(y.position+1)===45&&y.input.charCodeAt(y.position+2)===45?(y.position+=3,bt(y,!0,-1)):G&&B(y,"directives end mark is expected"),be(y,y.lineIndent-1,l,!1,!0),bt(y,!0,-1),y.checkLineBreaks&&g.test(y.input.slice(D,y.position))&&P(y,"non-ASCII line breaks are interpreted as content"),y.documents.push(y.result),y.position===y.lineStart&&it(y)){y.input.charCodeAt(y.position)===46&&(y.position+=3,bt(y,!0,-1));return}y.position<y.length-1&&B(y,"end of the stream or a document separator is expected")}f(fi,"readDocument");function Br(y,D){y=String(y),D=D||{},y.length!==0&&(y.charCodeAt(y.length-1)!==10&&y.charCodeAt(y.length-1)!==13&&(y+=`
284
+ `),y.charCodeAt(0)===65279&&(y=y.slice(1)));const G=new F(y,D),K=y.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;)fi(G);return G.documents}f(Br,"loadDocuments");function vr(y,D,G){D!==null&&typeof D=="object"&&typeof G>"u"&&(G=D,D=null);const K=Br(y,G);if(typeof D!="function")return K;for(let U=0,rt=K.length;U<rt;U+=1)D(K[U])}f(vr,"loadAll2");function pi(y,D){const G=Br(y,D);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 f(pi,"load2"),ds.loadAll=vr,ds.load=pi,ds}f(Gf,"requireLoader");var ro={},yc;function Xf(){if(yc)return ro;yc=1;const e=hi(),t=ci(),r=da(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,n=9,o=10,l=13,c=32,h=33,u=34,d=35,g=37,p=38,m=39,x=42,C=44,b=45,w=58,T=61,_=62,v=63,A=64,L=91,Y=93,N=96,I=123,Q=124,M=125,F={};F[0]="\\0",F[7]="\\a",F[8]="\\b",F[9]="\\t",F[10]="\\n",F[11]="\\v",F[12]="\\f",F[13]="\\r",F[27]="\\e",F[34]='\\"',F[92]="\\\\",F[133]="\\N",F[160]="\\_",F[8232]="\\L",F[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,R){if(R===null)return{};const tt={},V=Object.keys(R);for(let Z=0,et=V.length;Z<et;Z+=1){let J=V[Z],pt=String(R[J]);J.slice(0,2)==="!!"&&(J="tag:yaml.org,2002:"+J.slice(2));const ut=S.compiledTypeMap.fallback[J];ut&&s.call(ut.styleAliases,pt)&&(pt=ut.styleAliases[pt]),tt[J]=pt}return tt}f(P,"compileStyleMap");function O(S){let R,tt;const V=S.toString(16).toUpperCase();if(S<=255)R="x",tt=2;else if(S<=65535)R="u",tt=4;else if(S<=4294967295)R="U",tt=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+R+e.repeat("0",tt-V.length)+V}f(O,"encodeHex");const W=1,X=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==='"'?X:W,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}f(at,"State");function ot(S,R){const tt=e.repeat(" ",R);let V=0,Z="";const et=S.length;for(;V<et;){let J;const pt=S.indexOf(`
285
+ `,V);pt===-1?(J=S.slice(V),V=et):(J=S.slice(V,pt+1),V=pt+1),J.length&&J!==`
286
+ `&&(Z+=tt),Z+=J}return Z}f(ot,"indentString");function gt(S,R){return`
287
+ `+e.repeat(" ",S.indent*R)}f(gt,"generateNextLine");function yt(S,R){for(let tt=0,V=S.implicitTypes.length;tt<V;tt+=1)if(S.implicitTypes[tt].resolve(R))return!0;return!1}f(yt,"testImplicitResolving");function nt(S){return S===c||S===n}f(nt,"isWhitespace");function St(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==a||S>=65536&&S<=1114111}f(St,"isPrintable");function kt(S){return St(S)&&S!==a&&S!==l&&S!==o}f(kt,"isNsCharOrWhitespace");function Mt(S,R,tt){const V=kt(S),Z=V&&!nt(S);return(tt?V:V&&S!==C&&S!==L&&S!==Y&&S!==I&&S!==M)&&S!==d&&!(R===w&&!Z)||kt(R)&&!nt(R)&&S===d||R===w&&Z}f(Mt,"isPlainSafe");function bt(S){return St(S)&&S!==a&&!nt(S)&&S!==b&&S!==v&&S!==w&&S!==C&&S!==L&&S!==Y&&S!==I&&S!==M&&S!==d&&S!==p&&S!==x&&S!==h&&S!==Q&&S!==T&&S!==_&&S!==m&&S!==u&&S!==g&&S!==A&&S!==N}f(bt,"isPlainSafeFirst");function it(S){return!nt(S)&&S!==w}f(it,"isPlainSafeLast");function ht(S,R){const tt=S.charCodeAt(R);let V;return tt>=55296&&tt<=56319&&R+1<S.length&&(V=S.charCodeAt(R+1),V>=56320&&V<=57343)?(tt-55296)*1024+V-56320+65536:tt}f(ht,"codePointAt");function Bt(S){return/^\n* /.test(S)}f(Bt,"needIndentIndicator");const Et=1,qt=2,z=3,vt=4,xe=5;function Be(S,R,tt,V,Z,et,J,pt){let ut,xt=0,wt=null,Ot=!1,Wt=!1;const nl=V!==-1;let yi=-1,mi=bt(ht(S,0))&&it(ht(S,S.length-1));if(R||J)for(ut=0;ut<S.length;xt>=65536?ut+=2:ut++){if(xt=ht(S,ut),!St(xt))return xe;mi=mi&&Mt(xt,wt,pt),wt=xt}else{for(ut=0;ut<S.length;xt>=65536?ut+=2:ut++){if(xt=ht(S,ut),xt===o)Ot=!0,nl&&(Wt=Wt||ut-yi-1>V&&S[yi+1]!==" ",yi=ut);else if(!St(xt))return xe;mi=mi&&Mt(xt,wt,pt),wt=xt}Wt=Wt||nl&&ut-yi-1>V&&S[yi+1]!==" "}return!Ot&&!Wt?mi&&!J&&!Z(S)?Et:et===X?xe:qt:tt>9&&Bt(S)?xe:J?et===X?xe:qt:Wt?vt:z}f(Be,"chooseScalarStyle");function di(S,R,tt,V,Z){S.dump=(function(){if(R.length===0)return S.quotingType===X?'""':"''";if(!S.noCompatMode&&(E.indexOf(R)!==-1||B.test(R)))return S.quotingType===X?'"'+R+'"':"'"+R+"'";const et=S.indent*Math.max(1,tt),J=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-et),pt=V||S.flowLevel>-1&&tt>=S.flowLevel;function ut(xt){return yt(S,xt)}switch(f(ut,"testAmbiguity"),Be(R,pt,S.indent,J,ut,S.quotingType,S.forceQuotes&&!V,Z)){case Et:return R;case qt:return"'"+R.replace(/'/g,"''")+"'";case z:return"|"+Tr(R,S.indent)+_r(ot(R,et));case vt:return">"+Tr(R,S.indent)+_r(ot(gi(R,J),et));case xe:return'"'+fi(R)+'"';default:throw new t("impossible error: invalid scalar style")}})()}f(di,"writeScalar");function Tr(S,R){const tt=Bt(S)?String(R):"",V=S[S.length-1]===`
288
+ `,et=V&&(S[S.length-2]===`
289
+ `||S===`
290
+ `)?"+":V?"":"-";return tt+et+`
291
+ `}f(Tr,"blockHeader");function _r(S){return S[S.length-1]===`
292
+ `?S.slice(0,-1):S}f(_r,"dropEndingNewline");function gi(S,R){const tt=/(\n+)([^\n]*)/g;let V=(function(){let pt=S.indexOf(`
293
+ `);return pt=pt!==-1?pt:S.length,tt.lastIndex=pt,be(S.slice(0,pt),R)})(),Z=S[0]===`
294
+ `||S[0]===" ",et,J;for(;J=tt.exec(S);){const pt=J[1],ut=J[2];et=ut[0]===" ",V+=pt+(!Z&&!et&&ut!==""?`
295
+ `:"")+be(ut,R),Z=et}return V}f(gi,"foldString");function be(S,R){if(S===""||S[0]===" ")return S;const tt=/ [^ ]/g;let V,Z=0,et,J=0,pt=0,ut="";for(;V=tt.exec(S);)pt=V.index,pt-Z>R&&(et=J>Z?J:pt,ut+=`
296
+ `+S.slice(Z,et),Z=et+1),J=pt;return ut+=`
297
+ `,S.length-Z>R&&J>Z?ut+=S.slice(Z,J)+`
298
+ `+S.slice(J+1):ut+=S.slice(Z),ut.slice(1)}f(be,"foldLine");function fi(S){let R="",tt=0;for(let V=0;V<S.length;tt>=65536?V+=2:V++){tt=ht(S,V);const Z=F[tt];!Z&&St(tt)?(R+=S[V],tt>=65536&&(R+=S[V+1])):R+=Z||O(tt)}return R}f(fi,"escapeString");function Br(S,R,tt){let V="";const Z=S.tag;for(let et=0,J=tt.length;et<J;et+=1){let pt=tt[et];S.replacer&&(pt=S.replacer.call(tt,String(et),pt)),(G(S,R,pt,!1,!1)||typeof pt>"u"&&G(S,R,null,!1,!1))&&(V!==""&&(V+=","+(S.condenseFlow?"":" ")),V+=S.dump)}S.tag=Z,S.dump="["+V+"]"}f(Br,"writeFlowSequence");function vr(S,R,tt,V){let Z="";const et=S.tag;for(let J=0,pt=tt.length;J<pt;J+=1){let ut=tt[J];S.replacer&&(ut=S.replacer.call(tt,String(J),ut)),(G(S,R+1,ut,!0,!0,!1,!0)||typeof ut>"u"&&G(S,R+1,null,!0,!0,!1,!0))&&((!V||Z!=="")&&(Z+=gt(S,R)),S.dump&&o===S.dump.charCodeAt(0)?Z+="-":Z+="- ",Z+=S.dump)}S.tag=et,S.dump=Z||"[]"}f(vr,"writeBlockSequence");function pi(S,R,tt){let V="";const Z=S.tag,et=Object.keys(tt);for(let J=0,pt=et.length;J<pt;J+=1){let ut="";V!==""&&(ut+=", "),S.condenseFlow&&(ut+='"');const xt=et[J];let wt=tt[xt];S.replacer&&(wt=S.replacer.call(tt,xt,wt)),G(S,R,xt,!1,!1)&&(S.dump.length>1024&&(ut+="? "),ut+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),G(S,R,wt,!1,!1)&&(ut+=S.dump,V+=ut))}S.tag=Z,S.dump="{"+V+"}"}f(pi,"writeFlowMapping");function y(S,R,tt,V){let Z="";const et=S.tag,J=Object.keys(tt);if(S.sortKeys===!0)J.sort();else if(typeof S.sortKeys=="function")J.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let pt=0,ut=J.length;pt<ut;pt+=1){let xt="";(!V||Z!=="")&&(xt+=gt(S,R));const wt=J[pt];let Ot=tt[wt];if(S.replacer&&(Ot=S.replacer.call(tt,wt,Ot)),!G(S,R+1,wt,!0,!0,!0))continue;const Wt=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;Wt&&(S.dump&&o===S.dump.charCodeAt(0)?xt+="?":xt+="? "),xt+=S.dump,Wt&&(xt+=gt(S,R)),G(S,R+1,Ot,!0,Wt)&&(S.dump&&o===S.dump.charCodeAt(0)?xt+=":":xt+=": ",xt+=S.dump,Z+=xt)}S.tag=et,S.dump=Z||"{}"}f(y,"writeBlockMapping");function D(S,R,tt){const V=tt?S.explicitTypes:S.implicitTypes;for(let Z=0,et=V.length;Z<et;Z+=1){const J=V[Z];if((J.instanceOf||J.predicate)&&(!J.instanceOf||typeof R=="object"&&R instanceof J.instanceOf)&&(!J.predicate||J.predicate(R))){if(tt?J.multi&&J.representName?S.tag=J.representName(R):S.tag=J.tag:S.tag="?",J.represent){const pt=S.styleMap[J.tag]||J.defaultStyle;let ut;if(i.call(J.represent)==="[object Function]")ut=J.represent(R,pt);else if(s.call(J.represent,pt))ut=J.represent[pt](R,pt);else throw new t("!<"+J.tag+'> tag resolver accepts not "'+pt+'" style');S.dump=ut}return!0}}return!1}f(D,"detectType");function G(S,R,tt,V,Z,et,J){S.tag=null,S.dump=tt,D(S,tt,!1)||D(S,tt,!0);const pt=i.call(S.dump),ut=V;V&&(V=S.flowLevel<0||S.flowLevel>R);const xt=pt==="[object Object]"||pt==="[object Array]";let wt,Ot;if(xt&&(wt=S.duplicates.indexOf(tt),Ot=wt!==-1),(S.tag!==null&&S.tag!=="?"||Ot||S.indent!==2&&R>0)&&(Z=!1),Ot&&S.usedDuplicates[wt])S.dump="*ref_"+wt;else{if(xt&&Ot&&!S.usedDuplicates[wt]&&(S.usedDuplicates[wt]=!0),pt==="[object Object]")V&&Object.keys(S.dump).length!==0?(y(S,R,S.dump,Z),Ot&&(S.dump="&ref_"+wt+S.dump)):(pi(S,R,S.dump),Ot&&(S.dump="&ref_"+wt+" "+S.dump));else if(pt==="[object Array]")V&&S.dump.length!==0?(S.noArrayIndent&&!J&&R>0?vr(S,R-1,S.dump,Z):vr(S,R,S.dump,Z),Ot&&(S.dump="&ref_"+wt+S.dump)):(Br(S,R,S.dump),Ot&&(S.dump="&ref_"+wt+" "+S.dump));else if(pt==="[object String]")S.tag!=="?"&&di(S,S.dump,R,et,ut);else{if(pt==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+pt)}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}f(G,"writeNode");function K(S,R){const tt=[],V=[];U(S,tt,V);const Z=V.length;for(let et=0;et<Z;et+=1)R.duplicates.push(tt[V[et]]);R.usedDuplicates=new Array(Z)}f(K,"getDuplicateReferences");function U(S,R,tt){if(S!==null&&typeof S=="object"){const V=R.indexOf(S);if(V!==-1)tt.indexOf(V)===-1&&tt.push(V);else if(R.push(S),Array.isArray(S))for(let Z=0,et=S.length;Z<et;Z+=1)U(S[Z],R,tt);else{const Z=Object.keys(S);for(let et=0,J=Z.length;et<J;et+=1)U(S[Z[et]],R,tt)}}}f(U,"inspectNode");function rt(S,R){R=R||{};const tt=new at(R);tt.noRefs||K(S,tt);let V=S;return tt.replacer&&(V=tt.replacer.call({"":V},"",V)),G(tt,0,V,!0,!0)?tt.dump+`
299
+ `:""}return f(rt,"dump2"),ro.dump=rt,ro}f(Xf,"requireDumper");var mc;function Vf(){if(mc)return ee;mc=1;const e=Gf(),t=Xf();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 f(r,"renamed"),ee.Type=ne(),ee.Schema=Nn(),ee.FAILSAFE_SCHEMA=jn(),ee.JSON_SCHEMA=Vn(),ee.CORE_SCHEMA=Zn(),ee.DEFAULT_SCHEMA=da(),ee.load=e.load,ee.loadAll=e.loadAll,ee.dump=t.dump,ee.YAMLException=ci(),ee.types={binary:Jn(),float:Xn(),map:Hn(),null:Yn(),pairs:el(),set:rl(),timestamp:Kn(),bool:Un(),int:Gn(),merge:Qn(),omap:tl(),seq:zn(),str:Wn()},ee.safeLoad=r("safeLoad","load"),ee.safeLoadAll=r("safeLoadAll","loadAll"),ee.safeDump=r("safeDump","dump"),ee}f(Vf,"requireJsYaml");var _T=Vf(),BT=Yf(_T),{Type:$L,Schema:OL,FAILSAFE_SCHEMA:PL,JSON_SCHEMA:vT,CORE_SCHEMA:DL,DEFAULT_SCHEMA:IL,load:LT,loadAll:RL,dump:qL,YAMLException:NL,types:WL,safeLoad:zL,safeLoadAll:HL,safeDump:jL}=BT,FT={common:Ki,getConfig:jt,insertCluster:Jg,insertEdge:rf,insertEdgeLabel:vn,insertMarkers:of,insertNode:Bn,interpolateToCurve:rn,labelHelper:mt,log:q,positionEdgeLabel:ik},Gi={},Zf=f(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),AT=f(()=>{Zf([{name:"dagre",loader:f(async()=>await At(()=>import("./dagre-GXQ25YYZ-BtdtVnNL.js"),__vite__mapDeps([3,4,1,2])),"loader")},{name:"swimlane",loader:f(async()=>await At(()=>import("./swimlanes-42K2YHIH-3uatewyx.js"),__vite__mapDeps([5,1,2])),"loader")},{name:"cose-bilkent",loader:f(async()=>await At(()=>import("./cose-bilkent-JH36ORCC-DNoCqFjg.js"),__vite__mapDeps([6,7,1,2])),"loader")}])},"registerDefaultLayoutLoaders");AT();var YL=f(async(e,t)=>{if(!(e.layoutAlgorithm in Gi))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=Gi[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:o,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"}`),n){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",o).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,FT,{algorithm:r.algorithm})},"render"),UL=f((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return q.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"),il="comm",Kf="rule",Qf="decl",MT="@media",ET="@import",$T="@supports",OT="@namespace",Po="@keyframes",Jf="@layer",PT="@scope",DT=Math.abs,Ni=String.fromCharCode;function tp(e){return e.trim()}function Do(e,t,r){return e.replace(t,r)}function qr(e,t){return e.charCodeAt(t)|0}function si(e,t,r){return e.slice(t,r)}function Ae(e){return e.length}function ep(e){return e.length}function gs(e,t){return t.push(e),e}var ga=1,ai=1,rp=0,me=0,Xt=0,ui="";function sl(e,t,r,i,s,a,n,o){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:ga,column:ai,length:n,return:"",siblings:o}}function IT(){return Xt}function RT(){return Xt=me>0?qr(ui,--me):0,ai--,Xt===10&&(ai=1,ga--),Xt}function Se(){return Xt=me<rp?qr(ui,me++):0,ai++,Xt===10&&(ai=1,ga++),Xt}function Qe(){return qr(ui,me)}function Ss(){return me}function fa(e,t){return si(ui,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qT(e){return ga=ai=1,rp=Ae(ui=e),me=0,[]}function NT(e){return ui="",e}function io(e){return tp(fa(me-1,Io(e===91?e+2:e===40?e+1:e)))}function WT(e){for(;(Xt=Qe())&&Xt<33;)Se();return Xi(e)>2||Xi(Xt)>3?"":" "}function zT(e,t){for(;--t&&Se()&&!(Xt<48||Xt>102||Xt>57&&Xt<65||Xt>70&&Xt<97););return fa(e,Ss()+(t<6&&Qe()==32&&Se()==32))}function Io(e){for(;Se();)switch(Xt){case e:return me;case 34:case 39:e!==34&&e!==39&&Io(Xt);break;case 40:e===41&&Io(e);break;case 92:Se();break}return me}function HT(e,t){for(;Se()&&e+Xt!==57;)if(e+Xt===84&&Qe()===47)break;return"/*"+fa(t,me-1)+"*"+Ni(e===47?e:Se())}function jT(e){for(;!Xi(Qe());)Se();return fa(e,me)}function YT(e){return NT(Ts("",null,null,null,[""],e=qT(e),0,[0],e))}function Ts(e,t,r,i,s,a,n,o,l){for(var c=0,h=0,u=n,d=0,g=0,p=0,m=1,x=1,C=1,b=0,w=0,T="",_=s,v=a,A=i,L=T;x;)switch(p=w,w=Se()){case 40:p!=108&&qr(L,u-1)==58?(b++,L+="("):L+=io(w);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=io(w);break;case 9:case 10:case 13:case 32:if(b>0){L+=Ni(w);break}L+=WT(p);break;case 92:L+=zT(Ss()-1,7);continue;case 47:switch(Qe()){case 42:case 47:gs(UT(HT(Se(),Ss()),t,r,l),l),(Xi(p||1)==5||Xi(Qe()||1)==5)&&Ae(L)&&si(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:o[c++]=Ae(L)*C;case 125*m:case 59:case 0:if(b>0&&w){L+=Ni(w);break}switch(w){case 0:case 125:x=0;case 59+h:C==-1&&(L=Do(L,/\f/g,"")),g>0&&(Ae(L)-u||m===0)&&gs(g>32?xc(L+";",i,r,u-1,l):xc(Do(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(gs(A=Cc(L,t,r,c,h,s,o,T,_=[],v=[],u,a),a),w===123)if(h===0)Ts(L,t,A,A,_,a,u,o,v);else{switch(d){case 99:if(qr(L,3)===110)break;case 108:if(qr(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ts(e,A,A,i&&gs(Cc(e,A,A,0,0,s,o,T,s,_=[],u,v),v),s,v,u,o,i?_:v):Ts(L,A,A,A,[""],v,0,o,v)}}c=h=g=0,m=C=1,T=L="",u=n;break;case 58:u=1+Ae(L),g=p;default:if(m<1){if(w==123)--m;else if(w==125&&m++==0&&RT()==125)continue}switch(L+=Ni(w),w*m){case 38:C=h>0?1:(L+="\f",-1);break;case 44:if(b>0)break;o[c++]=(Ae(L)-1)*C,C=1;break;case 64:Qe()===45&&(L+=io(Se())),d=Qe(),h=u=Ae(T=L+=jT(Ss())),w++;break;case 45:p===45&&Ae(L)==2&&(m=0)}}return a}function Cc(e,t,r,i,s,a,n,o,l,c,h,u){for(var d=s-1,g=s===0?a:[""],p=ep(g),m=0,x=0,C=0;m<i;++m)for(var b=0,w=si(e,d+1,d=DT(x=n[m])),T=e;b<p;++b)(T=tp(x>0?g[b]+" "+w:Do(w,/&\f/g,g[b])))&&(l[C++]=T);return sl(e,t,r,s===0?Kf:o,l,c,h,u)}function UT(e,t,r,i){return sl(e,t,r,il,Ni(IT()),si(e,2,-2),0,i)}function xc(e,t,r,i,s){return sl(e,t,r,Qf,si(e,0,i),si(e,i+1,-1),i,s)}function Ro(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function GT(e,t,r,i){switch(e.type){case Jf:if(e.children.length)break;case ET:case OT:case Qf:return e.return=e.return||e.value;case il:return"";case Po:return e.return=e.value+"{"+Ro(e.children,i)+"}";case Kf:if(!Ae(e.value=e.props.join(",")))return""}return Ae(r=Ro(e.children,i))?e.return=e.value+"{"+r+"}":""}function XT(e){var t=ep(e);return function(r,i,s,a){for(var n="",o=0;o<t;o++)n+=e[o](r,i,s,a)||"";return n}}var ip="c4",VT=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),ZT=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-Bm0ktuXG.js");return{diagram:t}},__vite__mapDeps([8,9,1,2]));return{id:ip,diagram:e}},"loader"),KT={id:ip,detector:VT,loader:ZT},QT=KT,sp="flowchart",JT=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),t_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Cy4qmeb0.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:sp,diagram:e}},"loader"),e_={id:sp,detector:JT,loader:t_},r_=e_,ap="flowchart-v2",i_=f((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"),s_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Cy4qmeb0.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:ap,diagram:e}},"loader"),a_={id:ap,detector:i_,loader:s_},o_=a_,op="swimlane",n_=f(e=>/^\s*swimlane-beta\b/.test(e),"detector"),l_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-Chk2E8QS.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,13,9,1,2,14]));return{id:op,diagram:e}},"loader"),h_={id:op,detector:n_,loader:l_},c_=h_,np="er",u_=f(e=>/^\s*erDiagram/.test(e),"detector"),d_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-B0d0Nnu_.js");return{diagram:t}},__vite__mapDeps([16,12,13,14,1,2]));return{id:np,diagram:e}},"loader"),g_={id:np,detector:u_,loader:d_},f_=g_,lp="gitGraph",p_=f(e=>/^\s*gitGraph/.test(e),"detector"),y_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-8Tak7xqH.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,1,2]));return{id:lp,diagram:e}},"loader"),m_={id:lp,detector:p_,loader:y_},C_=m_,hp="gantt",x_=f(e=>/^\s*gantt/.test(e),"detector"),b_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-Djww1Rba.js");return{diagram:t}},__vite__mapDeps([21,1,2,22]));return{id:hp,diagram:e}},"loader"),k_={id:hp,detector:x_,loader:b_},w_=k_,cp="info",S_=f(e=>/^\s*info/.test(e),"detector"),T_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-DkaHqIdq.js");return{diagram:t}},__vite__mapDeps([23,20,1,2]));return{id:cp,diagram:e}},"loader"),__={id:cp,detector:S_,loader:T_},up="pie",B_=f(e=>/^\s*pie/.test(e),"detector"),v_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-DSbIEsvX.js");return{diagram:t}},__vite__mapDeps([24,19,20,1,2,22]));return{id:up,diagram:e}},"loader"),L_={id:up,detector:B_,loader:v_},dp="quadrantChart",F_=f(e=>/^\s*quadrantChart/.test(e),"detector"),A_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-NH55I-VQ.js");return{diagram:t}},__vite__mapDeps([25,22,1,2]));return{id:dp,diagram:e}},"loader"),M_={id:dp,detector:F_,loader:A_},E_=M_,gp="xychart",$_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),O_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-D8oU7JtR.js");return{diagram:t}},__vite__mapDeps([26,22,1,2]));return{id:gp,diagram:e}},"loader"),P_={id:gp,detector:$_,loader:O_},D_=P_,fp="requirement",I_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),R_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-DnEzj3DN.js");return{diagram:t}},__vite__mapDeps([27,12,13,1,2]));return{id:fp,diagram:e}},"loader"),q_={id:fp,detector:I_,loader:R_},N_=q_,pp="sequence",W_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),z_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-BilBA3A_.js");return{diagram:t}},__vite__mapDeps([28,18,9,1,2]));return{id:pp,diagram:e}},"loader"),H_={id:pp,detector:W_,loader:z_},j_=H_,yp="class",Y_=f((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"),U_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-vlrlRtwo.js");return{diagram:t}},__vite__mapDeps([29,30,11,12,13,9,1,2]));return{id:yp,diagram:e}},"loader"),G_={id:yp,detector:Y_,loader:U_},X_=G_,mp="classDiagram",V_=f((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"),Z_=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-vlrlRtwo.js");return{diagram:t}},__vite__mapDeps([31,30,11,12,13,9,1,2]));return{id:mp,diagram:e}},"loader"),K_={id:mp,detector:V_,loader:Z_},Q_=K_,Cp="state",J_=f((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"),tB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-DMwGaAv4.js");return{diagram:t}},__vite__mapDeps([32,33,12,13,9,1,2,4]));return{id:Cp,diagram:e}},"loader"),eB={id:Cp,detector:J_,loader:tB},rB=eB,xp="stateDiagram",iB=f((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"),sB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-Clsx447Y.js");return{diagram:t}},__vite__mapDeps([34,33,12,13,9,1,2]));return{id:xp,diagram:e}},"loader"),aB={id:xp,detector:iB,loader:sB},oB=aB,bp="journey",nB=f(e=>/^\s*journey/.test(e),"detector"),lB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-Be1Bgc8E.js");return{diagram:t}},__vite__mapDeps([35,11,9,1,2]));return{id:bp,diagram:e}},"loader"),hB={id:bp,detector:nB,loader:lB},cB=hB,uB=f((e,t,r)=>{q.debug(`rendering svg for syntax error
300
+ `);const i=M0(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),zc(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"),kp={draw:uB},dB=kp,gB={db:{},renderer:kp,parser:{parse:f(()=>{},"parse")}},fB=gB,wp="flowchart-elk",pB=f((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"),yB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-Cy4qmeb0.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,13,9,1,2,14]));return{id:wp,diagram:e}},"loader"),mB={id:wp,detector:pB,loader:yB},CB=mB,Sp="timeline",xB=f(e=>/^\s*timeline/.test(e),"detector"),bB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-Dj31t9Rm.js");return{diagram:t}},__vite__mapDeps([36,1,2]));return{id:Sp,diagram:e}},"loader"),kB={id:Sp,detector:xB,loader:bB},wB=kB,Tp="mindmap",SB=f(e=>/^\s*mindmap/.test(e),"detector"),TB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-CEjjKmq_.js");return{diagram:t}},__vite__mapDeps([37,12,13,1,2]));return{id:Tp,diagram:e}},"loader"),_B={id:Tp,detector:SB,loader:TB},BB=_B,_p="kanban",vB=f(e=>/^\s*kanban/.test(e),"detector"),LB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-Uv5UoCff.js");return{diagram:t}},__vite__mapDeps([38,11,1,2]));return{id:_p,diagram:e}},"loader"),FB={id:_p,detector:vB,loader:LB},AB=FB,Bp="sankey",MB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),EB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-Deb4JoPN.js");return{diagram:t}},__vite__mapDeps([39,22,1,2]));return{id:Bp,diagram:e}},"loader"),$B={id:Bp,detector:MB,loader:EB},OB=$B,vp="packet",PB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),DB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-BhPC3EPH.js");return{diagram:t}},__vite__mapDeps([40,19,20,1,2]));return{id:vp,diagram:e}},"loader"),IB={id:vp,detector:PB,loader:DB},Lp="radar",RB=f(e=>/^\s*radar-beta/.test(e),"detector"),qB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-WsABo8v9.js");return{diagram:t}},__vite__mapDeps([41,19,20,1,2]));return{id:Lp,diagram:e}},"loader"),NB={id:Lp,detector:RB,loader:qB},Fp="block",WB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),zB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-CDZzuTZC.js");return{diagram:t}},__vite__mapDeps([42,11,14,1,2]));return{id:Fp,diagram:e}},"loader"),HB={id:Fp,detector:WB,loader:zB},jB=HB,Ap="treeView",YB=f(e=>/^\s*treeView-beta/.test(e),"detector"),UB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-DTBDTeWr.js");return{diagram:t}},__vite__mapDeps([43,18,19,20,1,2]));return{id:Ap,diagram:e}},"loader"),GB={id:Ap,detector:YB,loader:UB},XB=GB,Mp="architecture",VB=f(e=>/^\s*architecture/.test(e),"detector"),ZB=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-oVzTvsb3.js");return{diagram:t}},__vite__mapDeps([44,19,20,1,2,7]));return{id:Mp,diagram:e}},"loader"),KB={id:Mp,detector:VB,loader:ZB},QB=KB,Ep="eventmodeling",JB=f(e=>/^\s*eventmodeling/.test(e),"detector"),tv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-PfPn8q7Y.js");return{diagram:t}},__vite__mapDeps([45,19,20,1,2]));return{id:Ep,diagram:e}},"loader"),ev={id:Ep,detector:JB,loader:tv},rv=ev,$p="ishikawa",iv=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),sv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-ay7785S2.js");return{diagram:t}},__vite__mapDeps([46,1,2]));return{id:$p,diagram:e}},"loader"),av={id:$p,detector:iv,loader:sv},Op="venn",ov=f(e=>/^\s*venn-beta/.test(e),"detector"),nv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-BoVPzNB_.js");return{diagram:t}},__vite__mapDeps([47,1,2]));return{id:Op,diagram:e}},"loader"),lv={id:Op,detector:ov,loader:nv},hv=lv,Pp="treemap",cv=f(e=>/^\s*treemap/.test(e),"detector"),uv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-BgImaOA7.js");return{diagram:t}},__vite__mapDeps([48,19,13,20,1,2,22]));return{id:Pp,diagram:e}},"loader"),dv={id:Pp,detector:cv,loader:uv},Dp="wardley",gv=f(e=>/^\s*wardley-beta/i.test(e),"detector"),fv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-BWMtHf0h.js");return{diagram:t}},__vite__mapDeps([49,19,20,1,2]));return{id:Dp,diagram:e}},"loader"),pv={id:Dp,detector:gv,loader:fv},yv=pv,Ip="cynefin",mv=f(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Cv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-DFvR6u8N.js");return{diagram:t}},__vite__mapDeps([50,19,20,1,2]));return{id:Ip,diagram:e}},"loader"),xv={id:Ip,detector:mv,loader:Cv},Rp="railroad",bv=f(e=>/^\s*railroad-beta/i.test(e),"detector"),kv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-DrY5l5qz.js");return{diagram:t}},__vite__mapDeps([51,52,19,20,1,2]));return{id:Rp,diagram:e}},"loader"),wv={id:Rp,detector:bv,loader:kv},qp="railroadEbnf",Sv=f(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Tv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-MZXRKqfj.js");return{diagram:t}},__vite__mapDeps([53,52,19,20,1,2]));return{id:qp,diagram:e}},"loader"),_v={id:qp,detector:Sv,loader:Tv},Np="railroadAbnf",Bv=f(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),vv=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-CQun3ogE.js");return{diagram:t}},__vite__mapDeps([54,52,19,20,1,2]));return{id:Np,diagram:e}},"loader"),Lv={id:Np,detector:Bv,loader:vv},Wp="railroadPeg",Fv=f(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Av=f(async()=>{const{diagram:e}=await At(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-CCbGN7im.js");return{diagram:t}},__vite__mapDeps([55,52,19,20,1,2]));return{id:Wp,diagram:e}},"loader"),Mv={id:Wp,detector:Fv,loader:Av},bc=!1,pa=f(()=>{bc||(bc=!0,Fs("error",fB,e=>e.toLowerCase().trim()==="error"),Fs("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),oo(CB,BB,QB),oo(QT,AB,Q_,X_,f_,w_,__,L_,N_,j_,c_,o_,r_,wB,C_,oB,rB,cB,E_,OB,IB,D_,jB,rv,XB,NB,av,dv,wv,_v,Lv,Mv,hv,yv,xv))},"addDiagrams"),Ev=f(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(fr).map(async([r,{detector:i,loader:s}])=>{if(s)try{co(r)}catch{try{const{diagram:a,id:n}=await s();Fs(n,a,i)}catch(a){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete fr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),$v="graphics-document document";function zp(e,t){e.attr("role",$v),t!==""&&e.attr("aria-roledescription",t)}f(zp,"setA11yDiagramInfo");function Hp(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)}}}f(Hp,"addSVGa11yTitleDescription");var dr,qo=(dr=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=jt(),s=Ho(t,i);t=tb(t)+`
301
+ `;try{co(s)}catch{const u=Gy(s);if(!u)throw new Dc(`Diagram ${s} not found.`);const{id:d,diagram:g}=await u();Fs(d,g)}const{db:a,parser:n,renderer:o,init:l}=co(s);return n.parser&&(n.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 n.parse(t),new dr(s,t,a,n,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(dr,"Diagram"),dr),kc=[],Ov=f(()=>{kc.forEach(e=>{e()}),kc=[]},"attachFunctions"),Pv=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function jp(e){const t=e.match(Pc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
302
+ `).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
303
+ `):t[2];let s=LT(i,{schema:vT})??{};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}}f(jp,"extractFrontMatter");var Dv=f(e=>e.replace(/\r\n?/g,`
304
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Iv=f(e=>{const{text:t,metadata:r}=jp(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),Rv=f(e=>{const t=ae.detectInit(e)??{},r=ae.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Wx(e),directive:t}},"processDirectives");function al(e){const t=Dv(e),r=Iv(t),i=Rv(r.text),s=ln(r.config,i.directive);return e=Pv(i.text),{code:e,title:r.title,config:s}}f(al,"preprocessDiagram");function Yp(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Yp,"toBase64");var qv=5e4,Nv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Wv="sandbox",zv="loose",Hv="http://www.w3.org/2000/svg",jv="http://www.w3.org/1999/xlink",Yv="http://www.w3.org/1999/xhtml",Uv="100%",Gv="100%",Xv="border:0;margin:0;",Vv="margin:0",Zv="allow-top-navigation-by-user-activation allow-popups",Kv='The "iframe" tag is not supported by your browser.',Qv=["foreignobject"],Jv=["dominant-baseline"];function ol(e){const t=al(e);return vs(),Hy(t.config??{}),t}f(ol,"processAndSetConfigs");async function Up(e,t){pa();try{const{code:r,config:i}=ol(e);return{diagramType:(await Xp(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(Up,"parse");var wc=f((e,t,r=[])=>{const i=Ac(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),tL=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=oe(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Ml(l.styles)||o.forEach(c=>{r.insertRule(wc(l.id,c,l.styles),r.cssRules.length)}),Ml(l.textStyles)||r.insertRule(wc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=ho(s)+`
305
+ `}else i+=`${e.themeCSS}
306
+ `;return i+ho(r)},"createCssStyles"),eL=f((e,t)=>Ro(YT(`${e}{${t}}`),XT([f(function(i,s,a,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Po)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[MT,$T,Jf,PT,"@container","@starting-style"],Po].includes(i.type)||(q.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=il))},"addNamespace"),GT])),"compileCSS"),rL=f((e,t,r,i)=>{const s=tL(e,r),a=um(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return eL(i,a)},"createUserStyles"),iL=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=er(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),sL=f((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":Gv,i=Yp(`<body style="${Vv}">${e}</body>`);return`<iframe style="width:${Uv};height:${r};${Xv}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${Zv}">
307
+ ${Kv}
308
+ </iframe>`},"putIntoIFrame"),Sc=f((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Hv);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function No(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(No,"sandboxedIframe");var aL=f((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),oL=f(async function(e,t,r){var M,F,E,B,P,O;pa();const i=ol(t);t=i.code;const s=jt();q.debug(s),t.length>((s==null?void 0:s.maxTextSize)??qv)&&(t=Nv);const a=`#${e}`,n="i"+e,o="#"+n,l="d"+e,c="#"+l,h=f(()=>{const X=Ft(d?o:c).node();X&&"remove"in X&&X.remove()},"removeTempElements");let u=Ft(document.body);const d=s.securityLevel===Wv,g=s.securityLevel===zv,p=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const W=No(Ft(r),n);u=Ft(W.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Ft(r);Sc(u,e,l,`font-family: ${p}`,jv)}else{if(aL(document,e,l,n),d){const W=No(Ft(document.body),n);u=Ft(W.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Ft("body");Sc(u,e,l)}let m,x;try{m=await qo.fromText(t,{title:i.title})}catch(W){if(s.suppressErrorRendering)throw h(),W;m=await qo.fromText("error"),x=W}const C=u.select(c).node(),b=m.type,w=C.firstChild,T=w.firstChild,_=(F=(M=m.renderer).getClasses)==null?void 0:F.call(M,t,m),v=rL(s,b,_,a),A=document.createElement("style");A.innerHTML=v,w.insertBefore(A,T);try{await m.renderer.draw(t,e,"11.17.2",m)}catch(W){throw s.suppressErrorRendering?h():dB.draw(t,e,"11.17.2"),W}const L=u.select(`${c} svg`),Y=(B=(E=m.db).getAccTitle)==null?void 0:B.call(E),N=(O=(P=m.db).getAccDescription)==null?void 0:O.call(P);Vp(b,L,Y,N);const Q=f(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",Yv);let W=u.select(c).node().innerHTML;if(q.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),W=iL(W,d,Ie(s.arrowMarkerAbsolute)),d){const X=u.select(c+" svg").node();W=sL(W,X)}else g||(W=ei.sanitize(W,{ADD_TAGS:Qv,ADD_ATTR:Jv,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Ov(),W},"serializeSvg")();if(x)throw x;return h(),{diagramType:b,svg:Q,bindFunctions:m.db.bindFunctions}},"render");function Gp(e={}){var i;const t=Kt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Wy(t),t!=null&&t.theme&&t.theme in He?t.themeVariables=He[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=He.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Ny(t):Mc();zo(r.logLevel),pa()}f(Gp,"initialize");var Xp=f((e,t={})=>{const{code:r}=al(e);return qo.fromText(r,t)},"getDiagramFromText");function Vp(e,t,r,i){zp(t,e),Hp(t,r,i,t.attr("id"))}f(Vp,"addA11yInfo");var xr=Object.freeze({render:oL,parse:Up,getDiagramFromText:Xp,initialize:Gp,getConfig:jt,setConfig:Ec,getSiteConfig:Mc,updateSiteConfig:zy,reset:f(()=>{vs()},"reset"),globalReset:f(()=>{vs(ri)},"globalReset"),defaultConfig:ri});zo(jt().logLevel);vs(jt());var nL=f((e,t,r)=>{q.warn(e),nn(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"),Zp=f(async function(e={querySelector:".mermaid"}){try{await lL(e)}catch(t){if(nn(t)&&q.error(t.str),ge.parseError&&ge.parseError(t),!e.suppressErrors)throw q.error("Use the suppressErrors option to suppress these errors"),t}},"run"),lL=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=xr.getConfig();q.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");q.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(q.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),xr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ae.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const l of Array.from(s)){if(q.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;n=l.innerHTML,n=ad(ae.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ae.detectInit(n);h&&q.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await ty(c,n,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){nL(u,o,ge.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Kp=f(function(e){xr.initialize(e)},"initialize"),hL=f(async function(e,t,r){q.warn("mermaid.init is deprecated. Please use run instead."),e&&Kp(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Zp(i)},"init"),cL=f(async(e,{lazyLoad:t=!0}={})=>{pa(),oo(...e),t===!1&&await Ev()},"registerExternalDiagrams"),Qp=f(function(){if(ge.startOnLoad){const{startOnLoad:e}=xr.getConfig();e&&ge.run().catch(t=>q.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Qp,!1);var uL=f(function(e){ge.parseError=e},"setParseErrorHandler"),Gs=[],so=!1,Jp=f(async()=>{if(!so){for(so=!0;Gs.length>0;){const e=Gs.shift();if(e)try{await e()}catch(t){q.error("Error executing queue",t)}}so=!1}},"executeQueue"),dL=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((a,n)=>{xr.parse(e,t).then(o=>{a(o),r(o)},o=>{var l;q.error("Error parsing",o),(l=ge.parseError)==null||l.call(ge,o),n(o),i(o)})}),"performCall");Gs.push(s),Jp().catch(i)}),"parse"),ty=f((e,t,r)=>new Promise((i,s)=>{const a=f(()=>new Promise((n,o)=>{xr.render(e,t,r).then(l=>{n(l),i(l)},l=>{var c;q.error("Error parsing",l),(c=ge.parseError)==null||c.call(ge,l),o(l),s(l)})}),"performCall");Gs.push(a),Jp().catch(s)}),"render"),gL=f(()=>Object.keys(fr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ge={startOnLoad:!0,mermaidAPI:xr,parse:dL,render:ty,init:hL,run:Zp,registerExternalDiagrams:cL,registerLayoutLoaders:Zf,initialize:Kp,parseError:void 0,contentLoaded:Qp,setParseErrorHandler:uL,detectType:Ho,registerIconPacks:rx,getRegisteredDiagramsMetadata:gL},fL=ge;/*! Check if previously processed *//*!
309
+ * Wait for document loaded before starting the execution
310
+ */const GL=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:In,createCommonLayoutRenderer:If,default:fL,defaultMeasureLayout:Rn,paintLayoutData:qn},Symbol.toStringTag,{value:"Module"}));export{j as $,ln as A,Fc as B,Ux as C,M0 as D,Ks as E,wL as F,SL as G,by as H,Xb as I,b0 as J,bL as K,ox as L,LT as M,vT as N,Wi as O,xL as P,tm as Q,Wc as R,ul as S,ua as T,fo as U,Yx as V,Zi as W,Te as X,H as Y,Ix as Z,f as _,fm as a,wh as a$,lm as a0,Hc as a1,Jg as a2,Bn as a3,gh as a4,Lt as a5,$e as a6,Qi as a7,rx as a8,on as a9,$u as aA,fx as aB,cx as aC,mx as aD,Ou as aE,gx as aF,_x as aG,Tx as aH,Sx as aI,vx as aJ,Bx as aK,dx as aL,Pu as aM,Cx as aN,yx as aO,px as aP,Du as aQ,of as aR,ju as aS,Bc as aT,CL as aU,_e as aV,ex as aW,ny as aX,kL as aY,Ln as aZ,Fn as a_,ct as aa,EL as ab,ML as ac,If as ad,Pt as ae,vf as af,dt as ag,AL as ah,Us as ai,Ff as aj,ia as ak,vn as al,rf as am,ik as an,se as ao,ft as ap,vu as aq,tn as ar,Eu as as,Ll as at,Ii as au,wx as av,kx as aw,bx as ax,xx as ay,ux as az,gm as b,df as b0,oa as b1,uf as b2,w2 as b3,gf as b4,nw as b5,Gw as b6,d2 as b7,k2 as b8,lw as b9,aa as bA,Cf as bB,ca as bC,xf as bD,GS as bE,jw as bF,or as bG,Mi as bH,Or as bI,us as bJ,$a as bK,gT as bL,W1 as bM,GL as bN,mr as ba,li as bb,Ue as bc,Ih as bd,Oe as be,ze as bf,iw as bg,vh as bh,Ys as bi,je as bj,g2 as bk,ue as bl,Mh as bm,Mn as bn,sT as bo,na as bp,js as bq,eT as br,Bf as bs,Me as bt,f2 as bu,Dn as bv,hf as bw,aT as bx,rT as by,US as bz,$t as c,zc as d,Kt as e,Ye as f,ym as g,Zg as h,pe as i,Ft as j,Ki as k,q as l,Uu as m,mm as n,Cm as o,dm as p,TL as q,Je as r,pm as s,iy as t,UL as u,YL as v,Vx as w,ae as x,jt as y,bm as z};