@lancc/cmark 1.1.0 → 1.2.1

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 (139) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE +21 -21
  3. package/README.md +54 -82
  4. package/assets/abnfDiagram-WEYOIA3C-CKV_7Upb.js +1 -0
  5. package/assets/architectureDiagram-ZHVYKT53-BvLudDvk.js +1 -0
  6. package/assets/blockDiagram-RJAE7QA3--gzkMGi2.js +1 -0
  7. package/assets/c4Diagram-XDPPPE54-ByfRiJGR.js +1 -0
  8. package/assets/chunk-2E7WHVMD-TfbC_dmh.js +1 -0
  9. package/assets/chunk-2Q5K7J3B-0YJgChVo.js +1 -0
  10. package/assets/chunk-4EMNKR2T-DHoYW7g5.js +1 -0
  11. package/assets/chunk-55XCU76K-Cq25Yw_G.js +1 -0
  12. package/assets/chunk-5VM5RSS4-CJaRXFHK.js +1 -0
  13. package/assets/chunk-JWPE2WC7-BP2iXBhe.js +1 -0
  14. package/assets/chunk-VQ5W62QI-B95zur4F.js +1 -0
  15. package/assets/chunk-XXDRQBXY-Ct0MhvQo.js +1 -0
  16. package/assets/chunk-ZCHMQSOR-C5VhW-wL.js +2 -0
  17. package/assets/classDiagram-v2-4MYWR3UA-C1G-Vkj0.js +1 -0
  18. package/assets/cose-bilkent-JH36ORCC-qIQoIBv0.js +1 -0
  19. package/assets/cynefin-EF2NZ3EQ-CR1E3YiZ.js +1 -0
  20. package/assets/cynefinDiagram-WF24UDRP-DaJFvZ3b.js +1 -0
  21. package/assets/cytoscape.esm-SjxgSg6I.js +9 -0
  22. package/assets/dagre-NK4GIZVX-BFRQhpii.js +1 -0
  23. package/assets/diagram-CBK3MWTC-DlueL6XZ.js +1 -0
  24. package/assets/diagram-I5XIIV2D-bITyafYX.js +1 -0
  25. package/assets/diagram-ODIL2UCW-Dlb4hg_-.js +1 -0
  26. package/assets/diagram-PFBEJUXE-CRfen0O7.js +1 -0
  27. package/assets/diagram-RJA3I4VV-CK-FlhGV.js +1 -0
  28. package/assets/diagram-TYUNFSNR-DmgVsxqa.js +1 -0
  29. package/assets/ebnfDiagram-V4P3TTPT-B9KGI9eQ.js +1 -0
  30. package/assets/echarts-CytsvCdp.js +25 -0
  31. package/assets/elk-QONTBCTQ-VgDftvsU.js +1 -0
  32. package/assets/erDiagram-KYQIGQAA-DkpP7sS4.js +1 -0
  33. package/assets/flowDiagram-IUGLLWBU-CRXa9Kxy.js +1 -0
  34. package/assets/ganttDiagram-R7GPNTJY-Cu2I55Wb.js +1 -0
  35. package/assets/gitGraphDiagram-PDYL7XHY-CwSo663I.js +1 -0
  36. package/assets/graph-Dz7AM1Q5.js +1 -0
  37. package/assets/index-BJ-NdQc4.js +100 -0
  38. package/assets/index-eB_q_VA3.css +1 -0
  39. package/assets/infoDiagram-MVDRKAX5-D3Qknzuo.js +1 -0
  40. package/assets/ishikawaDiagram-HPEHV2GE-9qYT75tk.js +1 -0
  41. package/assets/journeyDiagram-BOSHW7O7-DeSrJg9o.js +1 -0
  42. package/assets/kanban-definition-FNSA4HC5-DINkB6G7.js +1 -0
  43. package/assets/katex-DN8cTsI3.js +1 -0
  44. package/assets/markdown-S2mWvoE-.js +5 -0
  45. package/assets/mermaid-T_6Ze_cT.js +7 -0
  46. package/assets/mindmap-definition-6OY57UG3-DW5hqiAe.js +1 -0
  47. package/assets/pegDiagram-ECIUJNBX-BWy_tkzy.js +1 -0
  48. package/assets/pieDiagram-GNMPY74T-CniJbr6l.js +1 -0
  49. package/assets/quadrantDiagram-D57K4MC3-BVnDJkCv.js +1 -0
  50. package/assets/railroadDiagram-Y72NRBL7-BNKZpJJb.js +1 -0
  51. package/assets/requirementDiagram-EQYSW5RA-BETipHj0.js +1 -0
  52. package/assets/sankeyDiagram-SY24JHO5-ByEYqT7T.js +1 -0
  53. package/assets/sequenceDiagram-BLEHNHQU-BqCJ2tKG.js +1 -0
  54. package/assets/sizeCapture-INFHLROL-DlhrWFj-.js +1 -0
  55. package/assets/stateDiagram-v2-A6IESKWZ-DJUBWLTP.js +1 -0
  56. package/assets/swimlanes-B3ENRKFQ-D7k7tF5U.js +1 -0
  57. package/assets/swimlanesDiagram-AYQRV4AK-DoQBgB9o.js +1 -0
  58. package/assets/timeline-definition-JXYKGLGB-BCNhwnn6.js +1 -0
  59. package/assets/usecaseDiagram-WPOLBNNX-DRa_Rgl3.js +1 -0
  60. package/assets/vennDiagram-Q3Y3IDCW-Ba2eaO68.js +1 -0
  61. package/assets/wardleyDiagram-IVAIDKWA-W_i9vzY-.js +1 -0
  62. package/assets/xychartDiagram-4URNHDU4-ByfaGjvc.js +1 -0
  63. package/export-file/github-markdown.css +549 -549
  64. package/export-file/index.html +32 -32
  65. package/index.html +4 -4
  66. package/logo.png +0 -0
  67. package/package.json +1 -1
  68. package/plugin.json +8 -218
  69. package/preload/branch-bar.js +44 -2
  70. package/preload/export-css.js +59 -0
  71. package/preload/git-panel.js +102 -23
  72. package/preload/git-service.js +99 -6
  73. package/preload/host.js +130 -0
  74. package/preload/remote-setup.js +425 -0
  75. package/preload/remote-wizard.js +330 -0
  76. package/preload/rename-note.js +4 -5
  77. package/preload/services.js +6 -15
  78. package/preload/settings-panel.js +468 -356
  79. package/preload/ws-prefs.js +55 -0
  80. package/preload.js +291 -6
  81. package/assets/abnfDiagram-WEYOIA3C-BgXsTF7a.js +0 -1
  82. package/assets/architectureDiagram-ZHVYKT53-BsCWa_qC.js +0 -36
  83. package/assets/blockDiagram-RJAE7QA3-wbIxEiYN.js +0 -140
  84. package/assets/c4Diagram-XDPPPE54-5zdyxFvA.js +0 -38
  85. package/assets/chunk-2E7WHVMD-F85Lca-i.js +0 -88
  86. package/assets/chunk-2Q5K7J3B-CjpAZ0OI.js +0 -1
  87. package/assets/chunk-4EMNKR2T-C8Kbh83c.js +0 -1
  88. package/assets/chunk-55XCU76K-BINcFiLN.js +0 -1
  89. package/assets/chunk-5VM5RSS4-Diy5h2LS.js +0 -15
  90. package/assets/chunk-JWPE2WC7-BXnjDdh1.js +0 -1
  91. package/assets/chunk-VQ5W62QI-BM7ZZo1I.js +0 -1
  92. package/assets/chunk-XXDRQBXY-CW8CjB1w.js +0 -1
  93. package/assets/chunk-ZCHMQSOR-C7ATz1L1.js +0 -2
  94. package/assets/classDiagram-v2-4MYWR3UA-CMoqNk-b.js +0 -217
  95. package/assets/cose-bilkent-JH36ORCC-6rqR5iJk.js +0 -1
  96. package/assets/cynefin-EF2NZ3EQ-DypLIJxl.js +0 -141
  97. package/assets/cynefinDiagram-WF24UDRP-8b2CEBlR.js +0 -62
  98. package/assets/cytoscape.esm-CjX6Hyah.js +0 -331
  99. package/assets/dagre-NK4GIZVX-Dv6vuUbR.js +0 -4
  100. package/assets/diagram-CBK3MWTC-DJgMDeYd.js +0 -24
  101. package/assets/diagram-I5XIIV2D-BB9cMoRW.js +0 -24
  102. package/assets/diagram-ODIL2UCW-BVcRtsdy.js +0 -30
  103. package/assets/diagram-PFBEJUXE-BbGSOtJx.js +0 -3
  104. package/assets/diagram-RJA3I4VV-CzkY_8Fo.js +0 -41
  105. package/assets/diagram-TYUNFSNR-YTl5QdfL.js +0 -200
  106. package/assets/ebnfDiagram-V4P3TTPT-COVjPAjE.js +0 -1
  107. package/assets/echarts-BAPDkhe3.js +0 -61
  108. package/assets/elk-QONTBCTQ-DHsjY8Z_.js +0 -27
  109. package/assets/erDiagram-KYQIGQAA-CUAbTUl1.js +0 -99
  110. package/assets/flowDiagram-IUGLLWBU-CWsiqTQC.js +0 -213
  111. package/assets/ganttDiagram-R7GPNTJY-DetBW0Wm.js +0 -292
  112. package/assets/gitGraphDiagram-PDYL7XHY-ByrdgJmw.js +0 -106
  113. package/assets/graph-D8UmR1vK.js +0 -1
  114. package/assets/index-BLONSItV.css +0 -1
  115. package/assets/index-Cz6qaZbV.js +0 -744
  116. package/assets/infoDiagram-MVDRKAX5-BM48fjhU.js +0 -2
  117. package/assets/ishikawaDiagram-HPEHV2GE-DtHYywHZ.js +0 -70
  118. package/assets/journeyDiagram-BOSHW7O7-DJ1LiRh3.js +0 -139
  119. package/assets/kanban-definition-FNSA4HC5-DPPt8pwJ.js +0 -89
  120. package/assets/katex-CQL9J12G.js +0 -257
  121. package/assets/markdown-DVehI1Sg.js +0 -314
  122. package/assets/mermaid-C_q9pug0.js +0 -312
  123. package/assets/mindmap-definition-6OY57UG3-zbqYOEY6.js +0 -98
  124. package/assets/pegDiagram-ECIUJNBX-e7QG7TMq.js +0 -1
  125. package/assets/pieDiagram-GNMPY74T-Duf6YP0N.js +0 -39
  126. package/assets/quadrantDiagram-D57K4MC3-B2eYoUUy.js +0 -7
  127. package/assets/railroadDiagram-Y72NRBL7-BWCzPcI_.js +0 -1
  128. package/assets/requirementDiagram-EQYSW5RA-HhPMEqB1.js +0 -84
  129. package/assets/sankeyDiagram-SY24JHO5-CMUTwFBB.js +0 -40
  130. package/assets/sequenceDiagram-BLEHNHQU-C9wR2ll7.js +0 -169
  131. package/assets/sizeCapture-INFHLROL-DXfz37S6.js +0 -1
  132. package/assets/stateDiagram-v2-A6IESKWZ-D_gtonhE.js +0 -291
  133. package/assets/swimlanes-B3ENRKFQ-DdJOuuMV.js +0 -1
  134. package/assets/swimlanesDiagram-AYQRV4AK-BWt3HxHV.js +0 -8
  135. package/assets/timeline-definition-JXYKGLGB-DQsdwJe-.js +0 -120
  136. package/assets/usecaseDiagram-WPOLBNNX-DTRyFq7d.js +0 -370
  137. package/assets/vennDiagram-Q3Y3IDCW-dihYszm0.js +0 -34
  138. package/assets/wardleyDiagram-IVAIDKWA-BoPpgYfK.js +0 -78
  139. package/assets/xychartDiagram-4URNHDU4-DoLjYxeB.js +0 -7
@@ -1,312 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./elk-QONTBCTQ-DHsjY8Z_.js","./chunk-4EMNKR2T-C8Kbh83c.js","./chunk-ZCHMQSOR-C7ATz1L1.js","./graph-D8UmR1vK.js","./markdown-DVehI1Sg.js","./dagre-NK4GIZVX-Dv6vuUbR.js","./swimlanes-B3ENRKFQ-DdJOuuMV.js","./cose-bilkent-JH36ORCC-6rqR5iJk.js","./cytoscape.esm-CjX6Hyah.js","./c4Diagram-XDPPPE54-5zdyxFvA.js","./chunk-55XCU76K-BINcFiLN.js","./flowDiagram-IUGLLWBU-CWsiqTQC.js","./chunk-5VM5RSS4-Diy5h2LS.js","./chunk-XXDRQBXY-CW8CjB1w.js","./chunk-VQ5W62QI-BM7ZZo1I.js","./diagram-TYUNFSNR-YTl5QdfL.js","./swimlanesDiagram-AYQRV4AK-BWt3HxHV.js","./erDiagram-KYQIGQAA-CUAbTUl1.js","./gitGraphDiagram-PDYL7XHY-ByrdgJmw.js","./chunk-2Q5K7J3B-CjpAZ0OI.js","./chunk-JWPE2WC7-BXnjDdh1.js","./cynefin-EF2NZ3EQ-DypLIJxl.js","./ganttDiagram-R7GPNTJY-DetBW0Wm.js","./infoDiagram-MVDRKAX5-BM48fjhU.js","./pieDiagram-GNMPY74T-Duf6YP0N.js","./quadrantDiagram-D57K4MC3-B2eYoUUy.js","./xychartDiagram-4URNHDU4-DoLjYxeB.js","./requirementDiagram-EQYSW5RA-HhPMEqB1.js","./sequenceDiagram-BLEHNHQU-C9wR2ll7.js","./classDiagram-v2-4MYWR3UA-CMoqNk-b.js","./stateDiagram-v2-A6IESKWZ-D_gtonhE.js","./journeyDiagram-BOSHW7O7-DJ1LiRh3.js","./timeline-definition-JXYKGLGB-DQsdwJe-.js","./mindmap-definition-6OY57UG3-zbqYOEY6.js","./kanban-definition-FNSA4HC5-DPPt8pwJ.js","./sankeyDiagram-SY24JHO5-CMUTwFBB.js","./diagram-I5XIIV2D-BB9cMoRW.js","./diagram-RJA3I4VV-CzkY_8Fo.js","./blockDiagram-RJAE7QA3-wbIxEiYN.js","./diagram-ODIL2UCW-BVcRtsdy.js","./architectureDiagram-ZHVYKT53-BsCWa_qC.js","./diagram-PFBEJUXE-BbGSOtJx.js","./ishikawaDiagram-HPEHV2GE-DtHYywHZ.js","./vennDiagram-Q3Y3IDCW-dihYszm0.js","./diagram-CBK3MWTC-DJgMDeYd.js","./usecaseDiagram-WPOLBNNX-DTRyFq7d.js","./wardleyDiagram-IVAIDKWA-BoPpgYfK.js","./cynefinDiagram-WF24UDRP-8b2CEBlR.js","./railroadDiagram-Y72NRBL7-BWCzPcI_.js","./chunk-2E7WHVMD-F85Lca-i.js","./ebnfDiagram-V4P3TTPT-COVjPAjE.js","./abnfDiagram-WEYOIA3C-BgXsTF7a.js","./pegDiagram-ECIUJNBX-e7QG7TMq.js"])))=>i.map(i=>d[i]);
2
- import{p as ri}from"./markdown-DVehI1Sg.js";var GM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Ny="modulepreload",Wy=function(e,t){return new URL(e,t).href},Ch={},Mt=function(t,r,i){let s=Promise.resolve();if(r&&r.length>0){let a=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const n=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),c=h?.nonce||h?.getAttribute("nonce");s=a(r.map(l=>{if(l=Wy(l,i),l in Ch)return;Ch[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(!!i)for(let y=n.length-1;y>=0;y--){const x=n[y];if(x.href===l&&(!u||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=u?"stylesheet":Ny,u||(m.as="script"),m.crossOrigin="",m.href=l,c&&m.setAttribute("nonce",c),document.head.appendChild(m),u)return new Promise((y,x)=>{m.addEventListener("load",y),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(a){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=a,window.dispatchEvent(n),!n.defaultPrevented)throw a}return s.then(a=>{for(const n of a||[])n.status==="rejected"&&o(n.reason);return t().catch(o)})};var Xu=Object.defineProperty,g=(e,t)=>Xu(e,"name",{value:t,configurable:!0}),zy=(e,t)=>{for(var r in t)Xu(e,r,{get:t[r],enumerable:!0})},$s={exports:{}},Hy=$s.exports,bh;function Yy(){return bh||(bh=1,(function(e,t){(function(r,i){e.exports=i()})(Hy,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",h="hour",c="day",l="week",u="month",d="quarter",f="year",m="date",y="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(L){var E=["th","st","nd","rd"],_=L%100;return"["+L+(E[(_-20)%10]||E[_]||E[0])+"]"}},k=function(L,E,_){var R=String(L);return!R||R.length>=E?L:""+Array(E+1-R.length).join(_)+L},T={s:k,z:function(L){var E=-L.utcOffset(),_=Math.abs(E),R=Math.floor(_/60),I=_%60;return(E<=0?"+":"-")+k(R,2,"0")+":"+k(I,2,"0")},m:function L(E,_){if(E.date()<_.date())return-L(_,E);var R=12*(_.year()-E.year())+(_.month()-E.month()),I=E.clone().add(R,u),Q=_-I<0,j=E.clone().add(R+(Q?-1:1),u);return+(-(R+(_-I)/(Q?I-j:j-I))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:f,w:l,d:c,D:m,h,m:n,s:a,ms:o,Q:d}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},v="en",B={};B[v]=b;var F="$isDayjsObject",M=function(L){return L instanceof q||!(!L||!L[F])},W=function L(E,_,R){var I;if(!E)return v;if(typeof E=="string"){var Q=E.toLowerCase();B[Q]&&(I=Q),_&&(B[Q]=_,I=Q);var j=E.split("-");if(!I&&j.length>1)return L(j[0])}else{var pt=E.name;B[pt]=E,I=pt}return!R&&I&&(v=I),I||!R&&v},P=function(L,E){if(M(L))return L.clone();var _=typeof E=="object"?E:{};return _.date=L,_.args=arguments,new q(_)},$=T;$.l=W,$.i=M,$.w=function(L,E){return P(L,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var q=(function(){function L(_){this.$L=W(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[F]=!0}var E=L.prototype;return E.parse=function(_){this.$d=(function(R){var I=R.date,Q=R.utc;if(I===null)return new Date(NaN);if($.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var j=I.match(x);if(j){var pt=j[2]-1||0,yt=(j[7]||"0").substring(0,3);return Q?new Date(Date.UTC(j[1],pt,j[3]||1,j[4]||0,j[5]||0,j[6]||0,yt)):new Date(j[1],pt,j[3]||1,j[4]||0,j[5]||0,j[6]||0,yt)}}return new Date(I)})(_),this.init()},E.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},E.$utils=function(){return $},E.isValid=function(){return this.$d.toString()!==y},E.isSame=function(_,R){var I=P(_);return this.startOf(R)<=I&&I<=this.endOf(R)},E.isAfter=function(_,R){return P(_)<this.startOf(R)},E.isBefore=function(_,R){return this.endOf(R)<P(_)},E.$g=function(_,R,I){return $.u(_)?this[R]:this.set(I,_)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(_,R){var I=this,Q=!!$.u(R)||R,j=$.p(_),pt=function(G,ct){var gt=$.w(I.$u?Date.UTC(I.$y,ct,G):new Date(I.$y,ct,G),I);return Q?gt:gt.endOf(c)},yt=function(G,ct){return $.w(I.toDate()[G].apply(I.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(ct)),I)},bt=this.$W,wt=this.$M,ft=this.$D,lt="set"+(this.$u?"UTC":"");switch(j){case f:return Q?pt(1,0):pt(31,11);case u:return Q?pt(1,wt):pt(0,wt+1);case l:var Ct=this.$locale().weekStart||0,_t=(bt<Ct?bt+7:bt)-Ct;return pt(Q?ft-_t:ft+(6-_t),wt);case c:case m:return yt(lt+"Hours",0);case h:return yt(lt+"Minutes",1);case n:return yt(lt+"Seconds",2);case a:return yt(lt+"Milliseconds",3);default:return this.clone()}},E.endOf=function(_){return this.startOf(_,!1)},E.$set=function(_,R){var I,Q=$.p(_),j="set"+(this.$u?"UTC":""),pt=(I={},I[c]=j+"Date",I[m]=j+"Date",I[u]=j+"Month",I[f]=j+"FullYear",I[h]=j+"Hours",I[n]=j+"Minutes",I[a]=j+"Seconds",I[o]=j+"Milliseconds",I)[Q],yt=Q===c?this.$D+(R-this.$W):R;if(Q===u||Q===f){var bt=this.clone().set(m,1);bt.$d[pt](yt),bt.init(),this.$d=bt.set(m,Math.min(this.$D,bt.daysInMonth())).$d}else pt&&this.$d[pt](yt);return this.init(),this},E.set=function(_,R){return this.clone().$set(_,R)},E.get=function(_){return this[$.p(_)]()},E.add=function(_,R){var I,Q=this;_=Number(_);var j=$.p(R),pt=function(wt){var ft=P(Q);return $.w(ft.date(ft.date()+Math.round(wt*_)),Q)};if(j===u)return this.set(u,this.$M+_);if(j===f)return this.set(f,this.$y+_);if(j===c)return pt(1);if(j===l)return pt(7);var yt=(I={},I[n]=i,I[h]=s,I[a]=r,I)[j]||1,bt=this.$d.getTime()+_*yt;return $.w(bt,this)},E.subtract=function(_,R){return this.add(-1*_,R)},E.format=function(_){var R=this,I=this.$locale();if(!this.isValid())return I.invalidDate||y;var Q=_||"YYYY-MM-DDTHH:mm:ssZ",j=$.z(this),pt=this.$H,yt=this.$m,bt=this.$M,wt=I.weekdays,ft=I.months,lt=I.meridiem,Ct=function(ct,gt,J,Pt){return ct&&(ct[gt]||ct(R,Q))||J[gt].slice(0,Pt)},_t=function(ct){return $.s(pt%12||12,ct,"0")},G=lt||function(ct,gt,J){var Pt=ct<12?"AM":"PM";return J?Pt.toLowerCase():Pt};return Q.replace(C,(function(ct,gt){return gt||(function(J){switch(J){case"YY":return String(R.$y).slice(-2);case"YYYY":return $.s(R.$y,4,"0");case"M":return bt+1;case"MM":return $.s(bt+1,2,"0");case"MMM":return Ct(I.monthsShort,bt,ft,3);case"MMMM":return Ct(ft,bt);case"D":return R.$D;case"DD":return $.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Ct(I.weekdaysMin,R.$W,wt,2);case"ddd":return Ct(I.weekdaysShort,R.$W,wt,3);case"dddd":return wt[R.$W];case"H":return String(pt);case"HH":return $.s(pt,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return G(pt,yt,!0);case"A":return G(pt,yt,!1);case"m":return String(yt);case"mm":return $.s(yt,2,"0");case"s":return String(R.$s);case"ss":return $.s(R.$s,2,"0");case"SSS":return $.s(R.$ms,3,"0");case"Z":return j}return null})(ct)||j.replace(":","")}))},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(_,R,I){var Q,j=this,pt=$.p(R),yt=P(_),bt=(yt.utcOffset()-this.utcOffset())*i,wt=this-yt,ft=function(){return $.m(j,yt)};switch(pt){case f:Q=ft()/12;break;case u:Q=ft();break;case d:Q=ft()/3;break;case l:Q=(wt-bt)/6048e5;break;case c:Q=(wt-bt)/864e5;break;case h:Q=wt/s;break;case n:Q=wt/i;break;case a:Q=wt/r;break;default:Q=wt}return I?Q:$.a(Q)},E.daysInMonth=function(){return this.endOf(u).$D},E.$locale=function(){return B[this.$L]},E.locale=function(_,R){if(!_)return this.$L;var I=this.clone(),Q=W(_,R,!0);return Q&&(I.$L=Q),I},E.clone=function(){return $.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()},L})(),A=q.prototype;return P.prototype=A,[["$ms",o],["$s",a],["$m",n],["$H",h],["$W",c],["$M",u],["$y",f],["$D",m]].forEach((function(L){A[L[1]]=function(E){return this.$g(E,L[0],L[1])}})),P.extend=function(L,E){return L.$i||(L(E,q,P),L.$i=!0),P},P.locale=W,P.isDayjs=M,P.unix=function(L){return P(1e3*L)},P.en=B[v],P.Ls=B,P.p={},P}))})($s)),$s.exports}var Uy=Yy();const jy=qy(Uy);var je={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Gn=g(function(e="fatal"){let t=je.fatal;typeof e=="string"?e.toLowerCase()in je&&(t=je[e]):typeof e=="number"&&(t=e),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},t<=je.fatal&&(V.fatal=console.error?console.error.bind(console,ye("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ye("FATAL"))),t<=je.error&&(V.error=console.error?console.error.bind(console,ye("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ye("ERROR"))),t<=je.warn&&(V.warn=console.warn?console.warn.bind(console,ye("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ye("WARN"))),t<=je.info&&(V.info=console.info?console.info.bind(console,ye("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ye("INFO"))),t<=je.debug&&(V.debug=console.debug?console.debug.bind(console,ye("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ye("DEBUG"))),t<=je.trace&&(V.trace=console.debug?console.debug.bind(console,ye("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ye("TRACE")))},"setLogLevel"),ye=g(e=>`%c${jy().format("ss.SSS")} : ${e} : `,"format");const Os={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,o=2*r-s;switch(i){case"r":return Os.hue2rgb(o,s,e+1/3)*255;case"g":return Os.hue2rgb(o,s,e)*255;case"b":return Os.hue2rgb(o,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),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,h=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return h*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Xy={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},Gy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},vt={channel:Os,lang:Xy,unit:Gy},hr={};for(let e=0;e<=255;e++)hr[e]=vt.unit.dec2hex(e);const se={ALL:0,RGB:1,HSL:2};let Vy=class{constructor(){this.type=se.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=se.ALL}is(t){return this.type===t}};class Zy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Vy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=se.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=vt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=vt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=vt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=vt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=vt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=vt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(se.HSL)&&r!==void 0?r:(this._ensureHSL(),vt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(se.HSL)&&r!==void 0?r:(this._ensureHSL(),vt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(se.HSL)&&r!==void 0?r:(this._ensureHSL(),vt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(se.RGB)&&r!==void 0?r:(this._ensureRGB(),vt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(se.RGB)&&r!==void 0?r:(this._ensureRGB(),vt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(se.RGB)&&r!==void 0?r:(this._ensureRGB(),vt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(se.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(se.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(se.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(se.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(se.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(se.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Oo=new Zy({r:0,g:0,b:0,a:0},"transparent"),Qr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Qr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,h=a?8:4,c=o?0:-1,l=a?255:15;return Oo.set({r:(i>>h*(c+3)&l)*n,g:(i>>h*(c+2)&l)*n,b:(i>>h*(c+1)&l)*n,a:o?(i&l)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${hr[Math.round(t)]}${hr[Math.round(r)]}${hr[Math.round(i)]}${hr[Math.round(s*255)]}`:`#${hr[Math.round(t)]}${hr[Math.round(r)]}${hr[Math.round(i)]}`}},wr={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(wr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return vt.channel.clamp.h(parseFloat(r)*.9);case"rad":return vt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return vt.channel.clamp.h(parseFloat(r)*360)}}return vt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(wr.re);if(!r)return;const[,i,s,o,a,n]=r;return Oo.set({h:wr._hue2deg(i),s:vt.channel.clamp.s(parseFloat(s)),l:vt.channel.clamp.l(parseFloat(o)),a:a?vt.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${vt.lang.round(t)}, ${vt.lang.round(r)}%, ${vt.lang.round(i)}%, ${s})`:`hsl(${vt.lang.round(t)}, ${vt.lang.round(r)}%, ${vt.lang.round(i)}%)`}},Yi={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=Yi.colors[e];if(t)return Qr.parse(t)},stringify:e=>{const t=Qr.stringify(e);for(const r in Yi.colors)if(Yi.colors[r]===t)return r}},Di={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Di.re);if(!r)return;const[,i,s,o,a,n,h,c,l]=r;return Oo.set({r:vt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:vt.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:vt.channel.clamp.b(h?parseFloat(n)*2.55:parseFloat(n)),a:c?vt.channel.clamp.a(l?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${vt.lang.round(t)}, ${vt.lang.round(r)}, ${vt.lang.round(i)}, ${vt.lang.round(s)})`:`rgb(${vt.lang.round(t)}, ${vt.lang.round(r)}, ${vt.lang.round(i)})`}},Me={format:{keyword:Yi,hex:Qr,rgb:Di,rgba:Di,hsl:wr,hsla:wr},parse:e=>{if(typeof e!="string")return e;const t=Qr.parse(e)||Di.parse(e)||wr.parse(e)||Yi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(se.HSL)||e.data.r===void 0?wr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Di.stringify(e):Qr.stringify(e)},Gu=(e,t)=>{const r=Me.parse(e);for(const i in t)r[i]=vt.channel.clamp[i](t[i]);return Me.stringify(r)},ur=(e,t,r=0,i=1)=>{if(typeof e!="number")return Gu(e,{a:t});const s=Oo.set({r:vt.channel.clamp.r(e),g:vt.channel.clamp.g(t),b:vt.channel.clamp.b(r),a:vt.channel.clamp.a(i)});return Me.stringify(s)},ZM=(e,t)=>vt.lang.round(Me.parse(e)[t]),Ky=e=>{const{r:t,g:r,b:i}=Me.parse(e),s=.2126*vt.channel.toLinear(t)+.7152*vt.channel.toLinear(r)+.0722*vt.channel.toLinear(i);return vt.lang.round(s)},Qy=e=>Ky(e)>=.5,de=e=>!Qy(e),Vn=(e,t,r)=>{const i=Me.parse(e),s=i[t],o=vt.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Me.stringify(i)},z=(e,t)=>Vn(e,"l",t),H=(e,t)=>Vn(e,"l",-t),KM=(e,t)=>Vn(e,"a",-t),w=(e,t)=>{const r=Me.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Gu(e,i)},Jy=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Me.parse(e),{r:n,g:h,b:c,a:l}=Me.parse(t),u=r/100,d=u*2-1,f=a-l,y=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,x=1-y,C=i*y+n*x,b=s*y+h*x,k=o*y+c*x,T=a*u+l*(1-u);return ur(C,b,k,T)},O=(e,t=100)=>{const r=Me.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Jy(r,e,t)};var Ui=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Gs=/\s/,t0=g(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const o=e.indexOf(`
3
- `,s);if(o===-1)break;let a=s;for(;a>r&&Gs.test(e[a-1]);)a--;t+=e.slice(r,a)+`
4
- `,r=o+1,i=r}return t+e.slice(r)},"stripAnyComments"),Ds=g(e=>e===`
5
- `||e==="\r","isLineBreak"),e0=g((e,t)=>{let r=-1;for(let i=t;i<e.length&&Gs.test(e[i]);i++)Ds(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),Vu=g(e=>{let t=0;for(;t<e.length&&Gs.test(e[t])&&!Ds(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let l=t+3;l<e.length&&Gs.test(e[l]);l++)Ds(e[l])&&i.push(l);if(i.length===0)return;const s=`${r}---`,o=g(l=>Ds(e[l])&&e.startsWith(s,l+1)?e0(e,l+1+s.length):-1,"closingEnd"),a=i[0]+1;let n=-1;for(let l=a;l<e.length;l++)o(l)!==-1&&(n=l);if(n===-1)return;let h=i[0];for(const l of i)l<n&&(h=l);const c=h+1;for(let l=c;l<=n;l++){const u=o(l);if(u!==-1)return{indent:r,body:e.slice(c,l),length:u+1}}},"matchFrontMatter"),Zu=class extends Error{static{g(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},vr={},Do=g(function(e,t){const r=Vu(e);e=t0((r?e.slice(r.length):e).replace(Ui,""));for(const[i,{detector:s}]of Object.entries(vr))if(s(e,t))return i;throw new Zu(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),sn=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ku(t,r,i)},"registerLazyLoadedDiagrams"),Ku=g((e,t,r)=>{vr[e]&&V.warn(`Detector with key ${e} already exists. Overwriting.`),vr[e]={detector:t,loader:r},V.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),r0=g(e=>vr[e].loader,"getDiagramLoader"),on=g((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>on(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(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=on(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Ut=on,Ne="#ffffff",We="#f2f2f2",Bt=g((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),kh=g(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Ae=g((e,t)=>kh(e)&&kh(t)?{...e,...t}:t,"applyOverride"),i0=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=H(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=H(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||O(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])}),Object.hasOwn(e,"nodeBorder")&&!Object.hasOwn(e,"useGradient")&&(this.useGradient=!1)}},s0=g(e=>{const t=new i0;return t.calculate(e),t},"getThemeVariables"),o0=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(O("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=H("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=H(this.sectionBkgColor,10),this.taskBorderColor=ur(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ur(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=z(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=z(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=z(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=O(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=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||O(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??z(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||z("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||z("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||z("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||z("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||z(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||z(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},a0=g(e=>{const t=new o0;return t.calculate(e),t},"getThemeVariables"),n0=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Bt(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=ur(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=H(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||H(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||w(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||O(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||O(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||H(O(this.git0),25),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},l0=g(e=>{const t=new n0;return t.calculate(e),t},"getThemeVariables"),h0=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=z("#cde498",10),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.primaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=H(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||H(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||H(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=H(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||H(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||w(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(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??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||O(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},c0=g(e=>{const t=new h0;return t.calculate(e),t},"getThemeVariables"),u0=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.lineColor=O(this.background),this.textColor=O(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||O(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||z(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||H(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||w(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||w(this.mainBkg,{l:-(8+e*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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=H(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=H(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];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 e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},d0=g(e=>{const t=new u0;return t.calculate(e),t},"getThemeVariables"),f0=class{static{g(this,"Theme")}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=Bt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||(de(this.background)?z(this.background,4):H(this.background,4));const e="#ECECFE",t="#E9E9F1",r=w(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||z(e,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||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||w(e,{h:30}),this.cScale4=this.cScale4||w(e,{h:60}),this.cScale5=this.cScale5||w(e,{h:90}),this.cScale6=this.cScale6||w(e,{h:120}),this.cScale7=this.cScale7||w(e,{h:150}),this.cScale8=this.cScale8||w(e,{h:210,l:150}),this.cScale9=this.cScale9||w(e,{h:270}),this.cScale10=this.cScale10||w(e,{h:300}),this.cScale11=this.cScale11||w(e,{h:330}),this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=H(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=H(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||O(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||H(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||w(e,{h:64}),this.fillType3=this.fillType3||w(t,{h:64}),this.fillType4=this.fillType4||w(e,{h:-64}),this.fillType5=this.fillType5||w(t,{h:-64}),this.fillType6=this.fillType6||w(e,{h:128}),this.fillType7=this.fillType7||w(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||w(e,{l:-10}),this.pie5=this.pie5||w(t,{l:-10}),this.pie6=this.pie6||w(r,{l:-10}),this.pie7=this.pie7||w(e,{h:60,l:-10}),this.pie8=this.pie8||w(e,{h:-60,l:-10}),this.pie9=this.pie9||w(e,{h:120,l:0}),this.pie10=this.pie10||w(e,{h:60,l:-20}),this.pie11=this.pie11||w(e,{h:-60,l:-20}),this.pie12=this.pie12||w(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||w(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||w(e,{h:-30}),this.git4=this.git4||w(e,{h:-60}),this.git5=this.git5||w(e,{h:-90}),this.git6=this.git6||w(e,{h:60}),this.git7=this.git7||w(e,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},g0=g(e=>{const t=new f0;return t.calculate(e),t},"getThemeVariables"),p0=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(O("#323D47"),10),this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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.secondBkg=this.secondBkg==="calculated"?z(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=H(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=H(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||O(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},m0=g(e=>{const t=new p0;return t.calculate(e),t},"getThemeVariables"),y0=class{static{g(this,"Theme")}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=Bt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||(de(this.background)?z(this.background,4):H(this.background,4));const e="#ECECFE",t="#E9E9F1",r=w(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||z(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=this.mainBkg;if(this.darkMode)for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=H(this["cScale"+s],75);else for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScale"+s]=H(this["cScale"+s],25);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||O(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||H(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||w(e,{h:64}),this.fillType3=this.fillType3||w(t,{h:64}),this.fillType4=this.fillType4||w(e,{h:-64}),this.fillType5=this.fillType5||w(t,{h:-64}),this.fillType6=this.fillType6||w(e,{h:128}),this.fillType7=this.fillType7||w(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||w(e,{l:-10}),this.pie5=this.pie5||w(t,{l:-10}),this.pie6=this.pie6||w(r,{l:-10}),this.pie7=this.pie7||w(e,{h:60,l:-10}),this.pie8=this.pie8||w(e,{h:-60,l:-10}),this.pie9=this.pie9||w(e,{h:120,l:0}),this.pie10=this.pie10||w(e,{h:60,l:-20}),this.pie11=this.pie11||w(e,{h:-60,l:-20}),this.pie12=this.pie12||w(e,{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||e,this.quadrant2Fill=this.quadrant2Fill||w(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||w(e,{h:-30}),this.git4=this.git4||w(e,{h:-60}),this.git5=this.git5||w(e,{h:-90}),this.git6=this.git6||w(e,{h:60}),this.git7=this.git7||w(e,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},x0=g(e=>{const t=new y0;return t.calculate(e),t},"getThemeVariables"),C0=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(O("#323D47"),10),this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor=O(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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.secondBkg=this.secondBkg==="calculated"?z(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=H(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=H(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||O(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(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||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},b0=g(e=>{const t=new C0;return t.calculate(e),t},"getThemeVariables"),k0=class{static{g(this,"Theme")}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=Bt("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||(de(this.background)?z(this.background,4):H(this.background,4));const e="#ECECFE",t="#E9E9F1",r=w(e,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||z(e,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleInv"+s]=this["cScaleInv"+s]||O(this["cScale"+s]);for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this.darkMode?this["cScalePeer"+s]=this["cScalePeer"+s]||z(this["cScale"+s],10):this["cScalePeer"+s]=this["cScalePeer"+s]||H(this["cScale"+s],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["cScaleLabel"+s]=this["cScaleLabel"+s]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let s=0;s<5;s++)this["surface"+s]=this["surface"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(5+s*3)}),this["surfacePeer"+s]=this["surfacePeer"+s]||w(this.mainBkg,{h:180,s:-15,l:i*(8+s*3)});this.classText=this.classText||this.textColor;for(let s=0;s<8;s++)this["fillType"+s]=this["fillType"+s]||this.bkgColorArray[s];for(let s=0;s<this.THEME_COLOR_LIMIT;s++)this["pie"+(s+1)]=this["pie"+(s+1)]||this["cScale"+s];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 s=0;s<8;s++)this["venn"+(s+1)]=this["venn"+(s+1)]??this.borderColorArray[s%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||w(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||w(e,{h:-30}),this.git4=this.git4||w(e,{h:-60}),this.git5=this.git5||w(e,{h:-90}),this.git6=this.git6||w(e,{h:60}),this.git7=this.git7||w(e,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},w0=g(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),S0=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.background),this.secondaryBorderColor=Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Bt(this.tertiaryColor,this.darkMode),this.primaryTextColor=O(this.primaryColor),this.secondaryTextColor=O(this.secondaryColor),this.tertiaryTextColor=O(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(O("#323D47"),10),this.border1="#ccc",this.border2=ur(255,255,255,.25),this.arrowheadColor=O(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Bt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Bt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Bt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Bt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||O(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||O(this.tertiaryColor),this.lineColor=this.lineColor||O(this.background),this.arrowheadColor=this.arrowheadColor||O(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.secondBkg=this.secondBkg==="calculated"?z(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||H(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||O(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||O(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=H(this["cScale"+r],75);const e=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:e*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:e*(8+r*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((r,i)=>{this["fillType"+i]=this["fillType"+i]||r});for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["pie"+(r+1)]=this["pie"+(r+1)]||this["cScale"+r];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let r=0;r<8;r++)this["venn"+(r+1)]=this["venn"+(r+1)]??this.borderColorArray[r%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||de(this.quadrant1Fill)?z(this.quadrant1Fill):H(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?H(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)),this.gitInv0=this.gitInv0||O(this.git0),this.gitInv1=this.gitInv1||O(this.git1),this.gitInv2=this.gitInv2||O(this.git2),this.gitInv3=this.gitInv3||O(this.git3),this.gitInv4=this.gitInv4||O(this.git4),this.gitInv5=this.gitInv5||O(this.git5),this.gitInv6=this.gitInv6||O(this.git6),this.gitInv7=this.gitInv7||O(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||Ne,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||We}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=Ae(this[r],e[r])})}},T0=g(e=>{const t=new S0;return t.calculate(e),t},"getThemeVariables"),tr={base:{getThemeVariables:s0},dark:{getThemeVariables:a0},default:{getThemeVariables:l0},forest:{getThemeVariables:c0},neutral:{getThemeVariables:d0},neo:{getThemeVariables:g0},"neo-dark":{getThemeVariables:m0},redux:{getThemeVariables:x0},"redux-dark":{getThemeVariables:b0},"redux-color":{getThemeVariables:w0},"redux-dark-color":{getThemeVariables:T0}},zt={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",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,colorBy:"branch",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,bitOrder:"ascending",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},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",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},Qu={...zt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:tr.default.getThemeVariables(),sequence:{...zt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:zt.class?.theme,look:zt.class?.look,layout:zt.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...zt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...zt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...zt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...zt.pie,useWidth:984},xyChart:{...zt.xyChart,useWidth:void 0},requirement:{...zt.requirement,useWidth:void 0},packet:{...zt.packet},eventmodeling:{...zt.eventmodeling},treeView:{...zt.treeView,useWidth:void 0},radar:{...zt.radar},usecase:{...zt.usecase},railroad:{...zt.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:{...zt.ishikawa},sankey:{...zt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...zt.venn},cynefin:{...zt.cynefin}},Ju=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ju(e[i],"")]:[...r,t+i],[]),"keyify"),B0=new Set(Ju(Qu,"")),Zn=Qu,v0={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},_0=g(e=>v0[e]??e,"getDiagramConfigKey"),L0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},F0=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(V.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Vs=g(e=>{if(V.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Vs(t));return}for(const t of Object.keys(e)){if(V.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!B0.has(t)||e[t]==null){V.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=L0[t];i?F0(e[t],i):(V.debug("sanitizing object",t),Vs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(V.debug("sanitizing css option",t),e[t]=td(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}V.debug("After sanitization",e)}},"sanitizeDirective"),td=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),dr=Object.freeze(Zn),M0=["theme","look","layout"],A0=new Set(["classic","handDrawn","neo"]),E0=g((e,t)=>e==="theme"?t==="null"||Object.hasOwn(tr,t):e!=="look"||A0.has(t),"isUsableAppearance"),$0=g((e,t,r)=>e?[e[t]?.[r],e[r]].find(s=>s!==void 0&&E0(r,s)):void 0,"readAppearance"),ze=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),he=Ut({},dr),Zs,Ks={},er=[],ji=Ut({},dr),Xi,O0=g((e,t)=>{if(!Xi)return;const r=[t,...[...er].reverse(),Ks,dr],i=e[Xi];for(const s of M0)for(const o of r){const a=$0(o,Xi,s);if(a!==void 0){e[s]=a,i?.[s]!==void 0&&(i[s]=a);break}}},"resolveAppearance"),ci=g((e,t)=>{let r=Ut({},e),i={};for(const o of t)id(o),i=Ut(i,o);if(r=Ut(r,i),O0(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(tr,r.theme)){const o=Ut({},Zs),a=Ut(o.themeVariables||{},i.themeVariables);r.themeVariables=tr[r.theme].getThemeVariables(a)}return ji=r,N0(ji),ji},"updateCurrentConfig"),Kn=g(e=>{Xi=e===void 0?void 0:_0(e),ci(he,er)},"setDiagramConfigScope"),D0=g(e=>(he=Ut({},dr),he=Ut(he,e),Ks=Ut({},e),e.theme&&Object.hasOwn(tr,e.theme)&&(he.themeVariables=tr[e.theme].getThemeVariables(e.themeVariables)),ci(he,er),he),"setSiteConfig"),I0=g(e=>{Zs=Ut({},e)},"saveConfigFromInitialize"),P0=g(e=>(he=Ut(he,e),Ks=Ut(Ks,e),ci(he,er),he),"updateSiteConfig"),ed=g(()=>Ut({},he),"getSiteConfig"),rd=g(e=>(ci(ji,[e]),Nt()),"setConfig"),Nt=g(()=>Ut({},ji),"getConfig"),id=g(e=>{e&&(["secure",...he.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(V.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"&&id(e[t])}))},"sanitize"),R0=g(e=>{Vs(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),er.push(e),ci(he,er)},"addDirective"),Qs=g((e=he)=>{er=[],Xi=void 0,ci(e,er)},"reset"),q0={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."},wh={},sd=g(e=>{wh[e]||(V.warn(q0[e]),wh[e]=!0)},"issueWarning"),N0=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&sd("LAZY_LOAD_DEPRECATED")},"checkConfig"),QM=g(()=>{let e={};Zs&&(e=Ut(e,Zs));for(const t of er)e=Ut(e,t);return e},"getUserDefinedConfig"),Qt=g(e=>(e.flowchart?.htmlLabels!=null&&sd("FLOWCHART_HTML_LABELS_DEPRECATED"),ze(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),as=/<\/?br\s*\/?>/gi,W0=new RegExp(as.source,"i"),z0=g(e=>e?nd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),H0=(()=>{let e=!1;return()=>{e||(od(),e=!0)}})();function od(){const e="data-temp-href-target";ri.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ri.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(od,"setupDompurifyHooks");var ad=g(e=>(H0(),ri.sanitize(e)),"removeScript"),Sh=g((e,t)=>{if(Qt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=ad(e):r!=="loose"&&(e=nd(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=X0(e))}return e},"sanitizeMore"),be=g((e,t)=>e&&(t.dompurifyConfig?e=ri.sanitize(Sh(e,t),t.dompurifyConfig).toString():e=ri.sanitize(Sh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Y0=g((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),U0=g(e=>W0.test(e),"hasBreaks"),j0=g(e=>e.split(as),"splitBreaks"),X0=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),nd=g(e=>e.replace(as,"#br#"),"breakToPlaceholder"),G0=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),V0=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Z0=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Th=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];K0(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Q0(s))}return r.join("")},"parseGenericTypes"),an=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),K0=g((e,t)=>{const r=an(e,"~"),i=an(t,"~");return r===1&&i===1},"shouldCombineSets"),Q0=g(e=>{const t=an(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("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Bh=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),nn=/\$\$(.*?)\$\$/g,Ji=g(e=>(e.match(nn)?.length??0)>0,"hasKatex"),JM=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await ld(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),J0=g(async(e,t)=>{if(!Ji(e))return e;if(!(Bh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(nn,"MathML is unsupported in this environment.");{const{default:r}=await Mt(async()=>{const{default:s}=await import("./katex-CQL9J12G.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!Bh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(as).map(s=>Ji(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(nn,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),ld=g(async(e,t)=>be(await J0(e,t),t),"renderKatexSanitized"),ns={getRows:z0,sanitizeText:be,sanitizeTextOrArray:Y0,hasBreaks:U0,splitBreaks:j0,lineBreakRegex:as,removeScript:ad,getUrl:G0,evaluate:ze,getMax:V0,getMin:Z0},tx=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),ex=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),hd=g(function(e,t,r,i){const s=ex(t,r,i);tx(e,s)},"configureSvgSize"),rx=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;V.info(`SVG bounds: ${o}x${a}`,s);let n=0,h=0;V.info(`Graph bounds: ${n}x${h}`,e),n=o+r*2,h=a+r*2,V.info(`Calculated bounds: ${n}x${h}`),hd(t,h,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Is={};function ln(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
- `)}g(ln,"cssStyleSheetToString");var ix=g((e,t,r,i)=>{let s="";return e in Is&&Is[e]?s=Is[e]({...r,svgId:i}):V.warn(`No theme found for ${e}`),`& {
7
- font-family: ${r.fontFamily};
8
- font-size: ${r.fontSize};
9
- fill: ${r.textColor}
10
- }
11
- @keyframes edge-animation-frame {
12
- from {
13
- stroke-dashoffset: 0;
14
- }
15
- }
16
- @keyframes dash {
17
- to {
18
- stroke-dashoffset: 0;
19
- }
20
- }
21
- & .edge-animation-slow {
22
- stroke-dasharray: 9,5 !important;
23
- stroke-dashoffset: 900;
24
- animation: dash 50s linear infinite;
25
- stroke-linecap: round;
26
- }
27
- & .edge-animation-fast {
28
- stroke-dasharray: 9,5 !important;
29
- stroke-dashoffset: 900;
30
- animation: dash 20s linear infinite;
31
- stroke-linecap: round;
32
- }
33
- /* Classes common for multiple diagrams */
34
-
35
- & .error-icon {
36
- fill: ${r.errorBkgColor};
37
- }
38
- & .error-text {
39
- fill: ${r.errorTextColor};
40
- stroke: ${r.errorTextColor};
41
- }
42
-
43
- & .edge-thickness-normal {
44
- stroke-width: ${r.strokeWidth??1}px;
45
- }
46
- & .edge-thickness-thick {
47
- stroke-width: 3.5px
48
- }
49
- & .edge-pattern-solid {
50
- stroke-dasharray: 0;
51
- }
52
- & .edge-thickness-invisible {
53
- stroke-width: 0;
54
- fill: none;
55
- }
56
- & .edge-pattern-dashed{
57
- stroke-dasharray: 3;
58
- }
59
- .edge-pattern-dotted {
60
- stroke-dasharray: 2;
61
- }
62
-
63
- & .marker {
64
- fill: ${r.lineColor};
65
- stroke: ${r.lineColor};
66
- }
67
- & .marker.cross {
68
- stroke: ${r.lineColor};
69
- }
70
-
71
- & svg {
72
- font-family: ${r.fontFamily};
73
- font-size: ${r.fontSize};
74
- }
75
- & p {
76
- margin: 0
77
- }
78
-
79
- ${s}
80
- .node .neo-node {
81
- stroke: ${r.nodeBorder};
82
- }
83
-
84
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
- }
88
- [data-look="neo"].swimlane.cluster rect {
89
- filter: none;
90
- }
91
-
92
-
93
- [data-look="neo"].node path {
94
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
- stroke-width: ${r.strokeWidth??1}px;
96
- }
97
-
98
- [data-look="neo"].node .outer-path {
99
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
- }
101
-
102
- [data-look="neo"].node .neo-line path {
103
- stroke: ${r.nodeBorder};
104
- filter: none;
105
- }
106
-
107
- [data-look="neo"].node circle{
108
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
110
- }
111
-
112
- [data-look="neo"].node circle .state-start{
113
- fill: #000000;
114
- }
115
-
116
- [data-look="neo"].icon-shape .icon {
117
- fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
- }
120
-
121
- [data-look="neo"].icon-shape .icon-neo path {
122
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
- }
125
-
126
- ${t}
127
- `},"getStyles"),sx=g((e,t)=>{t!==void 0&&(Is[e]=t)},"addStylesForDiagram"),ox=ix,cd={};zy(cd,{clear:()=>ax,getAccDescription:()=>cx,getAccTitle:()=>lx,getDiagramTitle:()=>dx,setAccDescription:()=>hx,setAccTitle:()=>nx,setDiagramTitle:()=>ux});var Qn="",Jn="",tl="",el=g(e=>be(e,Nt()),"sanitizeText"),ax=g(()=>{Qn="",tl="",Jn=""},"clear"),nx=g(e=>{Qn=el(e).replace(/^\s+/g,"")},"setAccTitle"),lx=g(()=>Qn,"getAccTitle"),hx=g(e=>{tl=el(e).replace(/\n\s+/g,`
128
- `)},"setAccDescription"),cx=g(()=>tl,"getAccDescription"),ux=g(e=>{Jn=el(e)},"setDiagramTitle"),dx=g(()=>Jn,"getDiagramTitle"),vh=V,fx=Gn,Ft=Nt,t5=rd,e5=dr,rl=g(e=>be(e,Ft()),"sanitizeText"),gx=rx,px=g(()=>cd,"getCommonDb"),Js={},to=g((e,t,r)=>{Js[e]&&vh.warn(`Diagram with id ${e} already registered. Overwriting.`),Js[e]=t,r&&Ku(e,r),sx(e,t.styles),t.injectUtils?.(vh,fx,Ft,rl,gx,px(),()=>{})},"registerDiagram"),hn=g(e=>{if(e in Js)return Js[e];throw new mx(e)},"getDiagram"),mx=class extends Error{static{g(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};function Ps(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yx(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function il(e){let t,r,i;e.length!==2?(t=Ps,r=(n,h)=>Ps(e(n),h),i=(n,h)=>e(n)-h):(t=e===Ps||e===yx?e:xx,r=e,i=e);function s(n,h,c=0,l=n.length){if(c<l){if(t(h,h)!==0)return l;do{const u=c+l>>>1;r(n[u],h)<0?c=u+1:l=u}while(c<l)}return c}function o(n,h,c=0,l=n.length){if(c<l){if(t(h,h)!==0)return l;do{const u=c+l>>>1;r(n[u],h)<=0?c=u+1:l=u}while(c<l)}return c}function a(n,h,c=0,l=n.length){const u=s(n,h,c,l-1);return u>c&&i(n[u-1],h)>-i(n[u],h)?u-1:u}return{left:s,center:a,right:o}}function xx(){return 0}function Cx(e){return e===null?NaN:+e}const bx=il(Ps),kx=bx.right;il(Cx).center;class _h extends Map{constructor(t,r=Tx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,s]of t)this.set(i,s)}get(t){return super.get(Lh(this,t))}has(t){return super.has(Lh(this,t))}set(t,r){return super.set(wx(this,t),r)}delete(t){return super.delete(Sx(this,t))}}function Lh({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function wx({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Sx({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function Tx(e){return e!==null&&typeof e=="object"?e.valueOf():e}const Bx=Math.sqrt(50),vx=Math.sqrt(10),_x=Math.sqrt(2);function eo(e,t,r){const i=(t-e)/Math.max(0,r),s=Math.floor(Math.log10(i)),o=i/Math.pow(10,s),a=o>=Bx?10:o>=vx?5:o>=_x?2:1;let n,h,c;return s<0?(c=Math.pow(10,-s)/a,n=Math.round(e*c),h=Math.round(t*c),n/c<e&&++n,h/c>t&&--h,c=-c):(c=Math.pow(10,s)*a,n=Math.round(e/c),h=Math.round(t/c),n*c<e&&++n,h*c>t&&--h),h<n&&.5<=r&&r<2?eo(e,t,r*2):[n,h,c]}function Lx(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[s,o,a]=i?eo(t,e,r):eo(e,t,r);if(!(o>=s))return[];const n=o-s+1,h=new Array(n);if(i)if(a<0)for(let c=0;c<n;++c)h[c]=(o-c)/-a;else for(let c=0;c<n;++c)h[c]=(o-c)*a;else if(a<0)for(let c=0;c<n;++c)h[c]=(s+c)/-a;else for(let c=0;c<n;++c)h[c]=(s+c)*a;return h}function cn(e,t,r){return t=+t,e=+e,r=+r,eo(e,t,r)[2]}function un(e,t,r){t=+t,e=+e,r=+r;const i=t<e,s=i?cn(t,e,r):cn(e,t,r);return(i?-1:1)*(s<0?1/-s:s)}function r5(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}return r}function i5(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}return r}function Fx(e,t,r){e=+e,t=+t,r=(s=arguments.length)<2?(t=e,e=0,1):s<3?1:+r;for(var i=-1,s=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(s);++i<s;)o[i]=e+i*r;return o}function Mx(e){return e}var Rs=1,ia=2,dn=3,ys=4,Fh=1e-6;function Ax(e){return"translate("+e+",0)"}function Ex(e){return"translate(0,"+e+")"}function $x(e){return t=>+e(t)}function Ox(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function Dx(){return!this.__axis}function ud(e,t){var r=[],i=null,s=null,o=6,a=6,n=3,h=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Rs||e===ys?-1:1,l=e===ys||e===ia?"x":"y",u=e===Rs||e===dn?Ax:Ex;function d(f){var m=i??(t.ticks?t.ticks.apply(t,r):t.domain()),y=s??(t.tickFormat?t.tickFormat.apply(t,r):Mx),x=Math.max(o,0)+n,C=t.range(),b=+C[0]+h,k=+C[C.length-1]+h,T=(t.bandwidth?Ox:$x)(t.copy(),h),v=f.selection?f.selection():f,B=v.selectAll(".domain").data([null]),F=v.selectAll(".tick").data(m,t).order(),M=F.exit(),W=F.enter().append("g").attr("class","tick"),P=F.select("line"),$=F.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),F=F.merge(W),P=P.merge(W.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),$=$.merge(W.append("text").attr("fill","currentColor").attr(l,c*x).attr("dy",e===Rs?"0em":e===dn?"0.71em":"0.32em")),f!==v&&(B=B.transition(f),F=F.transition(f),P=P.transition(f),$=$.transition(f),M=M.transition(f).attr("opacity",Fh).attr("transform",function(q){return isFinite(q=T(q))?u(q+h):this.getAttribute("transform")}),W.attr("opacity",Fh).attr("transform",function(q){var A=this.parentNode.__axis;return u((A&&isFinite(A=A(q))?A:T(q))+h)})),M.remove(),B.attr("d",e===ys||e===ia?a?"M"+c*a+","+b+"H"+h+"V"+k+"H"+c*a:"M"+h+","+b+"V"+k:a?"M"+b+","+c*a+"V"+h+"H"+k+"V"+c*a:"M"+b+","+h+"H"+k),F.attr("opacity",1).attr("transform",function(q){return u(T(q)+h)}),P.attr(l+"2",c*o),$.attr(l,c*x).text(y),v.filter(Dx).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ia?"start":e===ys?"end":"middle"),v.each(function(){this.__axis=T})}return d.scale=function(f){return arguments.length?(t=f,d):t},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(f){return arguments.length?(r=f==null?[]:Array.from(f),d):r.slice()},d.tickValues=function(f){return arguments.length?(i=f==null?null:Array.from(f),d):i&&i.slice()},d.tickFormat=function(f){return arguments.length?(s=f,d):s},d.tickSize=function(f){return arguments.length?(o=a=+f,d):o},d.tickSizeInner=function(f){return arguments.length?(o=+f,d):o},d.tickSizeOuter=function(f){return arguments.length?(a=+f,d):a},d.tickPadding=function(f){return arguments.length?(n=+f,d):n},d.offset=function(f){return arguments.length?(h=+f,d):h},d}function s5(e){return ud(Rs,e)}function o5(e){return ud(dn,e)}var Ix={value:()=>{}};function dd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new qs(r)}function qs(e){this._=e}function Px(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}qs.prototype=dd.prototype={constructor:qs,on:function(e,t){var r=this._,i=Px(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=Rx(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=Mh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Mh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new qs(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function Rx(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Mh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=Ix,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var fn="http://www.w3.org/1999/xhtml";const Ah={svg:"http://www.w3.org/2000/svg",xhtml:fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Io(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Ah.hasOwnProperty(t)?{space:Ah[t],local:e}:e}function qx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===fn&&t.documentElement.namespaceURI===fn?t.createElement(e):t.createElementNS(r,e)}}function Nx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fd(e){var t=Io(e);return(t.local?Nx:qx)(t)}function Wx(){}function sl(e){return e==null?Wx:function(){return this.querySelector(e)}}function zx(e){typeof e!="function"&&(e=sl(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),h,c,l=0;l<a;++l)(h=o[l])&&(c=e.call(h,h.__data__,l,o))&&("__data__"in h&&(c.__data__=h.__data__),n[l]=c);return new ge(i,this._parents)}function Hx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Yx(){return[]}function gd(e){return e==null?Yx:function(){return this.querySelectorAll(e)}}function Ux(e){return function(){return Hx(e.apply(this,arguments))}}function jx(e){typeof e=="function"?e=Ux(e):e=gd(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,h,c=0;c<n;++c)(h=a[c])&&(i.push(e.call(h,h.__data__,c,a)),s.push(h));return new ge(i,s)}function pd(e){return function(){return this.matches(e)}}function md(e){return function(t){return t.matches(e)}}var Xx=Array.prototype.find;function Gx(e){return function(){return Xx.call(this.children,e)}}function Vx(){return this.firstElementChild}function Zx(e){return this.select(e==null?Vx:Gx(typeof e=="function"?e:md(e)))}var Kx=Array.prototype.filter;function Qx(){return Array.from(this.children)}function Jx(e){return function(){return Kx.call(this.children,e)}}function tC(e){return this.selectAll(e==null?Qx:Jx(typeof e=="function"?e:md(e)))}function eC(e){typeof e!="function"&&(e=pd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],h,c=0;c<a;++c)(h=o[c])&&e.call(h,h.__data__,c,o)&&n.push(h);return new ge(i,this._parents)}function yd(e){return new Array(e.length)}function rC(){return new ge(this._enter||this._groups.map(yd),this._parents)}function ro(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ro.prototype={constructor:ro,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 iC(e){return function(){return e}}function sC(e,t,r,i,s,o){for(var a=0,n,h=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new ro(e,o[a]);for(;a<h;++a)(n=t[a])&&(s[a]=n)}function oC(e,t,r,i,s,o,a){var n,h,c=new Map,l=t.length,u=o.length,d=new Array(l),f;for(n=0;n<l;++n)(h=t[n])&&(d[n]=f=a.call(h,h.__data__,n,t)+"",c.has(f)?s[n]=h:c.set(f,h));for(n=0;n<u;++n)f=a.call(e,o[n],n,o)+"",(h=c.get(f))?(i[n]=h,h.__data__=o[n],c.delete(f)):r[n]=new ro(e,o[n]);for(n=0;n<l;++n)(h=t[n])&&c.get(d[n])===h&&(s[n]=h)}function aC(e){return e.__data__}function nC(e,t){if(!arguments.length)return Array.from(this,aC);var r=t?oC:sC,i=this._parents,s=this._groups;typeof e!="function"&&(e=iC(e));for(var o=s.length,a=new Array(o),n=new Array(o),h=new Array(o),c=0;c<o;++c){var l=i[c],u=s[c],d=u.length,f=lC(e.call(l,l&&l.__data__,c,i)),m=f.length,y=n[c]=new Array(m),x=a[c]=new Array(m),C=h[c]=new Array(d);r(l,u,y,x,C,f,t);for(var b=0,k=0,T,v;b<m;++b)if(T=y[b]){for(b>=k&&(k=b+1);!(v=x[k])&&++k<m;);T._next=v||null}}return a=new ge(a,i),a._enter=n,a._exit=h,a}function lC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hC(){return new ge(this._exit||this._groups.map(yd),this._parents)}function cC(e,t,r){var i=this.enter(),s=this,o=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?o.remove():r(o),i&&s?i.merge(s).order():s}function uC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),h=0;h<a;++h)for(var c=r[h],l=i[h],u=c.length,d=n[h]=new Array(u),f,m=0;m<u;++m)(f=c[m]||l[m])&&(d[m]=f);for(;h<s;++h)n[h]=r[h];return new ge(n,this._parents)}function dC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function fC(e){e||(e=gC);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),o=0;o<i;++o){for(var a=r[o],n=a.length,h=s[o]=new Array(n),c,l=0;l<n;++l)(c=a[l])&&(h[l]=c);h.sort(t)}return new ge(s,this._parents).order()}function gC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function pC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function mC(){return Array.from(this)}function yC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function xC(){let e=0;for(const t of this)++e;return e}function CC(){return!this.node()}function bC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function kC(e){return function(){this.removeAttribute(e)}}function wC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function SC(e,t){return function(){this.setAttribute(e,t)}}function TC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function BC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function vC(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 _C(e,t){var r=Io(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?wC:kC:typeof t=="function"?r.local?vC:BC:r.local?TC:SC)(r,t))}function xd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function LC(e){return function(){this.style.removeProperty(e)}}function FC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function MC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function AC(e,t,r){return arguments.length>1?this.each((t==null?LC:typeof t=="function"?MC:FC)(e,t,r??"")):ii(this.node(),e)}function ii(e,t){return e.style.getPropertyValue(t)||xd(e).getComputedStyle(e,null).getPropertyValue(t)}function EC(e){return function(){delete this[e]}}function $C(e,t){return function(){this[e]=t}}function OC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function DC(e,t){return arguments.length>1?this.each((t==null?EC:typeof t=="function"?OC:$C)(e,t)):this.node()[e]}function Cd(e){return e.trim().split(/^|\s+/)}function ol(e){return e.classList||new bd(e)}function bd(e){this._node=e,this._names=Cd(e.getAttribute("class")||"")}bd.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 kd(e,t){for(var r=ol(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function wd(e,t){for(var r=ol(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function IC(e){return function(){kd(this,e)}}function PC(e){return function(){wd(this,e)}}function RC(e,t){return function(){(t.apply(this,arguments)?kd:wd)(this,e)}}function qC(e,t){var r=Cd(e+"");if(arguments.length<2){for(var i=ol(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?RC:t?IC:PC)(r,t))}function NC(){this.textContent=""}function WC(e){return function(){this.textContent=e}}function zC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function HC(e){return arguments.length?this.each(e==null?NC:(typeof e=="function"?zC:WC)(e)):this.node().textContent}function YC(){this.innerHTML=""}function UC(e){return function(){this.innerHTML=e}}function jC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function XC(e){return arguments.length?this.each(e==null?YC:(typeof e=="function"?jC:UC)(e)):this.node().innerHTML}function GC(){this.nextSibling&&this.parentNode.appendChild(this)}function VC(){return this.each(GC)}function ZC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function KC(){return this.each(ZC)}function QC(e){var t=typeof e=="function"?e:fd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function JC(){return null}function tb(e,t){var r=typeof e=="function"?e:fd(e),i=t==null?JC:typeof t=="function"?t:sl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function eb(){var e=this.parentNode;e&&e.removeChild(this)}function rb(){return this.each(eb)}function ib(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ob(e){return this.select(e?sb:ib)}function ab(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nb(e){return function(t){e.call(this,t,this.__data__)}}function lb(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 hb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function cb(e,t,r){return function(){var i=this.__on,s,o=nb(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function ub(e,t,r){var i=lb(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var h=0,c=n.length,l;h<c;++h)for(s=0,l=n[h];s<o;++s)if((a=i[s]).type===l.type&&a.name===l.name)return l.value}return}for(n=t?cb:hb,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function Sd(e,t,r){var i=xd(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 db(e,t){return function(){return Sd(this,e,t)}}function fb(e,t){return function(){return Sd(this,e,t.apply(this,arguments))}}function gb(e,t){return this.each((typeof t=="function"?fb:db)(e,t))}function*pb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var Td=[null];function ge(e,t){this._groups=e,this._parents=t}function ls(){return new ge([[document.documentElement]],Td)}function mb(){return this}ge.prototype=ls.prototype={constructor:ge,select:zx,selectAll:jx,selectChild:Zx,selectChildren:tC,filter:eC,data:nC,enter:rC,exit:hC,join:cC,merge:uC,selection:mb,order:dC,sort:fC,call:pC,nodes:mC,node:yC,size:xC,empty:CC,each:bC,attr:_C,style:AC,property:DC,classed:qC,text:HC,html:XC,raise:VC,lower:KC,append:QC,insert:tb,remove:rb,clone:ob,datum:ab,on:ub,dispatch:gb,[Symbol.iterator]:pb};function Lt(e){return typeof e=="string"?new ge([[document.querySelector(e)]],[document.documentElement]):new ge([[e]],Td)}function hs(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Po(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function $r(){}var ts=.7,io=1/ts,Jr="\\s*([+-]?\\d+)\\s*",es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yb=/^#([0-9a-f]{3,8})$/,xb=new RegExp(`^rgb\\(${Jr},${Jr},${Jr}\\)$`),Cb=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),bb=new RegExp(`^rgba\\(${Jr},${Jr},${Jr},${es}\\)$`),kb=new RegExp(`^rgba\\(${Re},${Re},${Re},${es}\\)$`),wb=new RegExp(`^hsl\\(${es},${Re},${Re}\\)$`),Sb=new RegExp(`^hsla\\(${es},${Re},${Re},${es}\\)$`),Eh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hs($r,_r,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$h,formatHex:$h,formatHex8:Tb,formatHsl:Bb,formatRgb:Oh,toString:Oh});function $h(){return this.rgb().formatHex()}function Tb(){return this.rgb().formatHex8()}function Bb(){return vd(this).formatHsl()}function Oh(){return this.rgb().formatRgb()}function _r(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=yb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Dh(t):r===3?new ne(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?xs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=xb.exec(e))?new ne(t[1],t[2],t[3],1):(t=Cb.exec(e))?new ne(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bb.exec(e))?xs(t[1],t[2],t[3],t[4]):(t=kb.exec(e))?xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wb.exec(e))?Rh(t[1],t[2]/100,t[3]/100,1):(t=Sb.exec(e))?Rh(t[1],t[2]/100,t[3]/100,t[4]):Eh.hasOwnProperty(e)?Dh(Eh[e]):e==="transparent"?new ne(NaN,NaN,NaN,0):null}function Dh(e){return new ne(e>>16&255,e>>8&255,e&255,1)}function xs(e,t,r,i){return i<=0&&(e=t=r=NaN),new ne(e,t,r,i)}function Bd(e){return e instanceof $r||(e=_r(e)),e?(e=e.rgb(),new ne(e.r,e.g,e.b,e.opacity)):new ne}function gn(e,t,r,i){return arguments.length===1?Bd(e):new ne(e,t,r,i??1)}function ne(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}hs(ne,gn,Po($r,{brighter(e){return e=e==null?io:Math.pow(io,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ne(Tr(this.r),Tr(this.g),Tr(this.b),so(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ih,formatHex:Ih,formatHex8:vb,formatRgb:Ph,toString:Ph}));function Ih(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function vb(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ph(){const e=so(this.opacity);return`${e===1?"rgb(":"rgba("}${Tr(this.r)}, ${Tr(this.g)}, ${Tr(this.b)}${e===1?")":`, ${e})`}`}function so(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sr(e){return e=Tr(e),(e<16?"0":"")+e.toString(16)}function Rh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Le(e,t,r,i)}function vd(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof $r||(e=_r(e)),!e)return new Le;if(e instanceof Le)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,h=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=h<.5?o+s:2-o-s,a*=60):n=h>0&&h<1?0:a,new Le(a,n,h,e.opacity)}function _b(e,t,r,i){return arguments.length===1?vd(e):new Le(e,t,r,i??1)}function Le(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}hs(Le,_b,Po($r,{brighter(e){return e=e==null?io:Math.pow(io,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ts:Math.pow(ts,e),new Le(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new ne(sa(e>=240?e-240:e+120,s,i),sa(e,s,i),sa(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Le(qh(this.h),Cs(this.s),Cs(this.l),so(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=so(this.opacity);return`${e===1?"hsl(":"hsla("}${qh(this.h)}, ${Cs(this.s)*100}%, ${Cs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qh(e){return e=(e||0)%360,e<0?e+360:e}function Cs(e){return Math.max(0,Math.min(1,e||0))}function sa(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Lb=Math.PI/180,Fb=180/Math.PI,oo=18,_d=.96422,Ld=1,Fd=.82521,Md=4/29,ti=6/29,Ad=3*ti*ti,Mb=ti*ti*ti;function Ed(e){if(e instanceof qe)return new qe(e.l,e.a,e.b,e.opacity);if(e instanceof Ze)return $d(e);e instanceof ne||(e=Bd(e));var t=la(e.r),r=la(e.g),i=la(e.b),s=oa((.2225045*t+.7168786*r+.0606169*i)/Ld),o,a;return t===r&&r===i?o=a=s:(o=oa((.4360747*t+.3850649*r+.1430804*i)/_d),a=oa((.0139322*t+.0971045*r+.7141733*i)/Fd)),new qe(116*s-16,500*(o-s),200*(s-a),e.opacity)}function Ab(e,t,r,i){return arguments.length===1?Ed(e):new qe(e,t,r,i??1)}function qe(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}hs(qe,Ab,Po($r,{brighter(e){return new qe(this.l+oo*(e??1),this.a,this.b,this.opacity)},darker(e){return new qe(this.l-oo*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=_d*aa(t),e=Ld*aa(e),r=Fd*aa(r),new ne(na(3.1338561*t-1.6168667*e-.4906146*r),na(-.9787684*t+1.9161415*e+.033454*r),na(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function oa(e){return e>Mb?Math.pow(e,1/3):e/Ad+Md}function aa(e){return e>ti?e*e*e:Ad*(e-Md)}function na(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function la(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Eb(e){if(e instanceof Ze)return new Ze(e.h,e.c,e.l,e.opacity);if(e instanceof qe||(e=Ed(e)),e.a===0&&e.b===0)return new Ze(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Fb;return new Ze(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function pn(e,t,r,i){return arguments.length===1?Eb(e):new Ze(e,t,r,i??1)}function Ze(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function $d(e){if(isNaN(e.h))return new qe(e.l,0,0,e.opacity);var t=e.h*Lb;return new qe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}hs(Ze,pn,Po($r,{brighter(e){return new Ze(this.h,this.c,this.l+oo*(e??1),this.opacity)},darker(e){return new Ze(this.h,this.c,this.l-oo*(e??1),this.opacity)},rgb(){return $d(this).rgb()}}));const Ro=e=>()=>e;function Od(e,t){return function(r){return e+r*t}}function $b(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function Ob(e,t){var r=t-e;return r?Od(e,r>180||r<-180?r-360*Math.round(r/360):r):Ro(isNaN(e)?t:e)}function Db(e){return(e=+e)==1?Gi:function(t,r){return r-t?$b(t,r,e):Ro(isNaN(t)?r:t)}}function Gi(e,t){var r=t-e;return r?Od(e,r):Ro(isNaN(e)?t:e)}const ao=(function e(t){var r=Db(t);function i(s,o){var a=r((s=gn(s)).r,(o=gn(o)).r),n=r(s.g,o.g),h=r(s.b,o.b),c=Gi(s.opacity,o.opacity);return function(l){return s.r=a(l),s.g=n(l),s.b=h(l),s.opacity=c(l),s+""}}return i.gamma=e,i})(1);function Ib(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),s;return function(o){for(s=0;s<r;++s)i[s]=e[s]*(1-o)+t[s]*o;return i}}function Pb(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Rb(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,s=new Array(i),o=new Array(r),a;for(a=0;a<i;++a)s[a]=al(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(n){for(a=0;a<i;++a)o[a]=s[a](n);return o}}function qb(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function Be(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Nb(e,t){var r={},i={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?r[s]=al(e[s],t[s]):i[s]=t[s];return function(o){for(s in r)i[s]=r[s](o);return i}}var mn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ha=new RegExp(mn.source,"g");function Wb(e){return function(){return e}}function zb(e){return function(t){return e(t)+""}}function Dd(e,t){var r=mn.lastIndex=ha.lastIndex=0,i,s,o,a=-1,n=[],h=[];for(e=e+"",t=t+"";(i=mn.exec(e))&&(s=ha.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,h.push({i:a,x:Be(i,s)})),r=ha.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?h[0]?zb(h[0].x):Wb(t):(t=h.length,function(c){for(var l=0,u;l<t;++l)n[(u=h[l]).i]=u.x(c);return n.join("")})}function al(e,t){var r=typeof t,i;return t==null||r==="boolean"?Ro(t):(r==="number"?Be:r==="string"?(i=_r(t))?(t=i,ao):Dd:t instanceof _r?ao:t instanceof Date?qb:Pb(t)?Ib:Array.isArray(t)?Rb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Nb:Be)(e,t)}function Hb(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Nh=180/Math.PI,yn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Id(e,t,r,i,s,o){var a,n,h;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(h=e*r+t*i)&&(r-=e*h,i-=t*h),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,h/=n),e*i<t*r&&(e=-e,t=-t,h=-h,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Nh,skewX:Math.atan(h)*Nh,scaleX:a,scaleY:n}}var bs;function Yb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yn:Id(t.a,t.b,t.c,t.d,t.e,t.f)}function Ub(e){return e==null||(bs||(bs=document.createElementNS("http://www.w3.org/2000/svg","g")),bs.setAttribute("transform",e),!(e=bs.transform.baseVal.consolidate()))?yn:(e=e.matrix,Id(e.a,e.b,e.c,e.d,e.e,e.f))}function Pd(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,l,u,d,f,m){if(c!==u||l!==d){var y=f.push("translate(",null,t,null,r);m.push({i:y-4,x:Be(c,u)},{i:y-2,x:Be(l,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function a(c,l,u,d){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),d.push({i:u.push(s(u)+"rotate(",null,i)-2,x:Be(c,l)})):l&&u.push(s(u)+"rotate("+l+i)}function n(c,l,u,d){c!==l?d.push({i:u.push(s(u)+"skewX(",null,i)-2,x:Be(c,l)}):l&&u.push(s(u)+"skewX("+l+i)}function h(c,l,u,d,f,m){if(c!==u||l!==d){var y=f.push(s(f)+"scale(",null,",",null,")");m.push({i:y-4,x:Be(c,u)},{i:y-2,x:Be(l,d)})}else(u!==1||d!==1)&&f.push(s(f)+"scale("+u+","+d+")")}return function(c,l){var u=[],d=[];return c=e(c),l=e(l),o(c.translateX,c.translateY,l.translateX,l.translateY,u,d),a(c.rotate,l.rotate,u,d),n(c.skewX,l.skewX,u,d),h(c.scaleX,c.scaleY,l.scaleX,l.scaleY,u,d),c=l=null,function(f){for(var m=-1,y=d.length,x;++m<y;)u[(x=d[m]).i]=x.x(f);return u.join("")}}}var jb=Pd(Yb,"px, ","px)","deg)"),Xb=Pd(Ub,", ",")",")");function Gb(e){return function(t,r){var i=e((t=pn(t)).h,(r=pn(r)).h),s=Gi(t.c,r.c),o=Gi(t.l,r.l),a=Gi(t.opacity,r.opacity);return function(n){return t.h=i(n),t.c=s(n),t.l=o(n),t.opacity=a(n),t+""}}}const a5=Gb(Ob);var si=0,Ii=0,wi=0,Rd=1e3,no,Pi,lo=0,Lr=0,qo=0,rs=typeof performance=="object"&&performance.now?performance:Date,qd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function nl(){return Lr||(qd(Vb),Lr=rs.now()+qo)}function Vb(){Lr=0}function ho(){this._call=this._time=this._next=null}ho.prototype=Nd.prototype={constructor:ho,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?nl():+r)+(t==null?0:+t),!this._next&&Pi!==this&&(Pi?Pi._next=this:no=this,Pi=this),this._call=e,this._time=r,xn()},stop:function(){this._call&&(this._call=null,this._time=1/0,xn())}};function Nd(e,t,r){var i=new ho;return i.restart(e,t,r),i}function Zb(){nl(),++si;for(var e=no,t;e;)(t=Lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--si}function Wh(){Lr=(lo=rs.now())+qo,si=Ii=0;try{Zb()}finally{si=0,Qb(),Lr=0}}function Kb(){var e=rs.now(),t=e-lo;t>Rd&&(qo-=t,lo=e)}function Qb(){for(var e,t=no,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:no=r);Pi=e,xn(i)}function xn(e){if(!si){Ii&&(Ii=clearTimeout(Ii));var t=e-Lr;t>24?(e<1/0&&(Ii=setTimeout(Wh,e-rs.now()-qo)),wi&&(wi=clearInterval(wi))):(wi||(lo=rs.now(),wi=setInterval(Kb,Rd)),si=1,qd(Wh))}}function zh(e,t,r){var i=new ho;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Jb=dd("start","end","cancel","interrupt"),t1=[],Wd=0,Hh=1,Cn=2,Ns=3,Yh=4,bn=5,Ws=6;function No(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;e1(e,r,{name:t,index:i,group:s,on:Jb,tween:t1,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Wd})}function ll(e,t){var r=Ee(e,t);if(r.state>Wd)throw new Error("too late; already scheduled");return r}function He(e,t){var r=Ee(e,t);if(r.state>Ns)throw new Error("too late; already running");return r}function Ee(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function e1(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Nd(o,0,r.time);function o(c){r.state=Hh,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var l,u,d,f;if(r.state!==Hh)return h();for(l in i)if(f=i[l],f.name===r.name){if(f.state===Ns)return zh(a);f.state===Yh?(f.state=Ws,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[l]):+l<t&&(f.state=Ws,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[l])}if(zh(function(){r.state===Ns&&(r.state=Yh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=Cn,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Cn){for(r.state=Ns,s=new Array(d=r.tween.length),l=0,u=-1;l<d;++l)(f=r.tween[l].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=f);s.length=u+1}}function n(c){for(var l=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(h),r.state=bn,1),u=-1,d=s.length;++u<d;)s[u].call(e,l);r.state===bn&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=Ws,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function r1(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>Cn&&i.state<bn,i.state=Ws,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function i1(e){return this.each(function(){r1(this,e)})}function s1(e,t){var r,i;return function(){var s=He(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function o1(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=He(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},h=0,c=s.length;h<c;++h)if(s[h].name===t){s[h]=n;break}h===c&&s.push(n)}o.tween=s}}function a1(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ee(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?s1:o1)(r,e,t))}function hl(e,t,r){var i=e._id;return e.each(function(){var s=He(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Ee(s,i).value[t]}}function zd(e,t){var r;return(typeof t=="number"?Be:t instanceof _r?ao:(r=_r(t))?(t=r,ao):Dd)(e,t)}function n1(e){return function(){this.removeAttribute(e)}}function l1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function h1(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function c1(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function u1(e,t,r){var i,s,o;return function(){var a,n=r(this),h;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),h=n+"",a===h?null:a===i&&h===s?o:(s=h,o=t(i=a,n)))}}function d1(e,t,r){var i,s,o;return function(){var a,n=r(this),h;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),h=n+"",a===h?null:a===i&&h===s?o:(s=h,o=t(i=a,n)))}}function f1(e,t){var r=Io(e),i=r==="transform"?Xb:zd;return this.attrTween(e,typeof t=="function"?(r.local?d1:u1)(r,i,hl(this,"attr."+e,t)):t==null?(r.local?l1:n1)(r):(r.local?c1:h1)(r,i,t))}function g1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function p1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function m1(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&p1(e,o)),r}return s._value=t,s}function y1(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&g1(e,o)),r}return s._value=t,s}function x1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Io(e);return this.tween(r,(i.local?m1:y1)(i,t))}function C1(e,t){return function(){ll(this,e).delay=+t.apply(this,arguments)}}function b1(e,t){return t=+t,function(){ll(this,e).delay=t}}function k1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?C1:b1)(t,e)):Ee(this.node(),t).delay}function w1(e,t){return function(){He(this,e).duration=+t.apply(this,arguments)}}function S1(e,t){return t=+t,function(){He(this,e).duration=t}}function T1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?w1:S1)(t,e)):Ee(this.node(),t).duration}function B1(e,t){if(typeof t!="function")throw new Error;return function(){He(this,e).ease=t}}function v1(e){var t=this._id;return arguments.length?this.each(B1(t,e)):Ee(this.node(),t).ease}function _1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;He(this,e).ease=r}}function L1(e){if(typeof e!="function")throw new Error;return this.each(_1(this._id,e))}function F1(e){typeof e!="function"&&(e=pd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],h,c=0;c<a;++c)(h=o[c])&&e.call(h,h.__data__,c,o)&&n.push(h);return new rr(i,this._parents,this._name,this._id)}function M1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var h=t[n],c=r[n],l=h.length,u=a[n]=new Array(l),d,f=0;f<l;++f)(d=h[f]||c[f])&&(u[f]=d);for(;n<i;++n)a[n]=t[n];return new rr(a,this._parents,this._name,this._id)}function A1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function E1(e,t,r){var i,s,o=A1(t)?ll:He;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function $1(e,t){var r=this._id;return arguments.length<2?Ee(this.node(),r).on.on(e):this.each(E1(r,e,t))}function O1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function D1(){return this.on("end.remove",O1(this._id))}function I1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=sl(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],h=n.length,c=o[a]=new Array(h),l,u,d=0;d<h;++d)(l=n[d])&&(u=e.call(l,l.__data__,d,n))&&("__data__"in l&&(u.__data__=l.__data__),c[d]=u,No(c[d],t,r,d,c,Ee(l,r)));return new rr(o,this._parents,t,r)}function P1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=gd(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var h=i[n],c=h.length,l,u=0;u<c;++u)if(l=h[u]){for(var d=e.call(l,l.__data__,u,h),f,m=Ee(l,r),y=0,x=d.length;y<x;++y)(f=d[y])&&No(f,t,r,y,d,m);o.push(d),a.push(l)}return new rr(o,a,t,r)}var R1=ls.prototype.constructor;function q1(){return new R1(this._groups,this._parents)}function N1(e,t){var r,i,s;return function(){var o=ii(this,e),a=(this.style.removeProperty(e),ii(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function Hd(e){return function(){this.style.removeProperty(e)}}function W1(e,t,r){var i,s=r+"",o;return function(){var a=ii(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function z1(e,t,r){var i,s,o;return function(){var a=ii(this,e),n=r(this),h=n+"";return n==null&&(h=n=(this.style.removeProperty(e),ii(this,e))),a===h?null:a===i&&h===s?o:(s=h,o=t(i=a,n))}}function H1(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var h=He(this,e),c=h.on,l=h.value[o]==null?n||(n=Hd(t)):void 0;(c!==r||s!==l)&&(i=(r=c).copy()).on(a,s=l),h.on=i}}function Y1(e,t,r){var i=(e+="")=="transform"?jb:zd;return t==null?this.styleTween(e,N1(e,i)).on("end.style."+e,Hd(e)):typeof t=="function"?this.styleTween(e,z1(e,i,hl(this,"style."+e,t))).each(H1(this._id,e)):this.styleTween(e,W1(e,i,t),r).on("end.style."+e,null)}function U1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function j1(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&U1(e,a,r)),i}return o._value=t,o}function X1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,j1(e,t,r??""))}function G1(e){return function(){this.textContent=e}}function V1(e){return function(){var t=e(this);this.textContent=t??""}}function Z1(e){return this.tween("text",typeof e=="function"?V1(hl(this,"text",e)):G1(e==null?"":e+""))}function K1(e){return function(t){this.textContent=e.call(this,t)}}function Q1(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&K1(s)),t}return i._value=e,i}function J1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Q1(e))}function tk(){for(var e=this._name,t=this._id,r=Yd(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,h,c=0;c<n;++c)if(h=a[c]){var l=Ee(h,t);No(h,e,r,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new rr(i,this._parents,e,r)}function ek(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},h={value:function(){--s===0&&o()}};r.each(function(){var c=He(this,i),l=c.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(h)),c.on=t}),s===0&&o()})}var rk=0;function rr(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Yd(){return++rk}var Xe=ls.prototype;rr.prototype={constructor:rr,select:I1,selectAll:P1,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:F1,merge:M1,selection:q1,transition:tk,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:$1,attr:f1,attrTween:x1,style:Y1,styleTween:X1,text:Z1,textTween:J1,remove:D1,tween:a1,delay:k1,duration:T1,ease:v1,easeVarying:L1,end:ek,[Symbol.iterator]:Xe[Symbol.iterator]};function ik(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var sk={time:null,delay:0,duration:250,ease:ik};function ok(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function ak(e){var t,r;e instanceof rr?(t=e._id,e=e._name):(t=Yd(),(r=sk).time=nl(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,h,c=0;c<n;++c)(h=a[c])&&No(h,e,t,c,a,r||ok(h,t));return new rr(i,this._parents,e,t)}ls.prototype.interrupt=i1;ls.prototype.transition=ak;const kn=Math.PI,wn=2*kn,br=1e-6,nk=wn-br;function Ud(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function lk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ud;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class hk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ud:lk(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,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,h=i-t,c=s-r,l=a-t,u=n-r,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>br)if(!(Math.abs(u*h-c*l)>br)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-a,m=s-n,y=h*h+c*c,x=f*f+m*m,C=Math.sqrt(y),b=Math.sqrt(d),k=o*Math.tan((kn-Math.acos((y+d-x)/(2*C*b)))/2),T=k/b,v=k/C;Math.abs(T-1)>br&&this._append`L${t+T*l},${r+T*u}`,this._append`A${o},${o},0,0,${+(u*f>l*m)},${this._x1=t+v*h},${this._y1=r+v*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),h=i*Math.sin(s),c=t+n,l=r+h,u=1^a,d=a?s-o:o-s;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>br||Math.abs(this._y1-l)>br)&&this._append`L${c},${l}`,i&&(d<0&&(d=d%wn+wn),d>nk?this._append`A${i},${i},0,1,${u},${t-n},${r-h}A${i},${i},0,1,${u},${this._x1=c},${this._y1=l}`:d>br&&this._append`A${i},${i},0,${+(d>=kn)},${u},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}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 ck(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function co(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function oi(e){return e=co(Math.abs(e)),e?e[1]:NaN}function uk(e,t){return function(r,i){for(var s=r.length,o=[],a=0,n=e[0],h=0;s>0&&n>0&&(h+n+1>i&&(n=Math.max(1,i-h)),o.push(r.substring(s-=n,s+n)),!((h+=n+1)>i));)n=e[a=(a+1)%e.length];return o.reverse().join(t)}}function dk(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var fk=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uo(e){if(!(t=fk.exec(e)))throw new Error("invalid format: "+e);var t;return new cl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}uo.prototype=cl.prototype;function cl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}cl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gk(e){t:for(var t=e.length,r=1,i=-1,s;r<t;++r)switch(e[r]){case".":i=s=r;break;case"0":i===0&&(i=r),s=r;break;default:if(!+e[r])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(s+1):e}var fo;function pk(e,t){var r=co(e,t);if(!r)return fo=void 0,e.toPrecision(t);var i=r[0],s=r[1],o=s-(fo=Math.max(-8,Math.min(8,Math.floor(s/3)))*3)+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+co(e,Math.max(0,t+o-1))[0]}function Uh(e,t){var r=co(e,t);if(!r)return e+"";var i=r[0],s=r[1];return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}const jh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ck,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Uh(e*100,t),r:Uh,s:pk,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Xh(e){return e}var Gh=Array.prototype.map,Vh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mk(e){var t=e.grouping===void 0||e.thousands===void 0?Xh:uk(Gh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",s=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Xh:dk(Gh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",n=e.minus===void 0?"−":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function c(u,d){u=uo(u);var f=u.fill,m=u.align,y=u.sign,x=u.symbol,C=u.zero,b=u.width,k=u.comma,T=u.precision,v=u.trim,B=u.type;B==="n"?(k=!0,B="g"):jh[B]||(T===void 0&&(T=12),v=!0,B="g"),(C||f==="0"&&m==="=")&&(C=!0,f="0",m="=");var F=(d&&d.prefix!==void 0?d.prefix:"")+(x==="$"?r:x==="#"&&/[boxX]/.test(B)?"0"+B.toLowerCase():""),M=(x==="$"?i:/[%p]/.test(B)?a:"")+(d&&d.suffix!==void 0?d.suffix:""),W=jh[B],P=/[defgprs%]/.test(B);T=T===void 0?6:/[gprs]/.test(B)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function $(q){var A=F,L=M,E,_,R;if(B==="c")L=W(q)+L,q="";else{q=+q;var I=q<0||1/q<0;if(q=isNaN(q)?h:W(Math.abs(q),T),v&&(q=gk(q)),I&&+q==0&&y!=="+"&&(I=!1),A=(I?y==="("?y:n:y==="-"||y==="("?"":y)+A,L=(B==="s"&&!isNaN(q)&&fo!==void 0?Vh[8+fo/3]:"")+L+(I&&y==="("?")":""),P){for(E=-1,_=q.length;++E<_;)if(R=q.charCodeAt(E),48>R||R>57){L=(R===46?s+q.slice(E+1):q.slice(E))+L,q=q.slice(0,E);break}}}k&&!C&&(q=t(q,1/0));var Q=A.length+q.length+L.length,j=Q<b?new Array(b-Q+1).join(f):"";switch(k&&C&&(q=t(j+q,j.length?b-L.length:1/0),j=""),m){case"<":q=A+q+L+j;break;case"=":q=A+j+q+L;break;case"^":q=j.slice(0,Q=j.length>>1)+A+q+L+j.slice(Q);break;default:q=j+A+q+L;break}return o(q)}return $.toString=function(){return u+""},$}function l(u,d){var f=Math.max(-8,Math.min(8,Math.floor(oi(d)/3)))*3,m=Math.pow(10,-f),y=c((u=uo(u),u.type="f",u),{suffix:Vh[8+f/3]});return function(x){return y(m*x)}}return{format:c,formatPrefix:l}}var ks,jd,Xd;yk({thousands:",",grouping:[3],currency:["$",""]});function yk(e){return ks=mk(e),jd=ks.format,Xd=ks.formatPrefix,ks}function xk(e){return Math.max(0,-oi(Math.abs(e)))}function Ck(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(oi(t)/3)))*3-oi(Math.abs(e)))}function bk(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,oi(t)-oi(e))+1}function kk(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function wk(){return this.eachAfter(kk)}function Sk(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function Tk(e,t){for(var r=this,i=[r],s,o,a=-1;r=i.pop();)if(e.call(t,r,++a,this),s=r.children)for(o=s.length-1;o>=0;--o)i.push(s[o]);return this}function Bk(e,t){for(var r=this,i=[r],s=[],o,a,n,h=-1;r=i.pop();)if(s.push(r),o=r.children)for(a=0,n=o.length;a<n;++a)i.push(o[a]);for(;r=s.pop();)e.call(t,r,++h,this);return this}function vk(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function _k(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,s=i&&i.length;--s>=0;)r+=i[s].value;t.value=r})}function Lk(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Fk(e){for(var t=this,r=Mk(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var s=i.length;e!==r;)i.splice(s,0,e),e=e.parent;return i}function Mk(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),s=null;for(e=r.pop(),t=i.pop();e===t;)s=e,e=r.pop(),t=i.pop();return s}function Ak(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Ek(){return Array.from(this)}function $k(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Ok(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*Dk(){var e=this,t,r=[e],i,s,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(s=0,o=i.length;s<o;++s)r.push(i[s]);while(r.length)}function Gd(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Rk)):t===void 0&&(t=Pk);for(var r=new go(e),i,s=[r],o,a,n,h;i=s.pop();)if((a=t(i.data))&&(h=(a=Array.from(a)).length))for(i.children=a,n=h-1;n>=0;--n)s.push(o=a[n]=new go(a[n])),o.parent=i,o.depth=i.depth+1;return r.eachBefore(Nk)}function Ik(){return Gd(this).eachBefore(qk)}function Pk(e){return e.children}function Rk(e){return Array.isArray(e)?e[1]:null}function qk(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Nk(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function go(e){this.data=e,this.depth=this.height=0,this.parent=null}go.prototype=Gd.prototype={constructor:go,count:wk,each:Sk,eachAfter:Bk,eachBefore:Tk,find:vk,sum:_k,sort:Lk,path:Fk,ancestors:Ak,descendants:Ek,leaves:$k,links:Ok,copy:Ik,[Symbol.iterator]:Dk};function Wk(e){if(typeof e!="function")throw new Error;return e}function Si(){return 0}function Ti(e){return function(){return e}}function zk(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Hk(e,t,r,i,s){for(var o=e.children,a,n=-1,h=o.length,c=e.value&&(i-t)/e.value;++n<h;)a=o[n],a.y0=r,a.y1=s,a.x0=t,a.x1=t+=a.value*c}function Yk(e,t,r,i,s){for(var o=e.children,a,n=-1,h=o.length,c=e.value&&(s-r)/e.value;++n<h;)a=o[n],a.x0=t,a.x1=i,a.y0=r,a.y1=r+=a.value*c}var Uk=(1+Math.sqrt(5))/2;function jk(e,t,r,i,s,o){for(var a=[],n=t.children,h,c,l=0,u=0,d=n.length,f,m,y=t.value,x,C,b,k,T,v,B;l<d;){f=s-r,m=o-i;do x=n[u++].value;while(!x&&u<d);for(C=b=x,v=Math.max(m/f,f/m)/(y*e),B=x*x*v,T=Math.max(b/B,B/C);u<d;++u){if(x+=c=n[u].value,c<C&&(C=c),c>b&&(b=c),B=x*x*v,k=Math.max(b/B,B/C),k>T){x-=c;break}T=k}a.push(h={value:x,dice:f<m,children:n.slice(l,u)}),h.dice?Hk(h,r,i,s,y?i+=m*x/y:o):Yk(h,r,i,y?r+=f*x/y:s,o),y-=x,l=u}return a}const Xk=(function e(t){function r(i,s,o,a,n){jk(t,i,s,o,a,n)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(Uk);function n5(){var e=Xk,t=!1,r=1,i=1,s=[0],o=Si,a=Si,n=Si,h=Si,c=Si;function l(d){return d.x0=d.y0=0,d.x1=r,d.y1=i,d.eachBefore(u),s=[0],t&&d.eachBefore(zk),d}function u(d){var f=s[d.depth],m=d.x0+f,y=d.y0+f,x=d.x1-f,C=d.y1-f;x<m&&(m=x=(m+x)/2),C<y&&(y=C=(y+C)/2),d.x0=m,d.y0=y,d.x1=x,d.y1=C,d.children&&(f=s[d.depth+1]=o(d)/2,m+=c(d)-f,y+=a(d)-f,x-=n(d)-f,C-=h(d)-f,x<m&&(m=x=(m+x)/2),C<y&&(y=C=(y+C)/2),e(d,m,y,x,C))}return l.round=function(d){return arguments.length?(t=!!d,l):t},l.size=function(d){return arguments.length?(r=+d[0],i=+d[1],l):[r,i]},l.tile=function(d){return arguments.length?(e=Wk(d),l):e},l.padding=function(d){return arguments.length?l.paddingInner(d).paddingOuter(d):l.paddingInner()},l.paddingInner=function(d){return arguments.length?(o=typeof d=="function"?d:Ti(+d),l):o},l.paddingOuter=function(d){return arguments.length?l.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):l.paddingTop()},l.paddingTop=function(d){return arguments.length?(a=typeof d=="function"?d:Ti(+d),l):a},l.paddingRight=function(d){return arguments.length?(n=typeof d=="function"?d:Ti(+d),l):n},l.paddingBottom=function(d){return arguments.length?(h=typeof d=="function"?d:Ti(+d),l):h},l.paddingLeft=function(d){return arguments.length?(c=typeof d=="function"?d:Ti(+d),l):c},l}function Wo(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Zh=Symbol("implicit");function Vd(){var e=new _h,t=[],r=[],i=Zh;function s(o){let a=e.get(o);if(a===void 0){if(i!==Zh)return i;e.set(o,a=t.push(o)-1)}return r[a%r.length]}return s.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new _h;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return s},s.range=function(o){return arguments.length?(r=Array.from(o),s):r.slice()},s.unknown=function(o){return arguments.length?(i=o,s):i},s.copy=function(){return Vd(t,r).unknown(i)},Wo.apply(s,arguments),s}function Gk(){var e=Vd().unknown(void 0),t=e.domain,r=e.range,i=0,s=1,o,a,n=!1,h=0,c=0,l=.5;delete e.unknown;function u(){var d=t().length,f=s<i,m=f?s:i,y=f?i:s;o=(y-m)/Math.max(1,d-h+c*2),n&&(o=Math.floor(o)),m+=(y-m-o*(d-h))*l,a=o*(1-h),n&&(m=Math.round(m),a=Math.round(a));var x=Fx(d).map(function(C){return m+o*C});return r(f?x.reverse():x)}return e.domain=function(d){return arguments.length?(t(d),u()):t()},e.range=function(d){return arguments.length?([i,s]=d,i=+i,s=+s,u()):[i,s]},e.rangeRound=function(d){return[i,s]=d,i=+i,s=+s,n=!0,u()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(d){return arguments.length?(n=!!d,u()):n},e.padding=function(d){return arguments.length?(h=Math.min(1,c=+d),u()):h},e.paddingInner=function(d){return arguments.length?(h=Math.min(1,d),u()):h},e.paddingOuter=function(d){return arguments.length?(c=+d,u()):c},e.align=function(d){return arguments.length?(l=Math.max(0,Math.min(1,d)),u()):l},e.copy=function(){return Gk(t(),[i,s]).round(n).paddingInner(h).paddingOuter(c).align(l)},Wo.apply(u(),arguments)}function Vk(e){return function(){return e}}function Zk(e){return+e}var Kh=[0,1];function Gr(e){return e}function Sn(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:Vk(isNaN(t)?NaN:.5)}function Kk(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function Qk(e,t,r){var i=e[0],s=e[1],o=t[0],a=t[1];return s<i?(i=Sn(s,i),o=r(a,o)):(i=Sn(i,s),o=r(o,a)),function(n){return o(i(n))}}function Jk(e,t,r){var i=Math.min(e.length,t.length)-1,s=new Array(i),o=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)s[a]=Sn(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(n){var h=kx(e,n,1,i)-1;return o[h](s[h](n))}}function Zd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function t2(){var e=Kh,t=Kh,r=al,i,s,o,a=Gr,n,h,c;function l(){var d=Math.min(e.length,t.length);return a!==Gr&&(a=Kk(e[0],e[d-1])),n=d>2?Jk:Qk,h=c=null,u}function u(d){return d==null||isNaN(d=+d)?o:(h||(h=n(e.map(i),t,r)))(i(a(d)))}return u.invert=function(d){return a(s((c||(c=n(t,e.map(i),Be)))(d)))},u.domain=function(d){return arguments.length?(e=Array.from(d,Zk),l()):e.slice()},u.range=function(d){return arguments.length?(t=Array.from(d),l()):t.slice()},u.rangeRound=function(d){return t=Array.from(d),r=Hb,l()},u.clamp=function(d){return arguments.length?(a=d?!0:Gr,l()):a!==Gr},u.interpolate=function(d){return arguments.length?(r=d,l()):r},u.unknown=function(d){return arguments.length?(o=d,u):o},function(d,f){return i=d,s=f,l()}}function Kd(){return t2()(Gr,Gr)}function e2(e,t,r,i){var s=un(e,t,r),o;switch(i=uo(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(o=Ck(s,a))&&(i.precision=o),Xd(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=bk(s,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=xk(s))&&(i.precision=o-(i.type==="%")*2);break}}return jd(i)}function r2(e){var t=e.domain;return e.ticks=function(r){var i=t();return Lx(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var s=t();return e2(s[0],s[s.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),s=0,o=i.length-1,a=i[s],n=i[o],h,c,l=10;for(n<a&&(c=a,a=n,n=c,c=s,s=o,o=c);l-- >0;){if(c=cn(a,n,r),c===h)return i[s]=a,i[o]=n,t(i);if(c>0)a=Math.floor(a/c)*c,n=Math.ceil(n/c)*c;else if(c<0)a=Math.ceil(a*c)/c,n=Math.floor(n*c)/c;else break;h=c}return e},e}function i2(){var e=Kd();return e.copy=function(){return Zd(e,i2())},Wo.apply(e,arguments),r2(e)}function s2(e,t){e=e.slice();var r=0,i=e.length-1,s=e[r],o=e[i],a;return o<s&&(a=r,r=i,i=a,a=s,s=o,o=a),e[r]=t.floor(s),e[i]=t.ceil(o),e}const ca=new Date,ua=new Date;function Zt(e,t,r,i){function s(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return s.floor=o=>(e(o=new Date(+o)),o),s.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),s.round=o=>{const a=s(o),n=s.ceil(o);return o-a<n-o?a:n},s.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),s.range=(o,a,n)=>{const h=[];if(o=s.ceil(o),n=n==null?1:Math.floor(n),!(o<a)||!(n>0))return h;let c;do h.push(c=new Date(+o)),t(o,n),e(o);while(c<o&&o<a);return h},s.filter=o=>Zt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,n)=>{if(a>=a)if(n<0)for(;++n<=0;)for(;t(a,-1),!o(a););else for(;--n>=0;)for(;t(a,1),!o(a););}),r&&(s.count=(o,a)=>(ca.setTime(+o),ua.setTime(+a),e(ca),e(ua),Math.floor(r(ca,ua))),s.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?s.filter(i?a=>i(a)%o===0:a=>s.count(0,a)%o===0):s)),s}const po=Zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);po.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):po);po.range;const Ke=1e3,xe=Ke*60,Qe=xe*60,ir=Qe*24,ul=ir*7,Qh=ir*30,da=ir*365,Vr=Zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ke)},(e,t)=>(t-e)/Ke,e=>e.getUTCSeconds());Vr.range;const dl=Zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ke)},(e,t)=>{e.setTime(+e+t*xe)},(e,t)=>(t-e)/xe,e=>e.getMinutes());dl.range;const o2=Zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*xe)},(e,t)=>(t-e)/xe,e=>e.getUTCMinutes());o2.range;const fl=Zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ke-e.getMinutes()*xe)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getHours());fl.range;const a2=Zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getUTCHours());a2.range;const cs=Zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*xe)/ir,e=>e.getDate()-1);cs.range;const gl=Zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>e.getUTCDate()-1);gl.range;const n2=Zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ir,e=>Math.floor(e/ir));n2.range;function Or(e){return Zt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*xe)/ul)}const zo=Or(0),mo=Or(1),l2=Or(2),h2=Or(3),ai=Or(4),c2=Or(5),u2=Or(6);zo.range;mo.range;l2.range;h2.range;ai.range;c2.range;u2.range;function Dr(e){return Zt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/ul)}const Qd=Dr(0),yo=Dr(1),d2=Dr(2),f2=Dr(3),ni=Dr(4),g2=Dr(5),p2=Dr(6);Qd.range;yo.range;d2.range;f2.range;ni.range;g2.range;p2.range;const pl=Zt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());pl.range;const m2=Zt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());m2.range;const sr=Zt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});sr.range;const Fr=Zt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Fr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Fr.range;function y2(e,t,r,i,s,o){const a=[[Vr,1,Ke],[Vr,5,5*Ke],[Vr,15,15*Ke],[Vr,30,30*Ke],[o,1,xe],[o,5,5*xe],[o,15,15*xe],[o,30,30*xe],[s,1,Qe],[s,3,3*Qe],[s,6,6*Qe],[s,12,12*Qe],[i,1,ir],[i,2,2*ir],[r,1,ul],[t,1,Qh],[t,3,3*Qh],[e,1,da]];function n(c,l,u){const d=l<c;d&&([c,l]=[l,c]);const f=u&&typeof u.range=="function"?u:h(c,l,u),m=f?f.range(c,+l+1):[];return d?m.reverse():m}function h(c,l,u){const d=Math.abs(l-c)/u,f=il(([,,x])=>x).right(a,d);if(f===a.length)return e.every(un(c/da,l/da,u));if(f===0)return po.every(Math.max(un(c,l,u),1));const[m,y]=a[d/a[f-1][2]<a[f][2]/d?f-1:f];return m.every(y)}return[n,h]}const[x2,C2]=y2(sr,pl,zo,cs,fl,dl);function fa(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ga(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Bi(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function b2(e){var t=e.dateTime,r=e.date,i=e.time,s=e.periods,o=e.days,a=e.shortDays,n=e.months,h=e.shortMonths,c=vi(s),l=_i(s),u=vi(o),d=_i(o),f=vi(a),m=_i(a),y=vi(n),x=_i(n),C=vi(h),b=_i(h),k={a:R,A:I,b:Q,B:j,c:null,d:sc,e:sc,f:H2,g:J2,G:ew,H:N2,I:W2,j:z2,L:Jd,m:Y2,M:U2,p:pt,q:yt,Q:nc,s:lc,S:j2,u:X2,U:G2,V:V2,w:Z2,W:K2,x:null,X:null,y:Q2,Y:tw,Z:rw,"%":ac},T={a:bt,A:wt,b:ft,B:lt,c:null,d:oc,e:oc,f:aw,g:mw,G:xw,H:iw,I:sw,j:ow,L:ef,m:nw,M:lw,p:Ct,q:_t,Q:nc,s:lc,S:hw,u:cw,U:uw,V:dw,w:fw,W:gw,x:null,X:null,y:pw,Y:yw,Z:Cw,"%":ac},v={a:P,A:$,b:q,B:A,c:L,d:rc,e:rc,f:I2,g:ec,G:tc,H:ic,I:ic,j:E2,L:D2,m:A2,M:$2,p:W,q:M2,Q:R2,s:q2,S:O2,u:B2,U:v2,V:_2,w:T2,W:L2,x:E,X:_,y:ec,Y:tc,Z:F2,"%":P2};k.x=B(r,k),k.X=B(i,k),k.c=B(t,k),T.x=B(r,T),T.X=B(i,T),T.c=B(t,T);function B(G,ct){return function(gt){var J=[],Pt=-1,At=0,Xt=G.length,Gt,Kt,Ue;for(gt instanceof Date||(gt=new Date(+gt));++Pt<Xt;)G.charCodeAt(Pt)===37&&(J.push(G.slice(At,Pt)),(Kt=Jh[Gt=G.charAt(++Pt)])!=null?Gt=G.charAt(++Pt):Kt=Gt==="e"?" ":"0",(Ue=ct[Gt])&&(Gt=Ue(gt,Kt)),J.push(Gt),At=Pt+1);return J.push(G.slice(At,Pt)),J.join("")}}function F(G,ct){return function(gt){var J=Bi(1900,void 0,1),Pt=M(J,G,gt+="",0),At,Xt;if(Pt!=gt.length)return null;if("Q"in J)return new Date(J.Q);if("s"in J)return new Date(J.s*1e3+("L"in J?J.L:0));if(ct&&!("Z"in J)&&(J.Z=0),"p"in J&&(J.H=J.H%12+J.p*12),J.m===void 0&&(J.m="q"in J?J.q:0),"V"in J){if(J.V<1||J.V>53)return null;"w"in J||(J.w=1),"Z"in J?(At=ga(Bi(J.y,0,1)),Xt=At.getUTCDay(),At=Xt>4||Xt===0?yo.ceil(At):yo(At),At=gl.offset(At,(J.V-1)*7),J.y=At.getUTCFullYear(),J.m=At.getUTCMonth(),J.d=At.getUTCDate()+(J.w+6)%7):(At=fa(Bi(J.y,0,1)),Xt=At.getDay(),At=Xt>4||Xt===0?mo.ceil(At):mo(At),At=cs.offset(At,(J.V-1)*7),J.y=At.getFullYear(),J.m=At.getMonth(),J.d=At.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),Xt="Z"in J?ga(Bi(J.y,0,1)).getUTCDay():fa(Bi(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(Xt+5)%7:J.w+J.U*7-(Xt+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,ga(J)):fa(J)}}function M(G,ct,gt,J){for(var Pt=0,At=ct.length,Xt=gt.length,Gt,Kt;Pt<At;){if(J>=Xt)return-1;if(Gt=ct.charCodeAt(Pt++),Gt===37){if(Gt=ct.charAt(Pt++),Kt=v[Gt in Jh?ct.charAt(Pt++):Gt],!Kt||(J=Kt(G,gt,J))<0)return-1}else if(Gt!=gt.charCodeAt(J++))return-1}return J}function W(G,ct,gt){var J=c.exec(ct.slice(gt));return J?(G.p=l.get(J[0].toLowerCase()),gt+J[0].length):-1}function P(G,ct,gt){var J=f.exec(ct.slice(gt));return J?(G.w=m.get(J[0].toLowerCase()),gt+J[0].length):-1}function $(G,ct,gt){var J=u.exec(ct.slice(gt));return J?(G.w=d.get(J[0].toLowerCase()),gt+J[0].length):-1}function q(G,ct,gt){var J=C.exec(ct.slice(gt));return J?(G.m=b.get(J[0].toLowerCase()),gt+J[0].length):-1}function A(G,ct,gt){var J=y.exec(ct.slice(gt));return J?(G.m=x.get(J[0].toLowerCase()),gt+J[0].length):-1}function L(G,ct,gt){return M(G,t,ct,gt)}function E(G,ct,gt){return M(G,r,ct,gt)}function _(G,ct,gt){return M(G,i,ct,gt)}function R(G){return a[G.getDay()]}function I(G){return o[G.getDay()]}function Q(G){return h[G.getMonth()]}function j(G){return n[G.getMonth()]}function pt(G){return s[+(G.getHours()>=12)]}function yt(G){return 1+~~(G.getMonth()/3)}function bt(G){return a[G.getUTCDay()]}function wt(G){return o[G.getUTCDay()]}function ft(G){return h[G.getUTCMonth()]}function lt(G){return n[G.getUTCMonth()]}function Ct(G){return s[+(G.getUTCHours()>=12)]}function _t(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var ct=B(G+="",k);return ct.toString=function(){return G},ct},parse:function(G){var ct=F(G+="",!1);return ct.toString=function(){return G},ct},utcFormat:function(G){var ct=B(G+="",T);return ct.toString=function(){return G},ct},utcParse:function(G){var ct=F(G+="",!0);return ct.toString=function(){return G},ct}}}var Jh={"-":"",_:" ",0:"0"},Jt=/^\s*\d+/,k2=/^%/,w2=/[\\^$*+?|[\]().{}]/g;function Ot(e,t,r){var i=e<0?"-":"",s=(i?-e:e)+"",o=s.length;return i+(o<r?new Array(r-o+1).join(t)+s:s)}function S2(e){return e.replace(w2,"\\$&")}function vi(e){return new RegExp("^(?:"+e.map(S2).join("|")+")","i")}function _i(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function T2(e,t,r){var i=Jt.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function B2(e,t,r){var i=Jt.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function v2(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function _2(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function L2(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function tc(e,t,r){var i=Jt.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function ec(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function F2(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function M2(e,t,r){var i=Jt.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function A2(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function rc(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function E2(e,t,r){var i=Jt.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function ic(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function $2(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function O2(e,t,r){var i=Jt.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function D2(e,t,r){var i=Jt.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function I2(e,t,r){var i=Jt.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function P2(e,t,r){var i=k2.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function R2(e,t,r){var i=Jt.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function q2(e,t,r){var i=Jt.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function sc(e,t){return Ot(e.getDate(),t,2)}function N2(e,t){return Ot(e.getHours(),t,2)}function W2(e,t){return Ot(e.getHours()%12||12,t,2)}function z2(e,t){return Ot(1+cs.count(sr(e),e),t,3)}function Jd(e,t){return Ot(e.getMilliseconds(),t,3)}function H2(e,t){return Jd(e,t)+"000"}function Y2(e,t){return Ot(e.getMonth()+1,t,2)}function U2(e,t){return Ot(e.getMinutes(),t,2)}function j2(e,t){return Ot(e.getSeconds(),t,2)}function X2(e){var t=e.getDay();return t===0?7:t}function G2(e,t){return Ot(zo.count(sr(e)-1,e),t,2)}function tf(e){var t=e.getDay();return t>=4||t===0?ai(e):ai.ceil(e)}function V2(e,t){return e=tf(e),Ot(ai.count(sr(e),e)+(sr(e).getDay()===4),t,2)}function Z2(e){return e.getDay()}function K2(e,t){return Ot(mo.count(sr(e)-1,e),t,2)}function Q2(e,t){return Ot(e.getFullYear()%100,t,2)}function J2(e,t){return e=tf(e),Ot(e.getFullYear()%100,t,2)}function tw(e,t){return Ot(e.getFullYear()%1e4,t,4)}function ew(e,t){var r=e.getDay();return e=r>=4||r===0?ai(e):ai.ceil(e),Ot(e.getFullYear()%1e4,t,4)}function rw(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ot(t/60|0,"0",2)+Ot(t%60,"0",2)}function oc(e,t){return Ot(e.getUTCDate(),t,2)}function iw(e,t){return Ot(e.getUTCHours(),t,2)}function sw(e,t){return Ot(e.getUTCHours()%12||12,t,2)}function ow(e,t){return Ot(1+gl.count(Fr(e),e),t,3)}function ef(e,t){return Ot(e.getUTCMilliseconds(),t,3)}function aw(e,t){return ef(e,t)+"000"}function nw(e,t){return Ot(e.getUTCMonth()+1,t,2)}function lw(e,t){return Ot(e.getUTCMinutes(),t,2)}function hw(e,t){return Ot(e.getUTCSeconds(),t,2)}function cw(e){var t=e.getUTCDay();return t===0?7:t}function uw(e,t){return Ot(Qd.count(Fr(e)-1,e),t,2)}function rf(e){var t=e.getUTCDay();return t>=4||t===0?ni(e):ni.ceil(e)}function dw(e,t){return e=rf(e),Ot(ni.count(Fr(e),e)+(Fr(e).getUTCDay()===4),t,2)}function fw(e){return e.getUTCDay()}function gw(e,t){return Ot(yo.count(Fr(e)-1,e),t,2)}function pw(e,t){return Ot(e.getUTCFullYear()%100,t,2)}function mw(e,t){return e=rf(e),Ot(e.getUTCFullYear()%100,t,2)}function yw(e,t){return Ot(e.getUTCFullYear()%1e4,t,4)}function xw(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ni(e):ni.ceil(e),Ot(e.getUTCFullYear()%1e4,t,4)}function Cw(){return"+0000"}function ac(){return"%"}function nc(e){return+e}function lc(e){return Math.floor(+e/1e3)}var Wr,sf;bw({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function bw(e){return Wr=b2(e),sf=Wr.format,Wr.parse,Wr.utcFormat,Wr.utcParse,Wr}function kw(e){return new Date(e)}function ww(e){return e instanceof Date?+e:+new Date(+e)}function of(e,t,r,i,s,o,a,n,h,c){var l=Kd(),u=l.invert,d=l.domain,f=c(".%L"),m=c(":%S"),y=c("%I:%M"),x=c("%I %p"),C=c("%a %d"),b=c("%b %d"),k=c("%B"),T=c("%Y");function v(B){return(h(B)<B?f:n(B)<B?m:a(B)<B?y:o(B)<B?x:i(B)<B?s(B)<B?C:b:r(B)<B?k:T)(B)}return l.invert=function(B){return new Date(u(B))},l.domain=function(B){return arguments.length?d(Array.from(B,ww)):d().map(kw)},l.ticks=function(B){var F=d();return e(F[0],F[F.length-1],B??10)},l.tickFormat=function(B,F){return F==null?v:c(F)},l.nice=function(B){var F=d();return(!B||typeof B.range!="function")&&(B=t(F[0],F[F.length-1],B??10)),B?d(s2(F,B)):l},l.copy=function(){return Zd(l,of(e,t,r,i,s,o,a,n,h,c))},l}function l5(){return Wo.apply(of(x2,C2,sr,pl,zo,cs,fl,dl,Vr,sf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Sw(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const h5=Sw("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Ht(e){return function(){return e}}const hc=Math.abs,re=Math.atan2,xr=Math.cos,Tw=Math.max,pa=Math.min,$e=Math.sin,Zr=Math.sqrt,oe=1e-12,is=Math.PI,xo=is/2,zs=2*is;function Bw(e){return e>1?0:e<-1?is:Math.acos(e)}function cc(e){return e>=1?xo:e<=-1?-xo:Math.asin(e)}function af(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 hk(t)}function vw(e){return e.innerRadius}function _w(e){return e.outerRadius}function Lw(e){return e.startAngle}function Fw(e){return e.endAngle}function Mw(e){return e&&e.padAngle}function Aw(e,t,r,i,s,o,a,n){var h=r-e,c=i-t,l=a-s,u=n-o,d=u*h-l*c;if(!(d*d<oe))return d=(l*(t-o)-u*(e-s))/d,[e+d*h,t+d*c]}function ws(e,t,r,i,s,o,a){var n=e-r,h=t-i,c=(a?o:-o)/Zr(n*n+h*h),l=c*h,u=-c*n,d=e+l,f=t+u,m=r+l,y=i+u,x=(d+m)/2,C=(f+y)/2,b=m-d,k=y-f,T=b*b+k*k,v=s-o,B=d*y-m*f,F=(k<0?-1:1)*Zr(Tw(0,v*v*T-B*B)),M=(B*k-b*F)/T,W=(-B*b-k*F)/T,P=(B*k+b*F)/T,$=(-B*b+k*F)/T,q=M-x,A=W-C,L=P-x,E=$-C;return q*q+A*A>L*L+E*E&&(M=P,W=$),{cx:M,cy:W,x01:-l,y01:-u,x11:M*(s/v-1),y11:W*(s/v-1)}}function c5(){var e=vw,t=_w,r=Ht(0),i=null,s=Lw,o=Fw,a=Mw,n=null,h=af(c);function c(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),m=s.apply(this,arguments)-xo,y=o.apply(this,arguments)-xo,x=hc(y-m),C=y>m;if(n||(n=l=h()),f<d&&(u=f,f=d,d=u),!(f>oe))n.moveTo(0,0);else if(x>zs-oe)n.moveTo(f*xr(m),f*$e(m)),n.arc(0,0,f,m,y,!C),d>oe&&(n.moveTo(d*xr(y),d*$e(y)),n.arc(0,0,d,y,m,C));else{var b=m,k=y,T=m,v=y,B=x,F=x,M=a.apply(this,arguments)/2,W=M>oe&&(i?+i.apply(this,arguments):Zr(d*d+f*f)),P=pa(hc(f-d)/2,+r.apply(this,arguments)),$=P,q=P,A,L;if(W>oe){var E=cc(W/d*$e(M)),_=cc(W/f*$e(M));(B-=E*2)>oe?(E*=C?1:-1,T+=E,v-=E):(B=0,T=v=(m+y)/2),(F-=_*2)>oe?(_*=C?1:-1,b+=_,k-=_):(F=0,b=k=(m+y)/2)}var R=f*xr(b),I=f*$e(b),Q=d*xr(v),j=d*$e(v);if(P>oe){var pt=f*xr(k),yt=f*$e(k),bt=d*xr(T),wt=d*$e(T),ft;if(x<is)if(ft=Aw(R,I,bt,wt,pt,yt,Q,j)){var lt=R-ft[0],Ct=I-ft[1],_t=pt-ft[0],G=yt-ft[1],ct=1/$e(Bw((lt*_t+Ct*G)/(Zr(lt*lt+Ct*Ct)*Zr(_t*_t+G*G)))/2),gt=Zr(ft[0]*ft[0]+ft[1]*ft[1]);$=pa(P,(d-gt)/(ct-1)),q=pa(P,(f-gt)/(ct+1))}else $=q=0}F>oe?q>oe?(A=ws(bt,wt,R,I,f,q,C),L=ws(pt,yt,Q,j,f,q,C),n.moveTo(A.cx+A.x01,A.cy+A.y01),q<P?n.arc(A.cx,A.cy,q,re(A.y01,A.x01),re(L.y01,L.x01),!C):(n.arc(A.cx,A.cy,q,re(A.y01,A.x01),re(A.y11,A.x11),!C),n.arc(0,0,f,re(A.cy+A.y11,A.cx+A.x11),re(L.cy+L.y11,L.cx+L.x11),!C),n.arc(L.cx,L.cy,q,re(L.y11,L.x11),re(L.y01,L.x01),!C))):(n.moveTo(R,I),n.arc(0,0,f,b,k,!C)):n.moveTo(R,I),!(d>oe)||!(B>oe)?n.lineTo(Q,j):$>oe?(A=ws(Q,j,pt,yt,d,-$,C),L=ws(R,I,bt,wt,d,-$,C),n.lineTo(A.cx+A.x01,A.cy+A.y01),$<P?n.arc(A.cx,A.cy,$,re(A.y01,A.x01),re(L.y01,L.x01),!C):(n.arc(A.cx,A.cy,$,re(A.y01,A.x01),re(A.y11,A.x11),!C),n.arc(0,0,d,re(A.cy+A.y11,A.cx+A.x11),re(L.cy+L.y11,L.cx+L.x11),C),n.arc(L.cx,L.cy,$,re(L.y11,L.x11),re(L.y01,L.x01),!C))):n.arc(0,0,d,v,T,C)}if(n.closePath(),l)return n=null,l+""||null}return c.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+s.apply(this,arguments)+ +o.apply(this,arguments))/2-is/2;return[xr(u)*l,$e(u)*l]},c.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:Ht(+l),c):e},c.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Ht(+l),c):t},c.cornerRadius=function(l){return arguments.length?(r=typeof l=="function"?l:Ht(+l),c):r},c.padRadius=function(l){return arguments.length?(i=l==null?null:typeof l=="function"?l:Ht(+l),c):i},c.startAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Ht(+l),c):s},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Ht(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Ht(+l),c):a},c.context=function(l){return arguments.length?(n=l??null,c):n},c}function nf(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lf(e){this._context=e}lf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vi(e){return new lf(e)}function Ew(e){return e[0]}function $w(e){return e[1]}function Ow(e,t){var r=Ht(!0),i=null,s=Vi,o=null,a=af(n);e=typeof e=="function"?e:e===void 0?Ew:Ht(e),t=typeof t=="function"?t:t===void 0?$w:Ht(t);function n(h){var c,l=(h=nf(h)).length,u,d=!1,f;for(i==null&&(o=s(f=a())),c=0;c<=l;++c)!(c<l&&r(u=h[c],c,h))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(u,c,h),+t(u,c,h));if(f)return o=null,f+""||null}return n.x=function(h){return arguments.length?(e=typeof h=="function"?h:Ht(+h),n):e},n.y=function(h){return arguments.length?(t=typeof h=="function"?h:Ht(+h),n):t},n.defined=function(h){return arguments.length?(r=typeof h=="function"?h:Ht(!!h),n):r},n.curve=function(h){return arguments.length?(s=h,i!=null&&(o=s(i)),n):s},n.context=function(h){return arguments.length?(h==null?i=o=null:o=s(i=h),n):i},n}function Dw(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Iw(e){return e}function u5(){var e=Iw,t=Dw,r=null,i=Ht(0),s=Ht(zs),o=Ht(0);function a(n){var h,c=(n=nf(n)).length,l,u,d=0,f=new Array(c),m=new Array(c),y=+i.apply(this,arguments),x=Math.min(zs,Math.max(-zs,s.apply(this,arguments)-y)),C,b=Math.min(Math.abs(x)/c,o.apply(this,arguments)),k=b*(x<0?-1:1),T;for(h=0;h<c;++h)(T=m[f[h]=h]=+e(n[h],h,n))>0&&(d+=T);for(t!=null?f.sort(function(v,B){return t(m[v],m[B])}):r!=null&&f.sort(function(v,B){return r(n[v],n[B])}),h=0,u=d?(x-c*k)/d:0;h<c;++h,y=C)l=f[h],T=m[l],C=y+(T>0?T*u:0)+k,m[l]={data:n[l],index:h,value:T,startAngle:y,endAngle:C,padAngle:b};return m}return a.value=function(n){return arguments.length?(e=typeof n=="function"?n:Ht(+n),a):e},a.sortValues=function(n){return arguments.length?(t=n,r=null,a):t},a.sort=function(n){return arguments.length?(r=n,t=null,a):r},a.startAngle=function(n){return arguments.length?(i=typeof n=="function"?n:Ht(+n),a):i},a.endAngle=function(n){return arguments.length?(s=typeof n=="function"?n:Ht(+n),a):s},a.padAngle=function(n){return arguments.length?(o=typeof n=="function"?n:Ht(+n),a):o},a}class hf{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 cf(e){return new hf(e,!0)}function uf(e){return new hf(e,!1)}function fr(){}function Co(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 Ho(e){this._context=e}Ho.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:Co(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:Co(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tn(e){return new Ho(e)}function df(e){this._context=e}df.prototype={areaStart:fr,areaEnd:fr,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:Co(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pw(e){return new df(e)}function ff(e){this._context=e}ff.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:Co(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rw(e){return new ff(e)}function gf(e,t){this._basis=new Ho(e),this._beta=t}gf.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],o=e[r]-i,a=t[r]-s,n=-1,h;++n<=r;)h=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+h*o),this._beta*t[n]+(1-this._beta)*(s+h*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const qw=(function e(t){function r(i){return t===1?new Ho(i):new gf(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function bo(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 ml(e,t){this._context=e,this._k=(1-t)/6}ml.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:bo(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:bo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pf=(function e(t){function r(i){return new ml(i,t)}return r.tension=function(i){return e(+i)},r})(0);function yl(e,t){this._context=e,this._k=(1-t)/6}yl.prototype={areaStart:fr,areaEnd:fr,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:bo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Nw=(function e(t){function r(i){return new yl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xl(e,t){this._context=e,this._k=(1-t)/6}xl.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:bo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ww=(function e(t){function r(i){return new xl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Cl(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>oe){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>oe){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/l,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function mf(e,t){this._context=e,this._alpha=t}mf.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:Cl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yf=(function e(t){function r(i){return t?new mf(i,t):new ml(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function xf(e,t){this._context=e,this._alpha=t}xf.prototype={areaStart:fr,areaEnd:fr,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:Cl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zw=(function e(t){function r(i){return t?new xf(i,t):new yl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cf(e,t){this._context=e,this._alpha=t}Cf.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:Cl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hw=(function e(t){function r(i){return t?new Cf(i,t):new xl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function bf(e){this._context=e}bf.prototype={areaStart:fr,areaEnd:fr,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 Yw(e){return new bf(e)}function uc(e){return e<0?-1:1}function dc(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(uc(o)+uc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function fc(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,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function ko(e){this._context=e}ko.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,fc(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,fc(this,r=dc(this,e,t)),r);break;default:ma(this,this._t0,r=dc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function kf(e){this._context=new wf(e)}(kf.prototype=Object.create(ko.prototype)).point=function(e,t){ko.prototype.point.call(this,t,e)};function wf(e){this._context=e}wf.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,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function Sf(e){return new ko(e)}function Tf(e){return new kf(e)}function Bf(e){this._context=e}Bf.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=gc(e),s=gc(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function gc(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function vf(e){return new Bf(e)}function Yo(e,t){this._context=e,this._t=t}Yo.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 _f(e){return new Yo(e,.5)}function Lf(e){return new Yo(e,0)}function Ff(e){return new Yo(e,1)}function Ri(e,t,r){this.k=e,this.x=t,this.y=r}Ri.prototype={constructor:Ri,scale:function(e){return e===1?this:new Ri(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ri(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Ri.prototype;var Uw=g(e=>{const{securityLevel:t}=Ft();let r=Lt("body");if(t==="sandbox"){const o=Lt(`#i${e}`).node()?.contentDocument??document;r=Lt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Mf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}g(Mf,"getDefaultExportFromCjs");var ie={},Ss={},lr={},pc;function ui(){if(pc)return lr;pc=1;function e(a){return typeof a>"u"||a===null}g(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}g(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}g(r,"toArray");function i(a,n){if(n){const h=Object.keys(n);for(let c=0,l=h.length;c<l;c+=1){const u=h[c];a[u]=n[u]}}return a}g(i,"extend");function s(a,n){let h="";for(let c=0;c<n;c+=1)h+=a;return h}g(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return g(o,"isNegativeZero"),lr.isNothing=e,lr.isObject=t,lr.toArray=r,lr.repeat=s,lr.isNegativeZero=o,lr.extend=i,lr}g(ui,"requireCommon");var ya,mc;function di(){if(mc)return ya;mc=1;function e(r,i){let s="";const o=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+=`
129
-
130
- `+r.mark.snippet),o+" "+s):o}g(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return g(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=g(function(i){return this.name+": "+e(this,i)},"toString"),ya=t,ya}g(di,"requireException");var xa,yc;function Af(){if(yc)return xa;yc=1;const e=ui();function t(s,o,a,n,h){let c="",l="";const u=Math.floor(h/2)-1;return n-o>u&&(c=" ... ",o=n-u+c.length),a-n>u&&(l=" ...",a=n+u-l.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+l,pos:n-o+c.length}}g(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}g(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],h=[];let c,l=-1;for(;c=a.exec(s.buffer);)h.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&l<0&&(l=n.length-2);l<0&&(l=n.length-1);let u="";const d=Math.min(s.line+o.linesAfter,h.length).toString().length,f=o.maxLength-(o.indent+d+3);for(let y=1;y<=o.linesBefore&&!(l-y<0);y++){const x=t(s.buffer,n[l-y],h[l-y],s.position-(n[l]-n[l-y]),f);u=e.repeat(" ",o.indent)+r((s.line-y+1).toString(),d)+" | "+x.str+`
131
- `+u}const m=t(s.buffer,n[l],h[l],s.position,f);u+=e.repeat(" ",o.indent)+r((s.line+1).toString(),d)+" | "+m.str+`
132
- `,u+=e.repeat("-",o.indent+d+3+m.pos)+`^
133
- `;for(let y=1;y<=o.linesAfter&&!(l+y>=h.length);y++){const x=t(s.buffer,n[l+y],h[l+y],s.position-(n[l]-n[l+y]),f);u+=e.repeat(" ",o.indent)+r((s.line+y+1).toString(),d)+" | "+x.str+`
134
- `}return u.replace(/\n$/,"")}return g(i,"makeSnippet"),xa=i,xa}g(Af,"requireSnippet");var Ca,xc;function le(){if(xc)return Ca;xc=1;const e=di(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(h){a[String(h)]=n})}),a}g(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return g(s,"Type2"),Ca=s,Ca}g(le,"requireType");var ba,Cc;function bl(){if(Cc)return ba;Cc=1;const e=di(),t=le();function r(o,a){const n=[];return o[a].forEach(function(h){let c=n.length;n.forEach(function(l,u){l.tag===h.tag&&l.kind===h.kind&&l.multi===h.multi&&(c=u)}),n[c]=h}),n}g(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}g(a,"collectType");for(let n=0,h=arguments.length;n<h;n+=1)arguments[n].forEach(a);return o}g(i,"compileMap");function s(o){return this.extend(o)}return g(s,"Schema2"),s.prototype.extend=g(function(a){let n=[],h=[];if(a instanceof t)h.push(a);else if(Array.isArray(a))h=h.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(h=h.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.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(l.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(h),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),ba=s,ba}g(bl,"requireSchema");var ka,bc;function kl(){if(bc)return ka;bc=1;const e=le();return ka=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(t){return t!==null?t:""},"construct")}),ka}g(kl,"requireStr");var wa,kc;function wl(){if(kc)return wa;kc=1;const e=le();return wa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(t){return t!==null?t:[]},"construct")}),wa}g(wl,"requireSeq");var Sa,wc;function Sl(){if(wc)return Sa;wc=1;const e=le();return Sa=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(t){return t!==null?t:{}},"construct")}),Sa}g(Sl,"requireMap");var Ta,Sc;function Tl(){if(Sc)return Ta;Sc=1;const e=bl();return Ta=new e({explicit:[kl(),wl(),Sl()]}),Ta}g(Tl,"requireFailsafe");var Ba,Tc;function Bl(){if(Tc)return Ba;Tc=1;const e=le();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}g(t,"resolveYamlNull");function r(){return null}g(r,"constructYamlNull");function i(s){return s===null}return g(i,"isNull"),Ba=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"}),Ba}g(Bl,"require_null");var va,Bc;function vl(){if(Bc)return va;Bc=1;const e=le();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}g(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}g(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return g(i,"isBoolean"),va=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:g(function(s){return s?"true":"false"},"lowercase"),uppercase:g(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),va}g(vl,"requireBool");var _a,vc;function _l(){if(vc)return _a;vc=1;const e=ui(),t=le();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}g(r,"isHexCode");function i(c){return c>=48&&c<=55}g(i,"isOctCode");function s(c){return c>=48&&c<=57}g(s,"isDecCode");function o(c){if(c===null)return!1;const l=c.length;let u=0,d=!1;if(!l)return!1;let f=c[u];if((f==="-"||f==="+")&&(f=c[++u]),f==="0"){if(u+1===l)return!0;if(f=c[++u],f==="b"){for(u++;u<l;u++){if(f=c[u],f!=="0"&&f!=="1")return!1;d=!0}return d&&isFinite(a(c))}if(f==="x"){for(u++;u<l;u++){if(!r(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}if(f==="o"){for(u++;u<l;u++){if(!i(c.charCodeAt(u)))return!1;d=!0}return d&&isFinite(a(c))}}for(;u<l;u++){if(!s(c.charCodeAt(u)))return!1;d=!0}return d?isFinite(a(c)):!1}g(o,"resolveYamlInteger");function a(c){let l=c,u=1,d=l[0];if((d==="-"||d==="+")&&(d==="-"&&(u=-1),l=l.slice(1),d=l[0]),l==="0")return 0;if(d==="0"){if(l[1]==="b")return u*parseInt(l.slice(2),2);if(l[1]==="x")return u*parseInt(l.slice(2),16);if(l[1]==="o")return u*parseInt(l.slice(2),8)}return u*parseInt(l,10)}g(a,"parseYamlInteger");function n(c){return a(c)}g(n,"constructYamlInteger");function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return g(h,"isInteger"),_a=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:h,represent:{binary:g(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:g(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:g(function(c){return c.toString(10)},"decimal"),hexadecimal:g(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),_a}g(_l,"requireInt");var La,_c;function Ll(){if(_c)return La;_c=1;const e=ui(),t=le(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}g(s,"resolveYamlFloat");function o(c){let l=c.toLowerCase();const u=l[0]==="-"?-1:1;return"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:u*parseFloat(l,10)}g(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,l){if(isNaN(c))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(l){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 a.test(u)?u.replace("e",".e"):u}g(n,"representYamlFloat");function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return g(h,"isFloat"),La=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:h,represent:n,defaultStyle:"lowercase"}),La}g(Ll,"requireFloat");var Fa,Lc;function Fl(){return Lc||(Lc=1,Fa=Tl().extend({implicit:[Bl(),vl(),_l(),Ll()]})),Fa}g(Fl,"requireJson");var Ma,Fc;function Ml(){return Fc||(Fc=1,Ma=Fl()),Ma}g(Ml,"requireCore");var Aa,Mc;function Al(){if(Mc)return Aa;Mc=1;const e=le(),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(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}g(i,"resolveYamlTimestamp");function s(a){let n=0,h=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const l=+c[1],u=+c[2]-1,d=+c[3];if(!c[4])return new Date(Date.UTC(l,u,d));const f=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const C=+c[10],b=+(c[11]||0);h=(C*60+b)*6e4,c[9]==="-"&&(h=-h)}const x=new Date(Date.UTC(l,u,d,f,m,y,n));return h&&x.setTime(x.getTime()-h),x}g(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return g(o,"representYamlTimestamp"),Aa=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),Aa}g(Al,"requireTimestamp");var Ea,Ac;function El(){if(Ac)return Ea;Ac=1;const e=le();function t(r){return r==="<<"||r===null}return g(t,"resolveYamlMerge"),Ea=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Ea}g(El,"requireMerge");var $a,Ec;function $l(){if(Ec)return $a;Ec=1;const e=le(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
135
- \r`;function r(a){if(a===null)return!1;let n=0;const h=a.length,c=t;for(let l=0;l<h;l++){const u=c.indexOf(a.charAt(l));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}g(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),h=n.length,c=t;let l=0;const u=[];for(let f=0;f<h;f++)f%4===0&&f&&(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|c.indexOf(n.charAt(f));const d=h%4*6;return d===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):d===18?(u.push(l>>10&255),u.push(l>>2&255)):d===12&&u.push(l>>4&255),new Uint8Array(u)}g(i,"constructYamlBinary");function s(a){let n="",h=0;const c=a.length,l=t;for(let d=0;d<c;d++)d%3===0&&d&&(n+=l[h>>18&63],n+=l[h>>12&63],n+=l[h>>6&63],n+=l[h&63]),h=(h<<8)+a[d];const u=c%3;return u===0?(n+=l[h>>18&63],n+=l[h>>12&63],n+=l[h>>6&63],n+=l[h&63]):u===2?(n+=l[h>>10&63],n+=l[h>>4&63],n+=l[h<<2&63],n+=l[64]):u===1&&(n+=l[h>>2&63],n+=l[h<<4&63],n+=l[64],n+=l[64]),n}g(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return g(o,"isBinary"),$a=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),$a}g($l,"requireBinary");var Oa,$c;function Ol(){if($c)return Oa;$c=1;const e=le(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a=[],n=o;for(let h=0,c=n.length;h<c;h+=1){const l=n[h];let u=!1;if(r.call(l)!=="[object Object]")return!1;let d;for(d in l)if(t.call(l,d))if(!u)u=!0;else return!1;if(!u)return!1;if(a.indexOf(d)===-1)a.push(d);else return!1}return!0}g(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return g(s,"constructYamlOmap"),Oa=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Oa}g(Ol,"requireOmap");var Da,Oc;function Dl(){if(Oc)return Da;Oc=1;const e=le(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,h=o.length;n<h;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const l=Object.keys(c);if(l.length!==1)return!1;a[n]=[l[0],c[l[0]]]}return!0}g(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,h=o.length;n<h;n+=1){const c=o[n],l=Object.keys(c);a[n]=[l[0],c[l[0]]]}return a}return g(i,"constructYamlPairs"),Da=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Da}g(Dl,"requirePairs");var Ia,Dc;function Il(){if(Dc)return Ia;Dc=1;const e=le(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}g(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return g(i,"constructYamlSet"),Ia=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Ia}g(Il,"requireSet");var Pa,Ic;function Uo(){return Ic||(Ic=1,Pa=Ml().extend({implicit:[Al(),El()],explicit:[$l(),Ol(),Dl(),Il()]})),Pa}g(Uo,"require_default");var Pc;function Ef(){if(Pc)return Ss;Pc=1;const e=ui(),t=di(),r=Af(),i=Uo(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,h=4,c=1,l=2,u=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(p){return Object.prototype.toString.call(p)}g(C,"_class");function b(p){return p===10||p===13}g(b,"isEol");function k(p){return p===9||p===32}g(k,"isWhiteSpace");function T(p){return p===9||p===32||p===10||p===13}g(T,"isWsOrEol");function v(p){return p===44||p===91||p===93||p===123||p===125}g(v,"isFlowIndicator");function B(p){if(p>=48&&p<=57)return p-48;const D=p|32;return D>=97&&D<=102?D-97+10:-1}g(B,"fromHexCode");function F(p){return p===120?2:p===117?4:p===85?8:0}g(F,"escapedHexLen");function M(p){return p>=48&&p<=57?p-48:-1}g(M,"fromDecimalCode");function W(p){switch(p){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
136
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}g(W,"simpleEscapeSequence");function P(p){return p<=65535?String.fromCharCode(p):String.fromCharCode((p-65536>>10)+55296,(p-65536&1023)+56320)}g(P,"charFromCodepoint");function $(p,D,U){D==="__proto__"?Object.defineProperty(p,D,{configurable:!0,enumerable:!0,writable:!0,value:U}):p[D]=U}g($,"setProperty");const q=new Array(256),A=new Array(256);for(let p=0;p<256;p++)q[p]=W(p)?1:0,A[p]=W(p);function L(p,D){this.input=p,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=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}g(L,"State");function E(p,D){const U={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return U.snippet=r(U),new t(D,U)}g(E,"generateError");function _(p,D){throw E(p,D)}g(_,"throwError");function R(p,D){p.onWarning&&p.onWarning.call(null,E(p,D))}g(R,"throwWarning");function I(p,D,U){const K=p.anchorMapTransactions;if(K.length!==0){const Y=K[K.length-1];s.call(Y,D)||(Y[D]={existed:s.call(p.anchorMap,D),value:p.anchorMap[D]})}p.anchorMap[D]=U}g(I,"storeAnchor");function Q(p){p.anchorMapTransactions.push(Object.create(null))}g(Q,"beginAnchorTransaction");function j(p){const D=p.anchorMapTransactions.pop(),U=p.anchorMapTransactions;if(U.length===0)return;const K=U[U.length-1],Y=Object.keys(D);for(let it=0,S=Y.length;it<S;it+=1){const N=Y[it];s.call(K,N)||(K[N]=D[N])}}g(j,"commitAnchorTransaction");function pt(p){const D=p.anchorMapTransactions.pop(),U=Object.keys(D);for(let K=U.length-1;K>=0;K-=1){const Y=D[U[K]];Y.existed?p.anchorMap[U[K]]=Y.value:delete p.anchorMap[U[K]]}}g(pt,"rollbackAnchorTransaction");function yt(p){return{position:p.position,line:p.line,lineStart:p.lineStart,lineIndent:p.lineIndent,firstTabInLine:p.firstTabInLine,tag:p.tag,anchor:p.anchor,kind:p.kind,result:p.result}}g(yt,"snapshotState");function bt(p,D){p.position=D.position,p.line=D.line,p.lineStart=D.lineStart,p.lineIndent=D.lineIndent,p.firstTabInLine=D.firstTabInLine,p.tag=D.tag,p.anchor=D.anchor,p.kind=D.kind,p.result=D.result}g(bt,"restoreState");const wt={YAML:g(function(D,U,K){D.version!==null&&_(D,"duplication of %YAML directive"),K.length!==1&&_(D,"YAML directive accepts exactly one argument");const Y=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);Y===null&&_(D,"ill-formed argument of the YAML directive");const it=parseInt(Y[1],10),S=parseInt(Y[2],10);it!==1&&_(D,"unacceptable YAML version of the document"),D.version=K[0],D.checkLineBreaks=S<2,S!==1&&S!==2&&R(D,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(D,U,K){let Y;K.length!==2&&_(D,"TAG directive accepts exactly two arguments");const it=K[0];Y=K[1],y.test(it)||_(D,"ill-formed tag handle (first argument) of the TAG directive"),s.call(D.tagMap,it)&&_(D,'there is a previously declared suffix for "'+it+'" tag handle'),x.test(Y)||_(D,"ill-formed tag prefix (second argument) of the TAG directive");try{Y=decodeURIComponent(Y)}catch{_(D,"tag prefix is malformed: "+Y)}D.tagMap[it]=Y},"handleTagDirective")};function ft(p,D,U,K){if(D<U){const Y=p.input.slice(D,U);if(K)for(let it=0,S=Y.length;it<S;it+=1){const N=Y.charCodeAt(it);N===9||N>=32&&N<=1114111||_(p,"expected valid JSON character")}else d.test(Y)&&_(p,"the stream contains non-printable characters");p.result+=Y}}g(ft,"captureSegment");function lt(p,D,U,K){e.isObject(U)||_(p,"cannot merge mappings; the provided source object is unacceptable");const Y=Object.keys(U);for(let it=0,S=Y.length;it<S;it+=1){const N=Y[it];p.maxTotalMergeKeys!==-1&&++p.totalMergeKeys>p.maxTotalMergeKeys&&_(p,"merge keys exceeded maxTotalMergeKeys ("+p.maxTotalMergeKeys+")"),s.call(D,N)||($(D,N,U[N]),K[N]=!0)}}g(lt,"mergeMappings");function Ct(p,D,U,K,Y,it,S,N,et){if(Array.isArray(Y)){Y=Array.prototype.slice.call(Y);for(let X=0,Z=Y.length;X<Z;X+=1)Array.isArray(Y[X])&&_(p,"nested arrays are not supported inside keys"),typeof Y=="object"&&C(Y[X])==="[object Object]"&&(Y[X]="[object Object]")}if(typeof Y=="object"&&C(Y)==="[object Object]"&&(Y="[object Object]"),Y=String(Y),D===null&&(D={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(it))for(let X=0,Z=it.length;X<Z;X+=1)lt(p,D,it[X],U);else lt(p,D,it,U);else!p.json&&!s.call(U,Y)&&s.call(D,Y)&&(p.line=S||p.line,p.lineStart=N||p.lineStart,p.position=et||p.position,_(p,"duplicated mapping key")),$(D,Y,it),delete U[Y];return D}g(Ct,"storeMappingPair");function _t(p){const D=p.input.charCodeAt(p.position);D===10?p.position++:D===13?(p.position++,p.input.charCodeAt(p.position)===10&&p.position++):_(p,"a line break is expected"),p.line+=1,p.lineStart=p.position,p.firstTabInLine=-1}g(_t,"readLineBreak");function G(p,D,U){let K=0,Y=p.input.charCodeAt(p.position);for(;Y!==0;){for(;k(Y);)Y===9&&p.firstTabInLine===-1&&(p.firstTabInLine=p.position),Y=p.input.charCodeAt(++p.position);if(D&&Y===35)do Y=p.input.charCodeAt(++p.position);while(Y!==10&&Y!==13&&Y!==0);if(b(Y))for(_t(p),Y=p.input.charCodeAt(p.position),K++,p.lineIndent=0;Y===32;)p.lineIndent++,Y=p.input.charCodeAt(++p.position);else break}return U!==-1&&K!==0&&p.lineIndent<U&&R(p,"deficient indentation"),K}g(G,"skipSeparationSpace");function ct(p){let D=p.position,U=p.input.charCodeAt(D);return!!((U===45||U===46)&&U===p.input.charCodeAt(D+1)&&U===p.input.charCodeAt(D+2)&&(D+=3,U=p.input.charCodeAt(D),U===0||T(U)))}g(ct,"testDocumentSeparator");function gt(p,D){D===1?p.result+=" ":D>1&&(p.result+=e.repeat(`
137
- `,D-1))}g(gt,"writeFoldedLines");function J(p,D,U){let K,Y,it,S,N,et;const X=p.kind,Z=p.result;let rt=p.input.charCodeAt(p.position);if(T(rt)||v(rt)||rt===35||rt===38||rt===42||rt===33||rt===124||rt===62||rt===39||rt===34||rt===37||rt===64||rt===96)return!1;if(rt===63||rt===45){const tt=p.input.charCodeAt(p.position+1);if(T(tt)||U&&v(tt))return!1}for(p.kind="scalar",p.result="",K=Y=p.position,it=!1;rt!==0;){if(rt===58){const tt=p.input.charCodeAt(p.position+1);if(T(tt)||U&&v(tt))break}else if(rt===35){const tt=p.input.charCodeAt(p.position-1);if(T(tt))break}else{if(p.position===p.lineStart&&ct(p)||U&&v(rt))break;if(b(rt))if(S=p.line,N=p.lineStart,et=p.lineIndent,G(p,!1,-1),p.lineIndent>=D){it=!0,rt=p.input.charCodeAt(p.position);continue}else{p.position=Y,p.line=S,p.lineStart=N,p.lineIndent=et;break}}it&&(ft(p,K,Y,!1),gt(p,p.line-S),K=Y=p.position,it=!1),k(rt)||(Y=p.position+1),rt=p.input.charCodeAt(++p.position)}return ft(p,K,Y,!1),p.result?!0:(p.kind=X,p.result=Z,!1)}g(J,"readPlainScalar");function Pt(p,D){let U,K,Y=p.input.charCodeAt(p.position);if(Y!==39)return!1;for(p.kind="scalar",p.result="",p.position++,U=K=p.position;(Y=p.input.charCodeAt(p.position))!==0;)if(Y===39)if(ft(p,U,p.position,!0),Y=p.input.charCodeAt(++p.position),Y===39)U=p.position,p.position++,K=p.position;else return!0;else b(Y)?(ft(p,U,K,!0),gt(p,G(p,!1,D)),U=K=p.position):p.position===p.lineStart&&ct(p)?_(p,"unexpected end of the document within a single quoted scalar"):(p.position++,k(Y)||(K=p.position));_(p,"unexpected end of the stream within a single quoted scalar")}g(Pt,"readSingleQuotedScalar");function At(p,D){let U,K,Y,it=p.input.charCodeAt(p.position);if(it!==34)return!1;for(p.kind="scalar",p.result="",p.position++,U=K=p.position;(it=p.input.charCodeAt(p.position))!==0;){if(it===34)return ft(p,U,p.position,!0),p.position++,!0;if(it===92){if(ft(p,U,p.position,!0),it=p.input.charCodeAt(++p.position),b(it))G(p,!1,D);else if(it<256&&q[it])p.result+=A[it],p.position++;else if((Y=F(it))>0){let S=Y,N=0;for(;S>0;S--)it=p.input.charCodeAt(++p.position),(Y=B(it))>=0?N=(N<<4)+Y:_(p,"expected hexadecimal character");p.result+=P(N),p.position++}else _(p,"unknown escape sequence");U=K=p.position}else b(it)?(ft(p,U,K,!0),gt(p,G(p,!1,D)),U=K=p.position):p.position===p.lineStart&&ct(p)?_(p,"unexpected end of the document within a double quoted scalar"):(p.position++,k(it)||(K=p.position))}_(p,"unexpected end of the stream within a double quoted scalar")}g(At,"readDoubleQuotedScalar");function Xt(p,D){let U=!0,K,Y,it;const S=p.tag;let N;const et=p.anchor;let X,Z,rt,tt;const dt=Object.create(null);let ut,kt,St,Et=p.input.charCodeAt(p.position);if(Et===91)X=93,tt=!1,N=[];else if(Et===123)X=125,tt=!0,N={};else return!1;for(p.anchor!==null&&I(p,p.anchor,N),Et=p.input.charCodeAt(++p.position);Et!==0;){if(G(p,!0,D),Et=p.input.charCodeAt(p.position),Et===X)return p.position++,p.tag=S,p.anchor=et,p.kind=tt?"mapping":"sequence",p.result=N,!0;if(U?Et===44&&_(p,"expected the node content, but found ','"):_(p,"missed comma between flow collection entries"),kt=ut=St=null,Z=rt=!1,Et===63){const Rt=p.input.charCodeAt(p.position+1);T(Rt)&&(Z=rt=!0,p.position++,G(p,!0,D))}K=p.line,Y=p.lineStart,it=p.position,Se(p,D,o,!1,!0),kt=p.tag,ut=p.result,G(p,!0,D),Et=p.input.charCodeAt(p.position),(rt||p.line===K)&&Et===58&&(Z=!0,Et=p.input.charCodeAt(++p.position),G(p,!0,D),Se(p,D,o,!1,!0),St=p.result),tt?Ct(p,N,dt,kt,ut,St,K,Y,it):Z?N.push(Ct(p,null,dt,kt,ut,St,K,Y,it)):N.push(ut),G(p,!0,D),Et=p.input.charCodeAt(p.position),Et===44?(U=!0,Et=p.input.charCodeAt(++p.position)):U=!1}_(p,"unexpected end of the stream within a flow collection")}g(Xt,"readFlowCollection");function Gt(p,D){let U,K=c,Y=!1,it=!1,S=D,N=0,et=!1,X,Z=p.input.charCodeAt(p.position);if(Z===124)U=!1;else if(Z===62)U=!0;else return!1;for(p.kind="scalar",p.result="";Z!==0;)if(Z=p.input.charCodeAt(++p.position),Z===43||Z===45)c===K?K=Z===43?u:l:_(p,"repeat of a chomping mode identifier");else if((X=M(Z))>=0)X===0?_(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):it?_(p,"repeat of an indentation width identifier"):(S=D+X-1,it=!0);else break;if(k(Z)){do Z=p.input.charCodeAt(++p.position);while(k(Z));if(Z===35)do Z=p.input.charCodeAt(++p.position);while(!b(Z)&&Z!==0)}for(;Z!==0;){for(_t(p),p.lineIndent=0,Z=p.input.charCodeAt(p.position);(!it||p.lineIndent<S)&&Z===32;)p.lineIndent++,Z=p.input.charCodeAt(++p.position);if(!it&&p.lineIndent>S&&(S=p.lineIndent),b(Z)){N++;continue}if(!it&&S===0&&_(p,"missing indentation for block scalar"),p.lineIndent<S){K===u?p.result+=e.repeat(`
138
- `,Y?1+N:N):K===c&&Y&&(p.result+=`
139
- `);break}U?k(Z)?(et=!0,p.result+=e.repeat(`
140
- `,Y?1+N:N)):et?(et=!1,p.result+=e.repeat(`
141
- `,N+1)):N===0?Y&&(p.result+=" "):p.result+=e.repeat(`
142
- `,N):p.result+=e.repeat(`
143
- `,Y?1+N:N),Y=!0,it=!0,N=0;const rt=p.position;for(;!b(Z)&&Z!==0;)Z=p.input.charCodeAt(++p.position);ft(p,rt,p.position,!1)}return!0}g(Gt,"readBlockScalar");function Kt(p,D){const U=p.tag,K=p.anchor,Y=[];let it=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&I(p,p.anchor,Y);let S=p.input.charCodeAt(p.position);for(;S!==0&&(p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,_(p,"tab characters must not be used in indentation")),S===45);){const N=p.input.charCodeAt(p.position+1);if(!T(N))break;if(it=!0,p.position++,G(p,!0,-1)&&p.lineIndent<=D){Y.push(null),S=p.input.charCodeAt(p.position);continue}const et=p.line;if(Se(p,D,n,!1,!0),Y.push(p.result),G(p,!0,-1),S=p.input.charCodeAt(p.position),(p.line===et||p.lineIndent>D)&&S!==0)_(p,"bad indentation of a sequence entry");else if(p.lineIndent<D)break}return it?(p.tag=U,p.anchor=K,p.kind="sequence",p.result=Y,!0):!1}g(Kt,"readBlockSequence");function Ue(p,D,U){let K,Y,it,S;const N=p.tag,et=p.anchor,X={},Z=Object.create(null);let rt=null,tt=null,dt=null,ut=!1,kt=!1;if(p.firstTabInLine!==-1)return!1;p.anchor!==null&&I(p,p.anchor,X);let St=p.input.charCodeAt(p.position);for(;St!==0;){!ut&&p.firstTabInLine!==-1&&(p.position=p.firstTabInLine,_(p,"tab characters must not be used in indentation"));const Et=p.input.charCodeAt(p.position+1),Rt=p.line;if((St===63||St===58)&&T(Et))St===63?(ut&&(Ct(p,X,Z,rt,tt,null,Y,it,S),rt=tt=dt=null),kt=!0,ut=!0,K=!0):ut?(ut=!1,K=!0):_(p,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),p.position+=1,St=Et;else{if(Y=p.line,it=p.lineStart,S=p.position,!Se(p,U,a,!1,!0))break;if(p.line===Rt){for(St=p.input.charCodeAt(p.position);k(St);)St=p.input.charCodeAt(++p.position);if(St===58)St=p.input.charCodeAt(++p.position),T(St)||_(p,"a whitespace character is expected after the key-value separator within a block mapping"),ut&&(Ct(p,X,Z,rt,tt,null,Y,it,S),rt=tt=dt=null),kt=!0,ut=!1,K=!1,rt=p.tag,tt=p.result;else if(kt)_(p,"can not read an implicit mapping pair; a colon is missed");else return p.tag=N,p.anchor=et,!0}else if(kt)_(p,"can not read a block mapping entry; a multiline key may not be an implicit key");else return p.tag=N,p.anchor=et,!0}if((p.line===Rt||p.lineIndent>D)&&(ut&&(Y=p.line,it=p.lineStart,S=p.position),Se(p,D,h,!0,K)&&(ut?tt=p.result:dt=p.result),ut||(Ct(p,X,Z,rt,tt,dt,Y,it,S),rt=tt=dt=null),G(p,!0,-1),St=p.input.charCodeAt(p.position)),(p.line===Rt||p.lineIndent>D)&&St!==0)_(p,"bad indentation of a mapping entry");else if(p.lineIndent<D)break}return ut&&Ct(p,X,Z,rt,tt,null,Y,it,S),kt&&(p.tag=N,p.anchor=et,p.kind="mapping",p.result=X),kt}g(Ue,"readBlockMapping");function mi(p){let D=!1,U=!1,K,Y,it=p.input.charCodeAt(p.position);if(it!==33)return!1;p.tag!==null&&_(p,"duplication of a tag property"),it=p.input.charCodeAt(++p.position),it===60?(D=!0,it=p.input.charCodeAt(++p.position)):it===33?(U=!0,K="!!",it=p.input.charCodeAt(++p.position)):K="!";let S=p.position;if(D){do it=p.input.charCodeAt(++p.position);while(it!==0&&it!==62);p.position<p.length?(Y=p.input.slice(S,p.position),it=p.input.charCodeAt(++p.position)):_(p,"unexpected end of the stream within a verbatim tag")}else{for(;it!==0&&!T(it);)it===33&&(U?_(p,"tag suffix cannot contain exclamation marks"):(K=p.input.slice(S-1,p.position+1),y.test(K)||_(p,"named tag handle cannot contain such characters"),U=!0,S=p.position+1)),it=p.input.charCodeAt(++p.position);Y=p.input.slice(S,p.position),m.test(Y)&&_(p,"tag suffix cannot contain flow indicator characters")}Y&&!x.test(Y)&&_(p,"tag name cannot contain such characters: "+Y);try{Y=decodeURIComponent(Y)}catch{_(p,"tag name is malformed: "+Y)}return D?p.tag=Y:s.call(p.tagMap,K)?p.tag=p.tagMap[K]+Y:K==="!"?p.tag="!"+Y:K==="!!"?p.tag="tag:yaml.org,2002:"+Y:_(p,'undeclared tag handle "'+K+'"'),!0}g(mi,"readTagProperty");function Pr(p){let D=p.input.charCodeAt(p.position);if(D!==38)return!1;p.anchor!==null&&_(p,"duplication of an anchor property"),D=p.input.charCodeAt(++p.position);const U=p.position;for(;D!==0&&!T(D)&&!v(D);)D=p.input.charCodeAt(++p.position);return p.position===U&&_(p,"name of an anchor node must contain at least one character"),p.anchor=p.input.slice(U,p.position),!0}g(Pr,"readAnchorProperty");function Rr(p){let D=p.input.charCodeAt(p.position);if(D!==42)return!1;D=p.input.charCodeAt(++p.position);const U=p.position;for(;D!==0&&!T(D)&&!v(D);)D=p.input.charCodeAt(++p.position);p.position===U&&_(p,"name of an alias node must contain at least one character");const K=p.input.slice(U,p.position);return s.call(p.anchorMap,K)||_(p,'unidentified alias "'+K+'"'),p.result=p.anchorMap[K],G(p,!0,-1),!0}g(Rr,"readAlias");function yi(p,D,U,K){const Y=yt(p);return Q(p),bt(p,D),p.tag=null,p.anchor=null,p.kind=null,p.result=null,Ue(p,U,K)&&p.kind==="mapping"?(j(p),!0):(pt(p),bt(p,Y),!1)}g(yi,"tryReadBlockMappingFromProperty");function Se(p,D,U,K,Y){let it,S,N=1,et=!1,X=!1,Z=null,rt,tt,dt;p.depth>=p.maxDepth&&_(p,"nesting exceeded maxDepth ("+p.maxDepth+")"),p.depth+=1,p.listener!==null&&p.listener("open",p),p.tag=null,p.anchor=null,p.kind=null,p.result=null;const ut=it=S=h===U||n===U;if(K&&G(p,!0,-1)&&(et=!0,p.lineIndent>D?N=1:p.lineIndent===D?N=0:p.lineIndent<D&&(N=-1)),N===1)for(;;){const kt=p.input.charCodeAt(p.position),St=yt(p);if(et&&(kt===33&&p.tag!==null||kt===38&&p.anchor!==null)||!mi(p)&&!Pr(p))break;Z===null&&(Z=St),G(p,!0,-1)?(et=!0,S=ut,p.lineIndent>D?N=1:p.lineIndent===D?N=0:p.lineIndent<D&&(N=-1)):S=!1}if(S&&(S=et||Y),N===1||h===U)if(o===U||a===U?tt=D:tt=D+1,dt=p.position-p.lineStart,N===1)if(S&&(Kt(p,dt)||Ue(p,dt,tt))||Xt(p,tt))X=!0;else{const kt=p.input.charCodeAt(p.position);Z!==null&&ut&&!S&&kt!==124&&kt!==62&&yi(p,Z,Z.position-Z.lineStart,tt)||it&&Gt(p,tt)||Pt(p,tt)||At(p,tt)?X=!0:Rr(p)?(X=!0,(p.tag!==null||p.anchor!==null)&&_(p,"alias node should not have any properties")):J(p,tt,o===U)&&(X=!0,p.tag===null&&(p.tag="?")),p.anchor!==null&&I(p,p.anchor,p.result)}else N===0&&(X=S&&Kt(p,dt));if(p.tag===null)p.anchor!==null&&I(p,p.anchor,p.result);else if(p.tag==="?"){p.result!==null&&p.kind!=="scalar"&&_(p,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+p.kind+'"');for(let kt=0,St=p.implicitTypes.length;kt<St;kt+=1)if(rt=p.implicitTypes[kt],rt.resolve(p.result)){p.result=rt.construct(p.result),p.tag=rt.tag,p.anchor!==null&&I(p,p.anchor,p.result);break}}else if(p.tag!=="!"){if(s.call(p.typeMap[p.kind||"fallback"],p.tag))rt=p.typeMap[p.kind||"fallback"][p.tag];else{rt=null;const kt=p.typeMap.multi[p.kind||"fallback"];for(let St=0,Et=kt.length;St<Et;St+=1)if(p.tag.slice(0,kt[St].tag.length)===kt[St].tag){rt=kt[St];break}}rt||_(p,"unknown tag !<"+p.tag+">"),p.result!==null&&rt.kind!==p.kind&&_(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+rt.kind+'", not "'+p.kind+'"'),rt.resolve(p.result,p.tag)?(p.result=rt.construct(p.result,p.tag),p.anchor!==null&&I(p,p.anchor,p.result)):_(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.depth-=1,p.tag!==null||p.anchor!==null||X}g(Se,"composeNode");function xi(p){const D=p.position;let U=!1,K;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(K=p.input.charCodeAt(p.position))!==0&&(G(p,!0,-1),K=p.input.charCodeAt(p.position),!(p.lineIndent>0||K!==37));){U=!0,K=p.input.charCodeAt(++p.position);let Y=p.position;for(;K!==0&&!T(K);)K=p.input.charCodeAt(++p.position);const it=p.input.slice(Y,p.position),S=[];for(it.length<1&&_(p,"directive name must not be less than one character in length");K!==0;){for(;k(K);)K=p.input.charCodeAt(++p.position);if(K===35){do K=p.input.charCodeAt(++p.position);while(K!==0&&!b(K));break}if(b(K))break;for(Y=p.position;K!==0&&!T(K);)K=p.input.charCodeAt(++p.position);S.push(p.input.slice(Y,p.position))}K!==0&&_t(p),s.call(wt,it)?wt[it](p,it,S):R(p,'unknown document directive "'+it+'"')}if(G(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,G(p,!0,-1)):U&&_(p,"directives end mark is expected"),Se(p,p.lineIndent-1,h,!1,!0),G(p,!0,-1),p.checkLineBreaks&&f.test(p.input.slice(D,p.position))&&R(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&ct(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,G(p,!0,-1));return}p.position<p.length-1&&_(p,"end of the stream or a document separator is expected")}g(xi,"readDocument");function qr(p,D){p=String(p),D=D||{},p.length!==0&&(p.charCodeAt(p.length-1)!==10&&p.charCodeAt(p.length-1)!==13&&(p+=`
144
- `),p.charCodeAt(0)===65279&&(p=p.slice(1)));const U=new L(p,D),K=p.indexOf("\0");for(K!==-1&&(U.position=K,_(U,"null byte is not allowed in input")),U.input+="\0";U.input.charCodeAt(U.position)===32;)U.lineIndent+=1,U.position+=1;for(;U.position<U.length-1;)xi(U);return U.documents}g(qr,"loadDocuments");function Nr(p,D,U){D!==null&&typeof D=="object"&&typeof U>"u"&&(U=D,D=null);const K=qr(p,U);if(typeof D!="function")return K;for(let Y=0,it=K.length;Y<it;Y+=1)D(K[Y])}g(Nr,"loadAll2");function Ci(p,D){const U=qr(p,D);if(U.length!==0){if(U.length===1)return U[0];throw new t("expected a single document in the stream, but found more")}}return g(Ci,"load2"),Ss.loadAll=Nr,Ss.load=Ci,Ss}g(Ef,"requireLoader");var Ra={},Rc;function $f(){if(Rc)return Ra;Rc=1;const e=ui(),t=di(),r=Uo(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,h=13,c=32,l=33,u=34,d=35,f=37,m=38,y=39,x=42,C=44,b=45,k=58,T=61,v=62,B=63,F=64,M=91,W=93,P=96,$=123,q=124,A=125,L={};L[0]="\\0",L[7]="\\a",L[8]="\\b",L[9]="\\t",L[10]="\\n",L[11]="\\v",L[12]="\\f",L[13]="\\r",L[27]="\\e",L[34]='\\"',L[92]="\\\\",L[133]="\\N",L[160]="\\_",L[8232]="\\L",L[8233]="\\P";const E=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(S,N){if(N===null)return{};const et={},X=Object.keys(N);for(let Z=0,rt=X.length;Z<rt;Z+=1){let tt=X[Z],dt=String(N[tt]);tt.slice(0,2)==="!!"&&(tt="tag:yaml.org,2002:"+tt.slice(2));const ut=S.compiledTypeMap.fallback[tt];ut&&s.call(ut.styleAliases,dt)&&(dt=ut.styleAliases[dt]),et[tt]=dt}return et}g(R,"compileStyleMap");function I(S){let N,et;const X=S.toString(16).toUpperCase();if(S<=255)N="x",et=2;else if(S<=65535)N="u",et=4;else if(S<=4294967295)N="U",et=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+N+e.repeat("0",et-X.length)+X}g(I,"encodeHex");const Q=1,j=2;function pt(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=R(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==='"'?j:Q,this.forceQuotes=S.forceQuotes||!1,this.replacer=typeof S.replacer=="function"?S.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(pt,"State");function yt(S,N){const et=e.repeat(" ",N);let X=0,Z="";const rt=S.length;for(;X<rt;){let tt;const dt=S.indexOf(`
145
- `,X);dt===-1?(tt=S.slice(X),X=rt):(tt=S.slice(X,dt+1),X=dt+1),tt.length&&tt!==`
146
- `&&(Z+=et),Z+=tt}return Z}g(yt,"indentString");function bt(S,N){return`
147
- `+e.repeat(" ",S.indent*N)}g(bt,"generateNextLine");function wt(S,N){for(let et=0,X=S.implicitTypes.length;et<X;et+=1)if(S.implicitTypes[et].resolve(N))return!0;return!1}g(wt,"testImplicitResolving");function ft(S){return S===c||S===a}g(ft,"isWhitespace");function lt(S){return S>=32&&S<=126||S>=161&&S<=55295&&S!==8232&&S!==8233||S>=57344&&S<=65533&&S!==o||S>=65536&&S<=1114111}g(lt,"isPrintable");function Ct(S){return lt(S)&&S!==o&&S!==h&&S!==n}g(Ct,"isNsCharOrWhitespace");function _t(S,N,et){const X=Ct(S),Z=X&&!ft(S);return(et?X:X&&S!==C&&S!==M&&S!==W&&S!==$&&S!==A)&&S!==d&&!(N===k&&!Z)||Ct(N)&&!ft(N)&&S===d||N===k&&Z}g(_t,"isPlainSafe");function G(S){return lt(S)&&S!==o&&!ft(S)&&S!==b&&S!==B&&S!==k&&S!==C&&S!==M&&S!==W&&S!==$&&S!==A&&S!==d&&S!==m&&S!==x&&S!==l&&S!==q&&S!==T&&S!==v&&S!==y&&S!==u&&S!==f&&S!==F&&S!==P}g(G,"isPlainSafeFirst");function ct(S){return!ft(S)&&S!==k}g(ct,"isPlainSafeLast");function gt(S,N){const et=S.charCodeAt(N);let X;return et>=55296&&et<=56319&&N+1<S.length&&(X=S.charCodeAt(N+1),X>=56320&&X<=57343)?(et-55296)*1024+X-56320+65536:et}g(gt,"codePointAt");function J(S){return/^\n* /.test(S)}g(J,"needIndentIndicator");const Pt=1,At=2,Xt=3,Gt=4,Kt=5;function Ue(S,N,et,X,Z,rt,tt,dt){let ut,kt=0,St=null,Et=!1,Rt=!1;const xh=X!==-1;let bi=-1,ki=G(gt(S,0))&&ct(gt(S,S.length-1));if(N||tt)for(ut=0;ut<S.length;kt>=65536?ut+=2:ut++){if(kt=gt(S,ut),!lt(kt))return Kt;ki=ki&&_t(kt,St,dt),St=kt}else{for(ut=0;ut<S.length;kt>=65536?ut+=2:ut++){if(kt=gt(S,ut),kt===n)Et=!0,xh&&(Rt=Rt||ut-bi-1>X&&S[bi+1]!==" ",bi=ut);else if(!lt(kt))return Kt;ki=ki&&_t(kt,St,dt),St=kt}Rt=Rt||xh&&ut-bi-1>X&&S[bi+1]!==" "}return!Et&&!Rt?ki&&!tt&&!Z(S)?Pt:rt===j?Kt:At:et>9&&J(S)?Kt:tt?rt===j?Kt:At:Rt?Gt:Xt}g(Ue,"chooseScalarStyle");function mi(S,N,et,X,Z){S.dump=(function(){if(N.length===0)return S.quotingType===j?'""':"''";if(!S.noCompatMode&&(E.indexOf(N)!==-1||_.test(N)))return S.quotingType===j?'"'+N+'"':"'"+N+"'";const rt=S.indent*Math.max(1,et),tt=S.lineWidth===-1?-1:Math.max(Math.min(S.lineWidth,40),S.lineWidth-rt),dt=X||S.flowLevel>-1&&et>=S.flowLevel;function ut(kt){return wt(S,kt)}switch(g(ut,"testAmbiguity"),Ue(N,dt,S.indent,tt,ut,S.quotingType,S.forceQuotes&&!X,Z)){case Pt:return N;case At:return"'"+N.replace(/'/g,"''")+"'";case Xt:return"|"+Pr(N,S.indent)+Rr(yt(N,rt));case Gt:return">"+Pr(N,S.indent)+Rr(yt(yi(N,tt),rt));case Kt:return'"'+xi(N)+'"';default:throw new t("impossible error: invalid scalar style")}})()}g(mi,"writeScalar");function Pr(S,N){const et=J(S)?String(N):"",X=S[S.length-1]===`
148
- `,rt=X&&(S[S.length-2]===`
149
- `||S===`
150
- `)?"+":X?"":"-";return et+rt+`
151
- `}g(Pr,"blockHeader");function Rr(S){return S[S.length-1]===`
152
- `?S.slice(0,-1):S}g(Rr,"dropEndingNewline");function yi(S,N){const et=/(\n+)([^\n]*)/g;let X=(function(){let dt=S.indexOf(`
153
- `);return dt=dt!==-1?dt:S.length,et.lastIndex=dt,Se(S.slice(0,dt),N)})(),Z=S[0]===`
154
- `||S[0]===" ",rt,tt;for(;tt=et.exec(S);){const dt=tt[1],ut=tt[2];rt=ut[0]===" ",X+=dt+(!Z&&!rt&&ut!==""?`
155
- `:"")+Se(ut,N),Z=rt}return X}g(yi,"foldString");function Se(S,N){if(S===""||S[0]===" ")return S;const et=/ [^ ]/g;let X,Z=0,rt,tt=0,dt=0,ut="";for(;X=et.exec(S);)dt=X.index,dt-Z>N&&(rt=tt>Z?tt:dt,ut+=`
156
- `+S.slice(Z,rt),Z=rt+1),tt=dt;return ut+=`
157
- `,S.length-Z>N&&tt>Z?ut+=S.slice(Z,tt)+`
158
- `+S.slice(tt+1):ut+=S.slice(Z),ut.slice(1)}g(Se,"foldLine");function xi(S){let N="",et=0;for(let X=0;X<S.length;et>=65536?X+=2:X++){et=gt(S,X);const Z=L[et];!Z&&lt(et)?(N+=S[X],et>=65536&&(N+=S[X+1])):N+=Z||I(et)}return N}g(xi,"escapeString");function qr(S,N,et){let X="";const Z=S.tag;for(let rt=0,tt=et.length;rt<tt;rt+=1){let dt=et[rt];S.replacer&&(dt=S.replacer.call(et,String(rt),dt)),(U(S,N,dt,!1,!1)||typeof dt>"u"&&U(S,N,null,!1,!1))&&(X!==""&&(X+=","+(S.condenseFlow?"":" ")),X+=S.dump)}S.tag=Z,S.dump="["+X+"]"}g(qr,"writeFlowSequence");function Nr(S,N,et,X){let Z="";const rt=S.tag;for(let tt=0,dt=et.length;tt<dt;tt+=1){let ut=et[tt];S.replacer&&(ut=S.replacer.call(et,String(tt),ut)),(U(S,N+1,ut,!0,!0,!1,!0)||typeof ut>"u"&&U(S,N+1,null,!0,!0,!1,!0))&&((!X||Z!=="")&&(Z+=bt(S,N)),S.dump&&n===S.dump.charCodeAt(0)?Z+="-":Z+="- ",Z+=S.dump)}S.tag=rt,S.dump=Z||"[]"}g(Nr,"writeBlockSequence");function Ci(S,N,et){let X="";const Z=S.tag,rt=Object.keys(et);for(let tt=0,dt=rt.length;tt<dt;tt+=1){let ut="";X!==""&&(ut+=", "),S.condenseFlow&&(ut+='"');const kt=rt[tt];let St=et[kt];S.replacer&&(St=S.replacer.call(et,kt,St)),U(S,N,kt,!1,!1)&&(S.dump.length>1024&&(ut+="? "),ut+=S.dump+(S.condenseFlow?'"':"")+":"+(S.condenseFlow?"":" "),U(S,N,St,!1,!1)&&(ut+=S.dump,X+=ut))}S.tag=Z,S.dump="{"+X+"}"}g(Ci,"writeFlowMapping");function p(S,N,et,X){let Z="";const rt=S.tag,tt=Object.keys(et);if(S.sortKeys===!0)tt.sort();else if(typeof S.sortKeys=="function")tt.sort(S.sortKeys);else if(S.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let dt=0,ut=tt.length;dt<ut;dt+=1){let kt="";(!X||Z!=="")&&(kt+=bt(S,N));const St=tt[dt];let Et=et[St];if(S.replacer&&(Et=S.replacer.call(et,St,Et)),!U(S,N+1,St,!0,!0,!0))continue;const Rt=S.tag!==null&&S.tag!=="?"||S.dump&&S.dump.length>1024;Rt&&(S.dump&&n===S.dump.charCodeAt(0)?kt+="?":kt+="? "),kt+=S.dump,Rt&&(kt+=bt(S,N)),U(S,N+1,Et,!0,Rt)&&(S.dump&&n===S.dump.charCodeAt(0)?kt+=":":kt+=": ",kt+=S.dump,Z+=kt)}S.tag=rt,S.dump=Z||"{}"}g(p,"writeBlockMapping");function D(S,N,et){const X=et?S.explicitTypes:S.implicitTypes;for(let Z=0,rt=X.length;Z<rt;Z+=1){const tt=X[Z];if((tt.instanceOf||tt.predicate)&&(!tt.instanceOf||typeof N=="object"&&N instanceof tt.instanceOf)&&(!tt.predicate||tt.predicate(N))){if(et?tt.multi&&tt.representName?S.tag=tt.representName(N):S.tag=tt.tag:S.tag="?",tt.represent){const dt=S.styleMap[tt.tag]||tt.defaultStyle;let ut;if(i.call(tt.represent)==="[object Function]")ut=tt.represent(N,dt);else if(s.call(tt.represent,dt))ut=tt.represent[dt](N,dt);else throw new t("!<"+tt.tag+'> tag resolver accepts not "'+dt+'" style');S.dump=ut}return!0}}return!1}g(D,"detectType");function U(S,N,et,X,Z,rt,tt){S.tag=null,S.dump=et,D(S,et,!1)||D(S,et,!0);const dt=i.call(S.dump),ut=X;X&&(X=S.flowLevel<0||S.flowLevel>N);const kt=dt==="[object Object]"||dt==="[object Array]";let St,Et;if(kt&&(St=S.duplicates.indexOf(et),Et=St!==-1),(S.tag!==null&&S.tag!=="?"||Et||S.indent!==2&&N>0)&&(Z=!1),Et&&S.usedDuplicates[St])S.dump="*ref_"+St;else{if(kt&&Et&&!S.usedDuplicates[St]&&(S.usedDuplicates[St]=!0),dt==="[object Object]")X&&Object.keys(S.dump).length!==0?(p(S,N,S.dump,Z),Et&&(S.dump="&ref_"+St+S.dump)):(Ci(S,N,S.dump),Et&&(S.dump="&ref_"+St+" "+S.dump));else if(dt==="[object Array]")X&&S.dump.length!==0?(S.noArrayIndent&&!tt&&N>0?Nr(S,N-1,S.dump,Z):Nr(S,N,S.dump,Z),Et&&(S.dump="&ref_"+St+S.dump)):(qr(S,N,S.dump),Et&&(S.dump="&ref_"+St+" "+S.dump));else if(dt==="[object String]")S.tag!=="?"&&mi(S,S.dump,N,rt,ut);else{if(dt==="[object Undefined]")return!1;if(S.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+dt)}if(S.tag!==null&&S.tag!=="?"){let Rt=encodeURI(S.tag[0]==="!"?S.tag.slice(1):S.tag).replace(/!/g,"%21");S.tag[0]==="!"?Rt="!"+Rt:Rt.slice(0,18)==="tag:yaml.org,2002:"?Rt="!!"+Rt.slice(18):Rt="!<"+Rt+">",S.dump=Rt+" "+S.dump}}return!0}g(U,"writeNode");function K(S,N){const et=[],X=[];Y(S,et,X);const Z=X.length;for(let rt=0;rt<Z;rt+=1)N.duplicates.push(et[X[rt]]);N.usedDuplicates=new Array(Z)}g(K,"getDuplicateReferences");function Y(S,N,et){if(S!==null&&typeof S=="object"){const X=N.indexOf(S);if(X!==-1)et.indexOf(X)===-1&&et.push(X);else if(N.push(S),Array.isArray(S))for(let Z=0,rt=S.length;Z<rt;Z+=1)Y(S[Z],N,et);else{const Z=Object.keys(S);for(let rt=0,tt=Z.length;rt<tt;rt+=1)Y(S[Z[rt]],N,et)}}}g(Y,"inspectNode");function it(S,N){N=N||{};const et=new pt(N);et.noRefs||K(S,et);let X=S;return et.replacer&&(X=et.replacer.call({"":X},"",X)),U(et,0,X,!0,!0)?et.dump+`
159
- `:""}return g(it,"dump2"),Ra.dump=it,Ra}g($f,"requireDumper");var qc;function Of(){if(qc)return ie;qc=1;const e=Ef(),t=$f();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return g(r,"renamed"),ie.Type=le(),ie.Schema=bl(),ie.FAILSAFE_SCHEMA=Tl(),ie.JSON_SCHEMA=Fl(),ie.CORE_SCHEMA=Ml(),ie.DEFAULT_SCHEMA=Uo(),ie.load=e.load,ie.loadAll=e.loadAll,ie.dump=t.dump,ie.YAMLException=di(),ie.types={binary:$l(),float:Ll(),map:Sl(),null:Bl(),pairs:Dl(),set:Il(),timestamp:Al(),bool:vl(),int:_l(),merge:El(),omap:Ol(),seq:wl(),str:kl()},ie.safeLoad=r("safeLoad","load"),ie.safeLoadAll=r("safeLoadAll","loadAll"),ie.safeDump=r("safeDump","dump"),ie}g(Of,"requireJsYaml");var jw=Of(),Xw=Mf(jw),{Type:d5,Schema:f5,FAILSAFE_SCHEMA:g5,JSON_SCHEMA:Gw,CORE_SCHEMA:p5,DEFAULT_SCHEMA:m5,load:Vw,loadAll:y5,dump:x5,YAMLException:C5,types:b5,safeLoad:k5,safeLoadAll:w5,safeDump:S5}=Xw,Zw=g((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:o,gradientStop:a}=i??{},n=e.attr("id"),h=r?.includes("dark")?"#FFFFFF":"#000000",c=g((u,d,f)=>e.append("defs").append("filter").attr("id",u).attr("height",d).attr("width",d).append("feDropShadow").attr("dx",f).attr("dy",f).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",h),"dropShadow");if(c(`${n}-drop-shadow`,"130%","4"),c(`${n}-drop-shadow-small`,"150%","2"),!s)return;const l=e.append("linearGradient").attr("id",`${n}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");l.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",a).attr("stop-opacity",1)},"insertLookDefs"),Kw=g(e=>{const{handDrawnSeed:t}=Ft();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Qw=g(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),yr=g(e=>{const t=Jw([...e.cssCompiledStyles||[],...e.cssStyles||[],...Qw(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Jw=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),Df=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),nt=g(e=>{const{stylesArray:t}=yr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Df(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),ot=g((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=Ft(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=yr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:tS(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),tS=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const eS=Object.freeze({left:0,top:0,width:16,height:16}),wo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),If=Object.freeze({...eS,...wo}),rS=Object.freeze({...If,body:"",hidden:!1}),iS=Object.freeze({width:null,height:null}),sS=Object.freeze({...iS,...wo}),oS=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),h=s.pop(),c={provider:s.length>0?s[0]:i,prefix:h,name:n};return qa(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return qa(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return qa(n,r)?n:null}return null},qa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function aS(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 Nc(e,t){const r=aS(e,t);for(const i in rS)i in wo?i in e&&!(i in r)&&(r[i]=wo[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function nS(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,h=n&&o(n);h&&(s[a]=[n].concat(h))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function Wc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Nc(i[n]||s[n],o)}return a(t),r.forEach(a),Nc(e,o)}function lS(e,t){if(e.icons[t])return Wc(e,t,[]);const r=nS(e,[t])[t];return r?Wc(e,t,r):null}const hS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,cS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zc(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(hS);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=cS.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function uS(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function dS(e,t){return e?"<defs>"+e+"</defs>"+t:t}function fS(e,t,r){const i=uS(e);return dS(i.defs,t+i.content+r)}const gS=e=>e==="unset"||e==="undefined"||e==="none";function pS(e,t){const r={...If,...e},i={...sS,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=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(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){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()+")")}k%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&&(o=fS(o,'<g transform="'+x.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,h=s.width,c=s.height;let l,u;a===null?(u=n===null?"1em":n==="auto"?c:n,l=zc(u,h/c)):(l=a==="auto"?h:a,u=n===null?zc(l,c/h):n==="auto"?c:n);const d={},f=(y,x)=>{gS(x)||(d[y]=x.toString())};f("width",l),f("height",u);const m=[s.left,s.top,h,c];return d.viewBox=m.join(" "),{attributes:d,viewBox:m,body:o}}const mS=/\sid="(\S+)"/g,Hc=new Map;function yS(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Hc.get(e)||0;return Hc.set(e,t+1),t?`${e}${t}`:e}function xS(e){const t=[];let r;for(;r=mS.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 o=yS(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function CS(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 bS={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},Bn=new Map,Pf=new Map,kS=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(V.debug("Registering icon pack:",t.name),"loader"in t)Pf.set(t.name,t.loader);else if("icons"in t)Bn.set(t.name,t.icons);else throw V.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Rf=g(async(e,t)=>{const r=oS(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=Bn.get(i);if(!s){const a=Pf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Bn.set(i,s)}catch(n){throw V.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=lS(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),qf=g(async e=>{try{return await Rf(e),!0}catch{return!1}},"isIconAvailable"),fi=g(async(e,t,r)=>{let i;try{i=await Rf(e,t?.fallbackPrefix)}catch(a){V.error(a),i=bS}const s=pS(i,t),o=CS(xS(s.body),{...s.attributes,...r});return be(o,Nt())},"getIconSVG"),Ts={},Vt={},Yc;function wS(){return Yc||(Yc=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.BLANK_URL=Vt.relativeFirstCharacters=Vt.whitespaceEscapeCharsRegex=Vt.urlSchemeRegex=Vt.ctrlCharactersRegex=Vt.htmlCtrlEntityRegex=Vt.htmlEntitiesRegex=Vt.invalidProtocolRegex=void 0,Vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Vt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Vt.urlSchemeRegex=/^.+(:|&colon;)/gim,Vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Vt.relativeFirstCharacters=[".","/"],Vt.BLANK_URL="about:blank"),Vt}var Uc;function SS(){if(Uc)return Ts;Uc=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.sanitizeUrl=o;var e=wS();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(h,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,h=s(a.trim());do h=r(h).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),h=s(h),n=h.match(e.ctrlCharactersRegex)||h.match(e.htmlEntitiesRegex)||h.match(e.htmlCtrlEntityRegex)||h.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=h;if(!c)return e.BLANK_URL;if(t(c))return c;var l=c.trimStart(),u=l.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=l.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var m=new URL(f);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return f}return Ts}var TS=SS();function BS(e){return Array.isArray(e)}function Na(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function vS(){}function Nf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function us(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Wf="[object RegExp]",Pl="[object String]",Rl="[object Number]",ql="[object Boolean]",Nl="[object Arguments]",zf="[object Symbol]",Hf="[object Date]",Yf="[object Map]",Uf="[object Set]",jf="[object Array]",Xf="[object ArrayBuffer]",Gf="[object Object]",Vf="[object DataView]",Zf="[object Uint8Array]",Kf="[object Uint8ClampedArray]",Qf="[object Uint16Array]",Jf="[object Uint32Array]",tg="[object Int8Array]",eg="[object Int16Array]",rg="[object Int32Array]",ig="[object Float32Array]",sg="[object Float64Array]",jc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Wl(e){return typeof jc.Buffer<"u"&&jc.Buffer.isBuffer(e)}function _S(e){return Number.isSafeInteger(e)&&e>=0}function og(e){return e!=null&&typeof e!="function"&&_S(e.length)}function LS(e){return e==="__proto__"}function jo(e){return e==null||typeof e!="object"&&typeof e!="function"}function zl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FS(e,t){return Kr(e,void 0,e,new Map,t)}function Kr(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(jo(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Kr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,h]of e)a.set(n,Kr(h,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Kr(n,void 0,r,i,s));return a}if(Wl(e))return e.subarray();if(zl(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Kr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),Te(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),Te(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),Te(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,Te(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),Te(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),Te(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),Te(a,e,r,i,s),a}if(typeof e=="object"&&MS(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),Te(a,e,r,i,s),a}return e}function Te(e,t,r=e,i,s){const o=[...Object.keys(t),...Nf(t)];for(let a=0;a<o.length;a++){const n=o[a],h=Object.getOwnPropertyDescriptor(e,n);(h==null||h.writable)&&(e[n]=Kr(t[n],n,r,i,s))}}function MS(e){switch(us(e)){case Nl:case jf:case Xf:case Vf:case ql:case Hf:case ig:case sg:case tg:case eg:case rg:case Yf:case Rl:case Gf:case Wf:case Uf:case Pl:case zf:case Zf:case Kf:case Qf:case Jf:return!0;default:return!1}}function AS(e,t){return FS(e,(r,i,s,o)=>{if(typeof e=="object"){if(us(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),Te(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Rl:case Pl:case ql:{const a=new e.constructor(e?.valueOf());return Te(a,e),a}case Nl:{const a={};return Te(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Xc(e){return AS(e)}function vn(e){return e!==null&&typeof e=="object"&&us(e)==="[object Arguments]"}function _n(e){return typeof e=="object"&&e!==null}function ES(e){return _n(e)&&og(e)}function Zi(e){return zl(e)}function $S(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function ds(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],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ds.Cache||Map),r}ds.Cache=Map;function T5(e){if(jo(e))return e;const t=us(e);if(!OS(e))return{};if(BS(e)){const i=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(i.index=e.index,i.input=e.input),i}if(Zi(e)){const i=e,s=i.constructor;return new s(i.buffer,i.byteOffset,i.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const i=e,s=i.buffer,o=i.byteOffset,a=i.byteLength,n=new ArrayBuffer(a),h=new Uint8Array(s,o,a);return new Uint8Array(n).set(h),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const i=e.constructor,s=new i(e.valueOf());return t==="[object String]"?IS(s,e):Wa(s,e),s}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const i=e,s=new RegExp(i.source,i.flags);return s.lastIndex=i.lastIndex,s}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const i=e,s=new Map;return i.forEach((o,a)=>{s.set(a,o)}),s}if(t==="[object Set]"){const i=e,s=new Set;return i.forEach(o=>{s.add(o)}),s}if(t==="[object Arguments]"){const i=e,s={};return Wa(s,i),s.length=i.length,s[Symbol.iterator]=i[Symbol.iterator],s}const r={};return PS(r,e),Wa(r,e),DS(r,e),r}function OS(e){switch(us(e)){case Nl:case jf:case Xf:case Vf:case ql:case Hf:case ig:case sg:case tg:case eg:case rg:case Yf:case Rl:case Gf:case Wf:case Uf:case Pl:case zf:case Zf:case Kf:case Qf:case Jf:return!0;default:return!1}}function Wa(e,t){for(const r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function DS(e,t){const r=Object.getOwnPropertySymbols(t);for(let i=0;i<r.length;i++){const s=r[i];Object.prototype.propertyIsEnumerable.call(t,s)&&(e[s]=t[s])}}function IS(e,t){const r=t.valueOf().length;for(const i in t)Object.hasOwn(t,i)&&(Number.isNaN(Number(i))||Number(i)>=r)&&(e[i]=t[i])}function PS(e,t){const r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}function RS(e){if(jo(e))return e;if(Array.isArray(e)||zl(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function qS(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=Hs(s,a,i,new Map)}return s}function Hs(e,t,r,i){if(jo(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return RS(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)o in t||(t[o]=void 0)}const s=[...Object.keys(t),...Nf(t)];for(let o=0;o<s.length;o++){const a=s[o];if(LS(a))continue;let n=t[a],h=e[a];if(vn(n)&&(n={...n}),vn(h)&&(h={...h}),Wl(n)&&(n=Xc(n)),Array.isArray(n))if(Array.isArray(h)){const l=[],u=Reflect.ownKeys(h);for(let d=0;d<u.length;d++){const f=u[d];l[f]=h[f]}h=l}else if(ES(h)){const l=[];for(let u=0;u<h.length;u++)l[u]=h[u];h=l}else h=[];const c=r(h,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||_n(h)&&_n(n)&&(Na(h)||Na(n)||Zi(h)||Zi(n))?e[a]=Hs(h,n,r,i):h==null&&Na(n)?e[a]=Hs({},n,r,i):h==null&&Zi(n)?e[a]=Xc(n):(h===void 0||n!==void 0)&&(e[a]=n)}return e}function NS(e,...t){return qS(e,...t,vS)}function Gc(e){if(e==null)return!0;if(og(e))return typeof e.splice!="function"&&typeof e!="string"&&!Wl(e)&&!Zi(e)&&!vn(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 $S(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var WS="​",zS={curveBasis:Tn,curveBasisClosed:Pw,curveBasisOpen:Rw,curveBumpX:cf,curveBumpY:uf,curveBundle:qw,curveCardinalClosed:Nw,curveCardinalOpen:Ww,curveCardinal:pf,curveCatmullRomClosed:zw,curveCatmullRomOpen:Hw,curveCatmullRom:yf,curveLinear:Vi,curveLinearClosed:Yw,curveMonotoneX:Sf,curveMonotoneY:Tf,curveNatural:vf,curveStep:_f,curveStepAfter:Ff,curveStepBefore:Lf},HS=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,YS=g(function(e,t){const r=ag(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Vs(a),i=Ut(i,[...a])}else i=r.args;if(!i)return;let s=Do(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),ag=g(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${HS.source})(?=[}][%]{2}).*
160
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),V.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=Ui.exec(e))!==null;)if(i.index===Ui.lastIndex&&Ui.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return V.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),US=g(function(e){return e.replace(Ui,"")},"removeDirectives"),jS=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Hl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return zS[r]??t}g(Hl,"interpolateToCurve");function ng(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?TS.sanitizeUrl(r):r}g(ng,"formatUrl");var XS=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){V.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Yl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(Yl,"distance");function lg(e){let t,r=0;e.forEach(s=>{r+=Yl(s,t),t=s});const i=r/2;return Ul(e,i)}g(lg,"traverseEdge");function hg(e){return e.length===1?e[0]:lg(e)}g(hg,"calcLabelPosition");var Vc=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ul=g((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Yl(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Vc((1-a)*r.x+a*s.x,5),y:Vc((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),GS=g((e,t,r)=>{V.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Ul(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function cg(e,t,r){const i=structuredClone(r);V.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Ul(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),h={x:0,y:0};return t==="start_left"?(h.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,h.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(h.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2,h.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2):(h.x=Math.sin(n)*a+(i[0].x+o.x)/2,h.y=-Math.cos(n)*a+(i[0].y+o.y)/2),h}g(cg,"calcTerminalLabelPosition");function ug(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(ug,"getStylesFromArray");var Zc=0,VS=g(()=>(Zc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Zc),"generateId");function dg(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(dg,"makeRandomHex");var ZS=g(e=>dg(e.length),"random"),KS=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),QS=g(function(e,t){const r=t.text.replace(ns.lineBreakRegex," "),[,i]=Xo(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 o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),JS=ds((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ns.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const h=or(`${a} `,r),c=or(o,r);if(h>t){const{hyphenatedStrings:d,remainingWord:f}=tT(a,t,"-",r);s.push(o,...d),o=f}else c+h>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),tT=ds((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,h)=>{const c=`${a}${n}`;if(or(c,i)>=t){const u=h+1,d=s.length===u,f=`${c}${r}`;o.push(d?c:f),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function fg(e,t){return jl(e,t).height}g(fg,"calculateTextHeight");function or(e,t){return jl(e,t).width}g(or,"calculateTextWidth");var jl=ds((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Xo(r),a=["sans-serif",i],n=e.split(ns.lineBreakRegex),h=[],c=Lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const l=c.append("svg");for(const d of a){let f=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const x=KS();x.text=y||WS;const C=QS(l,x).style("font-size",o).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");m.width=Math.round(Math.max(m.width,b.width)),f=Math.round(b.height),m.height+=f,m.lineHeight=Math.round(Math.max(m.lineHeight,f))}h.push(m)}l.remove();const u=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),eT=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{g(this,"InitIDGenerator")}},Bs,rT=g(function(e){return Bs=Bs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Bs.innerHTML=e,unescape(Bs.textContent)},"entityDecode");function Xl(e){return"str"in e}g(Xl,"isDetailedError");function gg(e){return e instanceof Error?e.message:String(e)}g(gg,"getErrorMessage");var iT=g((e,t,r,i)=>{if(!i)return;const s=e.node()?.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"),Xo=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Gl(e,t){return NS({},e,t)}g(Gl,"cleanAndMerge");var Ce={assignWithDepth:Ut,wrapLabel:JS,calculateTextHeight:fg,calculateTextWidth:or,calculateTextDimensions:jl,cleanAndMerge:Gl,detectInit:YS,detectDirective:ag,isSubstringInArray:jS,interpolateToCurve:Hl,calcLabelPosition:hg,calcCardinalityPosition:GS,calcTerminalLabelPosition:cg,formatUrl:ng,getStylesFromArray:ug,generateId:VS,random:ZS,runFunc:XS,entityDecode:rT,insertTitle:iT,isLabelCoordinateInPath:pg,parseFontSize:Xo,InitIDGenerator:eT},sT=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),gr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),B5=g((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function jt(e){return e??null}g(jt,"handleUndefinedAttr");function pg(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(pg,"isLabelCoordinateInPath");function Vl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ir=Vl();function mg(e){Ir=e}var Ki={exec:()=>null};function Dt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(ce.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var oT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ce={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")},aT=/^(?:[ \t]*(?:\n|$))+/,nT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lT=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zl=/(?:[*+-]|\d{1,9}[.)])/,yg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,xg=Dt(yg).replace(/bull/g,Zl).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(),cT=Dt(yg).replace(/bull/g,Zl).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(),Kl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,uT=/^[^\n]+/,Ql=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dT=Dt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ql).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fT=Dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zl).getRegex(),Go="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",Jl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gT=Dt("^ {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",Jl).replace("tag",Go).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Cg=Dt(Kl).replace("hr",fs).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",Go).getRegex(),pT=Dt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Cg).getRegex(),th={blockquote:pT,code:nT,def:dT,fences:lT,heading:hT,hr:fs,html:gT,lheading:xg,list:fT,newline:aT,paragraph:Cg,table:Ki,text:uT},Kc=Dt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fs).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",Go).getRegex(),mT={...th,lheading:cT,table:Kc,paragraph:Dt(Kl).replace("hr",fs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kc).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",Go).getRegex()},yT={...th,html:Dt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Jl).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:Ki,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Dt(Kl).replace("hr",fs).replace("heading",` *#{1,6} *[^
161
- ]`).replace("lheading",xg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,CT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bg=/^( {2,}|\\)\n(?!\s*$)/,bT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vo=/[\p{P}\p{S}]/u,eh=/[\s\p{P}\p{S}]/u,kg=/[^\s\p{P}\p{S}]/u,kT=Dt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,eh).getRegex(),wg=/(?!~)[\p{P}\p{S}]/u,wT=/(?!~)[\s\p{P}\p{S}]/u,ST=/(?:[^\s\p{P}\p{S}]|~)/u,TT=Dt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",oT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Sg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,BT=Dt(Sg,"u").replace(/punct/g,Vo).getRegex(),vT=Dt(Sg,"u").replace(/punct/g,wg).getRegex(),Tg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_T=Dt(Tg,"gu").replace(/notPunctSpace/g,kg).replace(/punctSpace/g,eh).replace(/punct/g,Vo).getRegex(),LT=Dt(Tg,"gu").replace(/notPunctSpace/g,ST).replace(/punctSpace/g,wT).replace(/punct/g,wg).getRegex(),FT=Dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,kg).replace(/punctSpace/g,eh).replace(/punct/g,Vo).getRegex(),MT=Dt(/\\(punct)/,"gu").replace(/punct/g,Vo).getRegex(),AT=Dt(/^<(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(),ET=Dt(Jl).replace("(?:-->|$)","-->").getRegex(),$T=Dt("^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",ET).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),So=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,OT=Dt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",So).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Bg=Dt(/^!?\[(label)\]\[(ref)\]/).replace("label",So).replace("ref",Ql).getRegex(),vg=Dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ql).getRegex(),DT=Dt("reflink|nolink(?!\\()","g").replace("reflink",Bg).replace("nolink",vg).getRegex(),Qc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,rh={_backpedal:Ki,anyPunctuation:MT,autolink:AT,blockSkip:TT,br:bg,code:CT,del:Ki,emStrongLDelim:BT,emStrongRDelimAst:_T,emStrongRDelimUnd:FT,escape:xT,link:OT,nolink:vg,punctuation:kT,reflink:Bg,reflinkSearch:DT,tag:$T,text:bT,url:Ki},IT={...rh,link:Dt(/^!?\[(label)\]\((.*?)\)/).replace("label",So).getRegex(),reflink:Dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",So).getRegex()},Ln={...rh,emStrongRDelimAst:LT,emStrongLDelim:vT,url:Dt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qc).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:Dt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qc).getRegex()},PT={...Ln,br:Dt(bg).replace("{2,}","*").getRegex(),text:Dt(Ln.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vs={normal:th,gfm:mT,pedantic:yT},Li={normal:rh,gfm:Ln,breaks:PT,pedantic:IT},RT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jc=e=>RT[e];function Oe(e,t){if(t){if(ce.escapeTest.test(e))return e.replace(ce.escapeReplace,Jc)}else if(ce.escapeTestNoEncode.test(e))return e.replace(ce.escapeReplaceNoEncode,Jc);return e}function tu(e){try{e=encodeURI(e).replace(ce.percentDecode,"%")}catch{return null}return e}function eu(e,t){let r=e.replace(ce.findPipe,(o,a,n)=>{let h=!1,c=a;for(;--c>=0&&n[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(ce.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(ce.slashPipe,"|");return i}function Fi(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 qT(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 ru(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,h}function NT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
162
- `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
163
- `)}var To=class{options;rules;lexer;constructor(t){this.options=t||Ir}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Fi(i,`
164
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=NT(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=Fi(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:Fi(r[0],`
165
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Fi(r[0],`
166
- `).split(`
167
- `),s="",o="",a=[];for(;i.length>0;){let n=!1,h=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))h.push(i[c]),n=!0;else if(!n)h.push(i[c]);else break;i=i.slice(c);let l=h.join(`
168
- `),u=l.replace(this.rules.other.blockquoteSetextReplace,`
169
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
170
- ${l}`:l,o=o?`${o}
171
- ${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=d,i.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let m=f,y=m.raw+`
172
- `+i.join(`
173
- `),x=this.blockquote(y);a[a.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,o=o.substring(0,o.length-m.text.length)+x.text;break}else if(f?.type==="list"){let m=f,y=m.raw+`
174
- `+i.join(`
175
- `),x=this.list(y);a[a.length-1]=x,s=s.substring(0,s.length-f.raw.length)+x.raw,o=o.substring(0,o.length-m.raw.length)+x.raw,i=y.substring(a.at(-1).raw.length).split(`
176
- `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={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 a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,l="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let d=r[2].split(`
177
- `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
178
- `,1)[0],m=!d.trim(),y=0;if(this.options.pedantic?(y=2,u=d.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=d.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(f)&&(l+=f+`
179
- `,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),B=this.rules.other.htmlBeginRegex(y);for(;t;){let F=t.split(`
180
- `,1)[0],M;if(f=F,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),M=f):M=f.replace(this.rules.other.tabCharGlobal," "),T.test(f)||v.test(f)||B.test(f)||b.test(f)||k.test(f))break;if(M.search(this.rules.other.nonSpaceChar)>=y||!f.trim())u+=`
181
- `+M.slice(y);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||v.test(d)||k.test(d))break;u+=`
182
- `+f}!m&&!f.trim()&&(m=!0),l+=F+`
183
- `,t=t.substring(F.length+1),d=M.slice(y)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(n=!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,""))),o.items.push({type:"list_item",raw:l,task:!!x,checked:C,loose:!1,text:u,tokens:[]}),o.raw+=l}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let l=o.items[c].tokens.filter(d=>d.type==="space"),u=l.length>0&&l.some(d=>this.rules.other.anyLine.test(d.raw));o.loose=u}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}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"):"",o=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:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=eu(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
184
- `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(eu(n,a.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
185
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Fi(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=qT(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=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)),ru(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return ru(i,o,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 o=[...s[0]].length-1,a,n,h=o,c=0,l=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+o);(s=l.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){h+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(h-=n,h>0)continue;n=Math.min(n,n+h+c);let u=[...s[0]][0].length,d=t.slice(0,o+s.index+u+n);if(Math.min(o,n)%2){let m=d.slice(1,-1);return{type:"em",raw:d,text:m,tokens:this.lexer.inlineTokens(m)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(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){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ve=class Fn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ir,this.options.tokenizer=this.options.tokenizer||new To,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:ce,block:vs.normal,inline:Li.normal};this.options.pedantic?(r.block=vs.pedantic,r.inline=Li.pedantic):this.options.gfm&&(r.block=vs.gfm,this.options.breaks?r.inline=Li.breaks:r.inline=Li.gfm),this.tokenizer.rules=r}static get rules(){return{block:vs,inline:Li}}static lex(t,r){return new Fn(r).lex(t)}static lexInline(t,r){return new Fn(r).inlineTokens(t)}lex(t){t=t.replace(ce.carriageReturn,`
186
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(ce.tabCharGlobal," ").replace(ce.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
187
- `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
188
- `)?"":`
189
- `)+s.raw,a.text+=`
190
- `+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
191
- `)?"":`
192
- `)+s.raw,a.text+=`
193
- `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),h;this.options.extensions.startBlock.forEach(c=>{h=c.call({lexer:this},n),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
194
- `)?"":`
195
- `)+s.raw,a.text+=`
196
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
197
- `)?"":`
198
- `)+s.raw,a.text+=`
199
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)h.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 o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let h;if(this.options.extensions?.inline?.some(l=>(h=l.call({lexer:this},t,r))?(t=t.substring(h.raw.length),r.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let l=r.at(-1);h.type==="text"&&l?.type==="text"?(l.raw+=h.raw,l.text+=h.text):r.push(h);continue}if(h=this.tokenizer.emStrong(t,i,n)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.del(t)){t=t.substring(h.raw.length),r.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),r.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),r.push(h);continue}let c=t;if(this.options.extensions?.startInline){let l=1/0,u=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(c=t.substring(0,l+1))}if(h=this.tokenizer.inlineText(c)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(n=h.raw.slice(-1)),a=!0;let l=r.at(-1);l?.type==="text"?(l.raw+=h.raw,l.text+=h.text):r.push(h);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return r}},Bo=class{options;parser;constructor(t){this.options=t||Ir}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(ce.notSpaceStart)?.[0],o=t.replace(ce.endingNewline,"")+`
200
- `;return s?'<pre><code class="language-'+Oe(s)+'">'+(i?o:Oe(o,!0))+`</code></pre>
201
- `:"<pre><code>"+(i?o:Oe(o,!0))+`</code></pre>
202
- `}blockquote({tokens:t}){return`<blockquote>
203
- ${this.parser.parse(t)}</blockquote>
204
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
205
- `}hr(t){return`<hr>
206
- `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let h=t.items[n];s+=this.listitem(h)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
207
- `+s+"</"+o+`>
208
- `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Oe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
209
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
210
- `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
211
- <thead>
212
- `+r+`</thead>
213
- `+s+`</table>
214
- `}tablerow({text:t}){return`<tr>
215
- ${t}</tr>
216
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
217
- `}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>${Oe(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),o=tu(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+Oe(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=tu(t);if(o===null)return Oe(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Oe(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Oe(t.text)}},ih=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""}},_e=class Mn{options;renderer;textRenderer;constructor(t){this.options=t||Ir,this.options.renderer=this.options.renderer||new Bo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ih}static parse(t,r){return new Mn(r).parse(t)}static parseInline(t,r){return new Mn(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=h||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,h=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],h+=`
218
- `+this.renderer.text(n);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 n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},qi=class{options;block;constructor(t){this.options=t||Ir}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ve.lex:ve.lexInline}provideParser(){return this.block?_e.parse:_e.parseInline}},WT=class{defaults=Vl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=_e;Renderer=Bo;TextRenderer=ih;Lexer=ve;Tokenizer=To;Hooks=qi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,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(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let h=o.renderer.apply(this,n);return h===!1&&(h=a.apply(this,n)),h}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Bo(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,h=i.renderer[n],c=o[n];o[n]=(...l)=>{let u=h.apply(o,l);return u===!1&&(u=c.apply(o,l)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new To(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,h=i.tokenizer[n],c=o[n];o[n]=(...l)=>{let u=h.apply(o,l);return u===!1&&(u=c.apply(o,l)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new qi;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,h=i.hooks[n],c=o[n];qi.passThroughHooks.has(a)?o[n]=l=>{if(this.defaults.async&&qi.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await h.call(o,l);return c.call(o,d)})();let u=h.call(o,l);return c.call(o,u)}:o[n]=(...l)=>{if(this.defaults.async)return(async()=>{let d=await h.apply(o,l);return d===!1&&(d=await c.apply(o,l)),d})();let u=h.apply(o,l);return u===!1&&(u=c.apply(o,l)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let h=[];return h.push(a.call(this,n)),o&&(h=h.concat(o.call(this,n))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ve.lex(t,r??this.defaults)}parser(t,r){return _e.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,h=await(o.hooks?await o.hooks.provideLexer():t?ve.lex:ve.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(h):h;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let l=await(o.hooks?await o.hooks.provideParser():t?_e.parse:_e.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(l):l})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ve.lex:ve.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let h=(o.hooks?o.hooks.provideParser():t?_e.parse:_e.parseInline)(n,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
219
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Oe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Mr=new WT;function It(e,t){return Mr.parse(e,t)}It.options=It.setOptions=function(e){return Mr.setOptions(e),It.defaults=Mr.defaults,mg(It.defaults),It};It.getDefaults=Vl;It.defaults=Ir;It.use=function(...e){return Mr.use(...e),It.defaults=Mr.defaults,mg(It.defaults),It};It.walkTokens=function(e,t){return Mr.walkTokens(e,t)};It.parseInline=Mr.parseInline;It.Parser=_e;It.parser=_e.parse;It.Renderer=Bo;It.TextRenderer=ih;It.Lexer=ve;It.lexer=ve.lex;It.Tokenizer=To;It.Hooks=qi;It.parse=It;It.options;It.setOptions;It.use;It.walkTokens;It.parseInline;_e.parse;ve.lex;function _g(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(n,h){var c=h.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(l){var u,d;return(d=(u=l.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):n},[]);if(s.length){var o=new RegExp(`
220
- [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(o,`
221
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,h){var c=a.match(/(?:^|\n)( *)$/),l=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
222
- `)&&(u=String(n).split(`
223
- `).map(function(d,f){return f===0?d:"".concat(l).concat(d)}).join(`
224
- `)),a+=u+i[h+1]}),a}var An=typeof performance<"u"&&typeof performance.now=="function",zr=g(()=>An?performance.now():0,"now"),za="🧜 ",zT="Mermaid render",HT="Mermaid",YT={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{g(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();const r=zr();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(zr()-r)}}async tick(e,t){if(!this.enabled)return t();const r=zr();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(zr()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;const t={name:e,start:zr(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(t):this.roots.push(t),this.stack.push(t),An&&typeof performance.mark=="function")try{performance.mark(`${za}${e} ▶`)}catch{}}end(){if(!this.enabled)return;const e=this.stack.pop();if(!e)return;const t=zr();if(e.duration=t-e.start,An&&typeof performance.measure=="function")try{performance.measure(`${za}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:"track-entry",track:zT,trackGroup:HT,color:YT[e.name]??"primary",tooltipText:`${e.name} — ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;const r=e.duration,i=t&&t!==e.name?`${e.name} [${t}]`:e.name,s=["ms % phase"],o=g((n,h)=>{const c=" ".repeat(h),l=n.duration.toFixed(1).padStart(8),u=r>0?`${(n.duration/r*100).toFixed(0).padStart(3)}%`:" -";s.push(`${l} ${u} ${c}${n.name}`);for(const d of n.children)o(d,h+1);if(n.children.length>0){const d=n.children.reduce((m,y)=>m+y.duration,0),f=n.duration-d;if(f>.5){const m=f.toFixed(1).padStart(8);s.push(`${m} ${c} (self)`)}}},"walk");o(e,0);const a=Object.keys(this.buckets);if(a.length>0){s.push("—— buckets (summed) ——");for(const n of a)s.push(`${this.buckets[n].toFixed(1).padStart(8)} ${n}`)}console.log(`${za}mermaid render profile · ${i}
225
- ${s.join(`
226
- `)}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function Lg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
227
- `).replace(/\n{2,}/g,`
228
- `);return _g(i)}g(Lg,"preprocessMarkdown");function Fg(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}g(Fg,"nonMarkdownToLines");function Mg(e,t={}){const r=Lg(e,t),i=It.lexer(r),s=[[]];let o=0;function a(n,h="normal"){n.type==="text"?n.text.split(`
229
- `).forEach((l,u)=>{u!==0&&(o++,s.push([])),l.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&s[o].push({content:d,type:h})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return g(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(h=>{a(h)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}g(Mg,"markdownToLines");function Ag(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(Ag,"nonMarkdownToHTML");function Eg(e,{markdownAutoWrap:t}={}){const r=It.lexer(e);function i(s){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>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(V.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(Eg,"markdownToHTML");var UT=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(c){return setTimeout(c,16)};function i(){var c=this;c.reads=[],c.writes=[],c.raf=r.bind(e)}g(i,"FastDom"),i.prototype={constructor:i,runTasks:g(function(c){for(var l;l=c.shift();)l()},"runTasks"),measure:g(function(c,l){var u=l?c.bind(l):c;return this.reads.push(u),s(this),u},"measure"),mutate:g(function(c,l){var u=l?c.bind(l):c;return this.writes.push(u),s(this),u},"mutate"),clear:g(function(c){return a(this.reads,c)||a(this.writes,c)},"clear"),extend:g(function(c){if(typeof c!="object")throw new Error("expected object");var l=Object.create(this);return n(l,c),l.fastdom=this,l.initialize&&l.initialize(),l},"extend"),catch:null};function s(c){c.scheduled||(c.scheduled=!0,c.raf(o.bind(null,c)))}g(s,"scheduleFlush");function o(c){var l=c.writes,u=c.reads,d;try{t("flushing reads",u.length),c.runTasks(u),t("flushing writes",l.length),c.runTasks(l)}catch(f){d=f}if(c.scheduled=!1,(u.length||l.length)&&s(c),d)if(t("task errored",d.message),c.catch)c.catch(d);else throw d}g(o,"flush");function a(c,l){var u=c.indexOf(l);return!!~u&&!!c.splice(u,1)}g(a,"remove");function n(c,l){for(var u in l)l.hasOwnProperty(u)&&(c[u]=l[u])}g(n,"mixin");var h=e.fastdom=e.fastdom||new i;return h})(typeof window<"u"?window:globalThis),$g={initialize:g(function(){this._tasks=new Map},"initialize"),mutate:g(function(e,t){return En(this,"mutate",e,t)},"mutate"),measure:g(function(e,t){return En(this,"measure",e,t)},"measure"),clear:g(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function En(e,t,r,i){var s=e._tasks,o=e.fastdom,a,n=new Promise(function(h,c){a=o[t](function(){s.delete(n);try{h(i?r.call(i):r())}catch(l){c(l)}},i)});return s.set(n,a),n}g(En,"create");var{initialize:A5,mutate:E5,measure:$5,clear:O5}=$g,jT=$g,XT=UT.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(jT),Ar=XT;function Og(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(Og,"splitTextToChars");function Dg(e,t){const r=Og(t.content);return sh(e,[],r,t.type)}g(Dg,"splitWordToFitWidth");function sh(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?sh(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(sh,"splitWordToFitWidthRecursion");function Ig(e,t){if(e.some(({content:r})=>r.includes(`
230
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return vo(e,t)}g(Ig,"splitLineToFitWidth");function vo(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 o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return vo(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,h]=Dg(t,o);r.push([n]),h.content&&e.unshift(h)}return vo(e,t,r)}g(vo,"splitLineToFitWidthRecursion");function $n(e,t){t&&e.attr("style",t)}g($n,"applyStyle");var iu=16384;async function Pg(e,t,r,i,s=!1,o=Nt(),a=0){const n=e.append("foreignObject");n.attr("width",`${Math.min(10*r,iu)}px`),n.attr("height",`${Math.min(10*r,iu)}px`);const h=n.append("xhtml:div"),c=Ji(t.label)?await ld(t.label.replace(ns.lineBreakRegex,`
231
- `),o):be(t.label,o),l=t.isNode?"nodeLabel":"edgeLabel",u=h.append("span");u.html(c),$n(u,t.labelStyle),u.attr("class",`${l} ${i}`),$n(h,t.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&h.attr("class","labelBkg");const d=await Ar.measure(()=>h.node().getBoundingClientRect());return d.width===r?(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px")):d.width<a&&(h.style("display","table"),h.style("width",a+"px"),h.style("text-align","center")),n.node()}g(Pg,"addHtmlSpan");function Zo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(Zo,"createTspan");function Rg(e,t,r){const i=e.append("text"),s=Zo(i,1,t);Ko(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}g(Rg,"computeWidthOfText");function GT(e,t,r){const i=e.append("text"),s=Zo(i,1,t);Ko(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}g(GT,"computeDimensionOfText");function qg(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),h=a.append("text").attr("y","-10.1");s&&h.attr("text-anchor","middle");let c=0;for(const l of r){const u=g(f=>Rg(a,1.1,f)<=e,"checkWidth"),d=u(l)?[l]:Ig(l,u);for(const f of d){const m=Zo(h,c,1.1,s);Ko(m,f),c++}}if(i){const l=h.node().getBBox(),u=2;return n.attr("x",l.x-u).attr("y",l.y-u).attr("width",l.width+2*u).attr("height",l.height+2*u),a.node()}else return h.node()}g(qg,"createFormattedText");function On(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(On,"decodeHTMLEntities");function Ko(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(On(r.content)):s.text(" "+On(r.content))})}g(Ko,"updateTextContentAndStyles");async function Ng(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await qf(n)?await fi(n,void 0,{class:"label-icon"}):`<i class='${be(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(Ng,"replaceIconSubstring");var pe=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:h=200,minWidth:c=0,addSvgBackground:l=!1}={},u)=>{if(V.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",l),o){const d=a?Eg(t,u):Ag(t),f=await Ng(gr(d),u),m=t.replace(/\\\\/g,"\\"),y={isNode:n,label:Ji(t)?m:f,labelStyle:r.replace("fill:","color:")};return await Pg(e,y,h,s,l,u,c)}else{const d=gr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?Mg(d.replace("<br>","<br/>"),u):Fg(d),m=qg(h,e,f,t?l:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Lt(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Lt(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Lt(m).select("text").attr("style",x)}return i?Lt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Lt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText"),VT=new Set(["redux-color","redux-dark-color"]),ZT=12,KT=64,oh=g(e=>Array.isArray(e)&&e.length>0,"hasPalette"),QT=g((e,t)=>e!=null&&VT.has(e)&&oh(t),"isColorTheme"),JT=/^[\w-]+$/,D5=g(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return JT.test(t)?t:"classic"},"safeLook"),Wg=g(e=>oh(e)?e.length:0,"paletteSlotCount"),I5=g((e,t)=>oh(t)?Wg(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=KT?e:ZT,"colorSlotCount"),we=g((e,t,r,i)=>{if(t===void 0||!QT(r,i))return;const s=t%Wg(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");function Ha(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const h of e){const[c,l]=h;h[0]=(c-i)*a-(l-s)*n+i,h[1]=(c-i)*n+(l-s)*a+s}}}function tB(e,t){return e[0]===t[0]&&e[1]===t[1]}function eB(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Ha(c,n,s);const h=(function(c,l,u){const d=[];for(const b of c){const k=[...b];tB(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&d.push(k)}const f=[];l=Math.max(l,.1);const m=[];for(const b of d)for(let k=0;k<b.length-1;k++){const T=b[k],v=b[k+1];if(T[1]!==v[1]){const B=Math.min(T[1],v[1]);m.push({ymin:B,ymax:Math.max(T[1],v[1]),x:B===T[1]?T[0]:v[0],islope:(v[0]-T[0])/(v[1]-T[1])})}}if(m.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!m.length)return f;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>x);k++)b=k;m.splice(0,b+1).forEach((k=>{y.push({s:x,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=x))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||C%l==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const T=y[b].edge,v=y[k].edge;f.push([[Math.round(T.x),x],[Math.round(v.x),x]])}x+=u,y.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),C++}return f})(a,o,i);if(s){for(const c of a)Ha(c,n,-s);(function(c,l,u){const d=[];c.forEach((f=>d.push(...f))),Ha(d,l,u)})(h,n,-s)}return h}function gs(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 o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),eB(e,s,i,o||1)}class ah{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=gs(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 Qo(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 rB extends ah{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=gs(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),h=.5*i*Math.sin(o);for(const[c,l]of s)Qo([c,l])&&a.push([[c[0]-n,c[1]+h],[...l]],[[c[0]+n,c[1]-h],[...l]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class iB extends ah{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class sB{constructor(t){this.helper=t}fillPolygons(t,r){const i=gs(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 o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const h=Qo(n),c=h/s,l=Math.ceil(c)-1,u=h-l*s,d=(n[0][0]+n[1][0])/2-s/4,f=Math.min(n[0][1],n[1][1]);for(let m=0;m<l;m++){const y=f+u+m*s,x=d-a+2*Math.random()*a,C=y-a+2*Math.random()*a,b=this.helper.ellipse(x,C,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class oB{constructor(t){this.helper=t}fillPolygons(t,r){const i=gs(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,o=[];return t.forEach((a=>{const n=Qo(a),h=Math.floor(n/(i+s)),c=(n+s-h*(i+s))/2;let l=a[0],u=a[1];l[0]>u[0]&&(l=a[1],u=a[0]);const d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let f=0;f<h;f++){const m=f*(i+s),y=m+i,x=[l[0]+m*Math.cos(d)+c*Math.cos(d),l[1]+m*Math.sin(d)+c*Math.sin(d)],C=[l[0]+y*Math.cos(d)+c*Math.cos(d),l[1]+y*Math.sin(d)+c*Math.sin(d)];o.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),o}}class aB{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,o=gs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=Qo(o),n=Math.round(a/(2*r));let h=o[0],c=o[1];h[0]>c[0]&&(h=o[1],c=o[0]);const l=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let u=0;u<n;u++){const d=2*u*r,f=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[h[0]+d*Math.cos(l),h[1]+d*Math.sin(l)],x=[h[0]+f*Math.cos(l),h[1]+f*Math.sin(l)],C=[y[0]+m*Math.cos(l+Math.PI/4),y[1]+m*Math.sin(l+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const ue={};class nB{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const lB=0,Ya=1,su=2,_s={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 Ua(e,t){return e.type===t}function nh(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:lB,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ya,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:su,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!Ua(o,su);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return nh("M0,0"+e);s++,a=_s[o.text],i=o.text}else Ua(o,Ya)?a=_s[i]:(s++,a=_s[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let h=s;h<s+a;h++){const c=r[h];if(!Ua(c,Ya))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof _s[i]!="number")throw new Error("Bad segment: "+i);{const h={key:i,data:n};t.push(h),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function zg(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const h=n.map(((c,l)=>l%2?c+r:c+t));o.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const h=n.map(((c,l)=>l%2?c+r:c+t));o.push({key:"Q",data:h}),t=h[2],r=h[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const h=n.map(((c,l)=>l%2?c+r:c+t));o.push({key:"S",data:h}),t=h[2],r=h[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function Hg(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,h=0;for(const{key:c,data:l}of e){switch(c){case"M":t.push({key:"M",data:[...l]}),[i,s]=l,[o,a]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],s=l[5],n=l[2],h=l[3];break;case"L":t.push({key:"L",data:[...l]}),[i,s]=l;break;case"H":i=l[0],t.push({key:"L",data:[i,s]});break;case"V":s=l[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-n),d=s+(s-h)):(u=i,d=s),t.push({key:"C",data:[u,d,...l]}),n=l[0],h=l[1],i=l[2],s=l[3];break}case"T":{const[u,d]=l;let f=0,m=0;r==="Q"||r==="T"?(f=i+(i-n),m=s+(s-h)):(f=i,m=s);const y=i+2*(f-i)/3,x=s+2*(m-s)/3,C=u+2*(f-u)/3,b=d+2*(m-d)/3;t.push({key:"C",data:[y,x,C,b,u,d]}),n=f,h=m,i=u,s=d;break}case"Q":{const[u,d,f,m]=l,y=i+2*(u-i)/3,x=s+2*(d-s)/3,C=f+2*(u-f)/3,b=m+2*(d-m)/3;t.push({key:"C",data:[y,x,C,b,f,m]}),n=u,h=d,i=f,s=m;break}case"A":{const u=Math.abs(l[0]),d=Math.abs(l[1]),f=l[2],m=l[3],y=l[4],x=l[5],C=l[6];u===0||d===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(Yg(i,s,x,C,u,d,f,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function Mi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Yg(e,t,r,i,s,o,a,n,h,c){const l=(u=a,Math.PI*u/180);var u;let d=[],f=0,m=0,y=0,x=0;if(c)[f,m,y,x]=c;else{[e,t]=Mi(e,t,-l),[r,i]=Mi(r,i,-l);const A=(e-r)/2,L=(t-i)/2;let E=A*A/(s*s)+L*L/(o*o);E>1&&(E=Math.sqrt(E),s*=E,o*=E);const _=s*s,R=o*o,I=_*R-_*L*L-R*A*A,Q=_*L*L+R*A*A,j=(n===h?-1:1)*Math.sqrt(Math.abs(I/Q));y=j*s*L/o+(e+r)/2,x=j*-o*A/s+(t+i)/2,f=Math.asin(parseFloat(((t-x)/o).toFixed(9))),m=Math.asin(parseFloat(((i-x)/o).toFixed(9))),e<y&&(f=Math.PI-f),r<y&&(m=Math.PI-m),f<0&&(f=2*Math.PI+f),m<0&&(m=2*Math.PI+m),h&&f>m&&(f-=2*Math.PI),!h&&m>f&&(m-=2*Math.PI)}let C=m-f;if(Math.abs(C)>120*Math.PI/180){const A=m,L=r,E=i;m=h&&m>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Yg(r=y+s*Math.cos(m),i=x+o*Math.sin(m),L,E,s,o,a,0,h,[m,A,y,x])}C=m-f;const b=Math.cos(f),k=Math.sin(f),T=Math.cos(m),v=Math.sin(m),B=Math.tan(C/4),F=4/3*s*B,M=4/3*o*B,W=[e,t],P=[e+F*k,t-M*b],$=[r+F*v,i-M*T],q=[r,i];if(P[0]=2*W[0]-P[0],P[1]=2*W[1]-P[1],c)return[P,$,q].concat(d);{d=[P,$,q].concat(d);const A=[];for(let L=0;L<d.length;L+=3){const E=Mi(d[L][0],d[L][1],l),_=Mi(d[L+1][0],d[L+1][1],l),R=Mi(d[L+2][0],d[L+2][1],l);A.push([E[0],E[1],_[0],_[1],R[0],R[1]])}return A}}const hB={randOffset:function(e,t){return Tt(e,t)},randOffsetWithRange:function(e,t,r){return _o(e,t,r)},ellipse:function(e,t,r,i,s){const o=jg(r,i,s);return Dn(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return pr(e,t,r,i,s,!0)}};function Ug(e,t,r,i,s){return{type:"path",ops:pr(e,t,r,i,s)}}function Ys(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...pr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...pr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Ug(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function cB(e,t,r,i,s){return(function(o,a){return Ys(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function ou(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ls(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ls(r[0],1.5*(1+.22*t.roughness),lu(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Ls(a,1*(1+.2*t.roughness),t),h=t.disableMultiStroke?[]:Ls(a,1.5*(1+.22*t.roughness),lu(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of h)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function jg(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)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const h=1-r.curveFitting;return a+=Tt(a*h,r),n+=Tt(n*h,r),{increment:o,rx:a,ry:n}}function Dn(e,t,r,i){const[s,o]=hu(i.increment,e,t,i.rx,i.ry,1,i.increment*_o(.1,_o(.4,1,r),r),r);let a=Lo(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=hu(i.increment,e,t,i.rx,i.ry,1.5,0,r),h=Lo(n,null,r);a=a.concat(h)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function au(e,t,r,i,s,o,a,n,h){const c=e,l=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=Tt(.01*u,h),d+=Tt(.01*d,h);let f=s,m=o;for(;f<0;)f+=2*Math.PI,m+=2*Math.PI;m-f>2*Math.PI&&(f=0,m=2*Math.PI);const y=2*Math.PI/h.curveStepCount,x=Math.min(y/2,(m-f)/2),C=cu(x,c,l,u,d,f,m,1,h);if(!h.disableMultiStroke){const b=cu(x,c,l,u,d,f,m,1.5,h);C.push(...b)}return a&&(n?C.push(...pr(c,l,c+u*Math.cos(f),l+d*Math.sin(f),h),...pr(c,l,c+u*Math.cos(m),l+d*Math.sin(m),h)):C.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+d*Math.sin(f)]})),{type:"path",ops:C}}function nu(e,t){const r=Hg(zg(nh(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...pr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[h,c,l,u,d,f]=n;i.push(...uB(h,c,l,u,d,f,o,t)),o=[d,f];break}case"Z":i.push(...pr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function ja(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+Tt(s,t),i[0][1]+Tt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+Tt(s,t),i[a][1]+Tt(s,t)]})}}return{type:"fillPath",ops:r}}function Hr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ue[s])switch(s){case"zigzag":ue[s]||(ue[s]=new rB(i));break;case"cross-hatch":ue[s]||(ue[s]=new iB(i));break;case"dots":ue[s]||(ue[s]=new sB(i));break;case"dashed":ue[s]||(ue[s]=new oB(i));break;case"zigzag-line":ue[s]||(ue[s]=new aB(i));break;default:s="hachure",ue[s]||(ue[s]=new ah(i))}return ue[s]})(t,hB).fillPolygons(e,t)}function lu(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Xg(e){return e.randomizer||(e.randomizer=new nB(e.seed||0)),e.randomizer.next()}function _o(e,t,r,i=1){return r.roughness*i*(Xg(r)*(t-e)+e)}function Tt(e,t,r=1){return _o(-e,e,t,r)}function pr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=In(e,t,r,i,s,!0,!1);if(a)return n;const h=In(e,t,r,i,s,!0,!0);return n.concat(h)}function In(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),h=Math.sqrt(n);let c=1;c=h<200?1:h>500?.4:-.0016668*h+1.233334;let l=s.maxRandomnessOffset||0;l*l*100>n&&(l=h/10);const u=l/2,d=.2+.2*Xg(s);let f=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;f=Tt(f,s,c),m=Tt(m,s,c);const y=[],x=()=>Tt(u,s,c),C=()=>Tt(l,s,c),b=s.preserveVertices;return a?y.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):y.push({op:"move",data:[e+(b?0:Tt(l,s,c)),t+(b?0:Tt(l,s,c))]}),a?y.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),m+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),m+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}):y.push({op:"bcurveTo",data:[f+e+(r-e)*d+C(),m+t+(i-t)*d+C(),f+e+2*(r-e)*d+C(),m+t+2*(i-t)*d+C(),r+(b?0:C()),i+(b?0:C())]}),y}function Ls(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 Lo(i,null,r)}function Lo(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const h=e[n];o[0]=[h[0],h[1]],o[1]=[h[0]+(a*e[n+1][0]-a*e[n-1][0])/6,h[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[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(...In(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function hu(e,t,r,i,s,o,a,n){const h=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const u=[t+i*Math.cos(l),r+s*Math.sin(l)];h.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 l=Tt(.5,n)-Math.PI/2;c.push([Tt(o,n)+t+.9*i*Math.cos(l-e),Tt(o,n)+r+.9*s*Math.sin(l-e)]);const u=2*Math.PI+l-.01;for(let d=l;d<u;d+=e){const f=[Tt(o,n)+t+i*Math.cos(d),Tt(o,n)+r+s*Math.sin(d)];h.push(f),c.push(f)}c.push([Tt(o,n)+t+i*Math.cos(l+2*Math.PI+.5*a),Tt(o,n)+r+s*Math.sin(l+2*Math.PI+.5*a)]),c.push([Tt(o,n)+t+.98*i*Math.cos(l+a),Tt(o,n)+r+.98*s*Math.sin(l+a)]),c.push([Tt(o,n)+t+.9*i*Math.cos(l+.5*a),Tt(o,n)+r+.9*s*Math.sin(l+.5*a)])}return[c,h]}function cu(e,t,r,i,s,o,a,n,h){const c=o+Tt(.1,h),l=[];l.push([Tt(n,h)+t+.9*i*Math.cos(c-e),Tt(n,h)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=a;u+=e)l.push([Tt(n,h)+t+i*Math.cos(u),Tt(n,h)+r+s*Math.sin(u)]);return l.push([t+i*Math.cos(a),r+s*Math.sin(a)]),l.push([t+i*Math.cos(a),r+s*Math.sin(a)]),Lo(l,null,h)}function uB(e,t,r,i,s,o,a,n){const h=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let l=[0,0];const u=n.disableMultiStroke?1:2,d=n.preserveVertices;for(let f=0;f<u;f++)f===0?h.push({op:"move",data:[a[0],a[1]]}):h.push({op:"move",data:[a[0]+(d?0:Tt(c[0],n)),a[1]+(d?0:Tt(c[0],n))]}),l=d?[s,o]:[s+Tt(c[f],n),o+Tt(c[f],n)],h.push({op:"bcurveTo",data:[e+Tt(c[f],n),t+Tt(c[f],n),r+Tt(c[f],n),i+Tt(c[f],n),l[0],l[1]]});return h}function Ai(e){return[...e]}function uu(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(Ai(e[0]),Ai(e[1]),Ai(e[2]),Ai(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(Ai(s[0]));for(let n=1;n+2<s.length;n++){const h=s[n];o[0]=[h[0],h[1]],o[1]=[h[0]+(a*s[n+1][0]-a*s[n-1][0])/6,h[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Us(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function dB(e,t,r){const i=Us(t,r);if(i===0)return Us(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)),Us(e,kr(t,r,s))}function kr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Pn(e,t,r,i){const s=i||[];if((function(n,h){const c=n[h+0],l=n[h+1],u=n[h+2],d=n[h+3];let f=3*l[0]-2*c[0]-d[0];f*=f;let m=3*l[1]-2*c[1]-d[1];m*=m;let y=3*u[0]-2*d[0]-c[0];y*=y;let x=3*u[1]-2*d[1]-c[1];return x*=x,f<y&&(f=y),m<x&&(m=x),f+m})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(Us(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const h=e[t+0],c=e[t+1],l=e[t+2],u=e[t+3],d=kr(h,c,.5),f=kr(c,l,.5),m=kr(l,u,.5),y=kr(d,f,.5),x=kr(f,m,.5),C=kr(y,x,.5);Pn([h,d,y,C],0,r,s),Pn([C,x,m,u],0,r,s)}var o,a;return s}function fB(e,t){return Fo(e,0,e.length,t)}function Fo(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let h=0,c=1;for(let l=t+1;l<r-1;++l){const u=dB(e[l],a,n);u>h&&(h=u,c=l)}return Math.sqrt(h)>i?(Fo(e,t,c+1,i,o),Fo(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Xa(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)Pn(e,3*o,t,i);return r&&r>0?Fo(i,0,i.length,r):i}const fe="none";class Mo{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,o){const a=this._o(o);return this._d("line",[Ug(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],h=cB(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(ja([c],a)):n.push(Hr([c],a))}return a.stroke!==fe&&n.push(h),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],h=jg(i,s,a),c=Dn(t,r,a,h);if(a.fill)if(a.fillStyle==="solid"){const l=Dn(t,r,a,h).opset;l.type="fillPath",n.push(l)}else n.push(Hr([c.estimatedPoints],a));return a.stroke!==fe&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ys(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,h){const c=this._o(h),l=[],u=au(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=au(t,r,i,s,o,a,!0,!1,d);f.type="fillPath",l.push(f)}else l.push((function(d,f,m,y,x,C,b){const k=d,T=f;let v=Math.abs(m/2),B=Math.abs(y/2);v+=Tt(.01*v,b),B+=Tt(.01*B,b);let F=x,M=C;for(;F<0;)F+=2*Math.PI,M+=2*Math.PI;M-F>2*Math.PI&&(F=0,M=2*Math.PI);const W=(M-F)/b.curveStepCount,P=[];for(let $=F;$<=M;$+=W)P.push([k+v*Math.cos($),T+B*Math.sin($)]);return P.push([k+v*Math.cos(M),T+B*Math.sin(M)]),P.push([k,T]),Hr([P],b)})(t,r,i,s,o,a,c));return c.stroke!==fe&&l.push(u),this._d("arc",l,c)}curve(t,r){const i=this._o(r),s=[],o=ou(t,i);if(i.fill&&i.fill!==fe)if(i.fillStyle==="solid"){const a=ou(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const h=typeof n[0][0]=="number"?[n]:n;for(const c of h)c.length<3?a.push(...c):c.length===3?a.push(...Xa(uu([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Xa(uu(c),10,(1+i.roughness)/2))}a.length&&s.push(Hr([a],i))}return i.stroke!==fe&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Ys(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ja([t],i)):s.push(Hr([t],i))),i.stroke!==fe&&s.push(o),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 o=i.fill&&i.fill!=="transparent"&&i.fill!==fe,a=i.stroke!==fe,n=!!(i.simplification&&i.simplification<1),h=(function(l,u,d){const f=Hg(zg(nh(l))),m=[];let y=[],x=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...Xa(C,u)),C=[]},k=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:v,data:B}of f)switch(v){case"M":k(),x=[B[0],B[1]],y.push(x);break;case"L":b(),y.push([B[0],B[1]]);break;case"C":if(!C.length){const F=y.length?y[y.length-1]:x;C.push([F[0],F[1]])}C.push([B[0],B[1]]),C.push([B[2],B[3]]),C.push([B[4],B[5]]);break;case"Z":b(),y.push([x[0],x[1]])}if(k(),!d)return m;const T=[];for(const v of m){const B=fB(v,d);B.length&&T.push(B)}return T})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=nu(t,i);if(o)if(i.fillStyle==="solid")if(h.length===1){const l=nu(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else s.push(ja(h,i));else s.push(Hr(h,i));return a&&(n?h.forEach((l=>{s.push(Ys(l,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:fe};break;case"fillPath":a={d:this.opsToPath(o),stroke:fe,strokeWidth:0,fill:i.fill||fe};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||fe,strokeWidth:i,fill:fe}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class gB{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Mo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.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,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,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 o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}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,o,a,n=!1,h){const c=this.gen.arc(t,r,i,s,o,a,n,h);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 Fs="http://www.w3.org/2000/svg";class pB{constructor(t,r){this.svg=t,this.gen=new Mo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Fs,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let h=null;switch(n.type){case"path":h=s.createElementNS(Fs,"path"),h.setAttribute("d",this.opsToPath(n,a)),h.setAttribute("stroke",i.stroke),h.setAttribute("stroke-width",i.strokeWidth+""),h.setAttribute("fill","none"),i.strokeLineDash&&h.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&h.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":h=s.createElementNS(Fs,"path"),h.setAttribute("d",this.opsToPath(n,a)),h.setAttribute("stroke","none"),h.setAttribute("stroke-width","0"),h.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||h.setAttribute("fill-rule","evenodd");break;case"fillSketch":h=this.fillSketch(s,n,i)}h&&o.appendChild(h)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Fs,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}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,o,a,n=!1,h){const c=this.gen.arc(t,r,i,s,o,a,n,h);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 at={canvas:(e,t)=>new gB(e,t),svg:(e,t)=>new pB(e,t),generator:e=>new Mo(e),newSeed:()=>Mo.newSeed()},mB=1,yB=3;async function lh(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!hh(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=Ft().fontSize?Ft().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[h=Zn.fontSize]=Xo(a),c=h*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}g(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}g(lh,"configureLabelImages");function hh(e){return e.nodeType===yB?e.textContent?.trim()!=="":e.nodeType!==mB||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(hh)}g(hh,"hasTextBesidesImages");var du=3,xB=32,CB=g(async(e,t,r)=>{const i=Ft(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",jt(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:t.label?.[0]??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(C=>({text:C,cssClass:"c4-descr"}))].filter(C=>C.text),h=t.width?Math.max(t.width-2*(t.padding??0),xB):Ft().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?h:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async C=>{const b=o.append("g").attr("class",C.cssClass),k=await pe(b,be(gr(C.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return Lt(k).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Lt(k).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:b,box:b.node().getBBox()}})),d=Math.max(...u.map(({box:C})=>C.width),0);let f=0;for(const{el:C,box:b}of u)C.attr("transform",`translate(${d/2-b.x-b.width/2}, ${f-b.y})`),f+=b.height+du;const m=u.length>0?f-du:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-d/2}, ${-m/2})`);const y=o.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:o}},"c4LabelHelper"),fu=g((e,t)=>{const{x:r,y:i,width:s,height:o}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:o,top:i,left:r,bottom:i+o,right:r+t,toJSON:g(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:o}},"withMinWidth"),xt=g(async(e,t,r,{ignoreMinWidth:i=!1}={})=>{if(t.stereotype!==void 0)return CB(e,t,r);let s;const o=t.useHtmlLabels||ze(Ft()?.htmlLabels);r?s=r:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g").attr("class","label").attr("style",jt(t.labelStyle));let h;t.label===void 0?h="":h=typeof t.label=="string"?t.label:t.label[0];const c=!!t.icon||!!t.img,l=t.labelType==="markdown",u=h&&!t.width&&!i?t.minWidth??0:0,d=await pe(n,be(gr(h),Ft()),{useHtmlLabels:o,width:t.width||t.wrappingWidth||Ft().flowchart?.wrappingWidth,minWidth:u,classes:l?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:c,markdown:l},Ft()),f=(t?.padding??0)/2;let m;if(o){const y=d.children[0],x=Lt(d);await lh(y),m=await Ar.measure(()=>y.getBoundingClientRect()),m=fu(m,u),x.attr("width",m.width),x.attr("height",m.height)}else m=await Ar.measure(()=>d.getBBox()),m=fu(m,u);return o?n.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):n.attr("transform","translate(0, "+-m.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:a,bbox:m,halfPadding:f,label:n}},"labelHelper"),Br=g(async(e,t,r)=>{const i=r.useHtmlLabels??Qt(Ft()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await pe(s,be(gr(t),Ft()),{useHtmlLabels:i,width:r.width||Ft()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(Qt(Ft())){const h=o.children[0],c=Lt(o);n=await Ar.measure(()=>h.getBoundingClientRect()),c.attr("width",n.width),c.attr("height",n.height)}else n=await Ar.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),ht=g((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),mt=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function $t(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g($t,"createPathFromPoints");function mr(e,t,r,i,s,o){const a=[],h=r-e,c=i-t,l=h/o,u=2*Math.PI/l,d=t+c/2;for(let f=0;f<=50;f++){const m=f/50,y=e+m*h,x=d+s*Math.sin(u*(y-e));a.push({x:y,y:x})}return a}g(mr,"generateFullSineWavePoints");function Pe(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}g(Pe,"generateCirclePoints");function Rn(e){const t=Array.from(e.childNodes).filter(h=>h.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(h=>h.getAttribute("d")).filter(h=>h!==null).join(" ");r.setAttribute("d",i);const s=t.find(h=>h.getAttribute("fill")!=="none"),o=t.find(h=>h.getAttribute("stroke")!=="none"),a=g((h,c)=>h?.getAttribute(c)??void 0,"getAttr");if(s){const h={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(h).forEach(([c,l])=>{l&&r.setAttribute(c,l)})}if(o){const h={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(h).forEach(([c,l])=>{l&&r.setAttribute(c,l)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(Rn,"mergePaths");var bB=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,h,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),h=o===0?0:n*s/o,c=n):(s<0&&(a=-a),h=a,c=s===0?0:a*o/s),{x:r+h,y:i+c}},"intersectRect"),nr=bB;function Gg(e,t){return e.intersect(t)}g(Gg,"intersectNode");var kB=Gg;function Vg(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,h=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/h);i.x<s&&(c=-c);var l=Math.abs(t*r*n/h);return i.y<o&&(l=-l),{x:s+c,y:o+l}}g(Vg,"intersectEllipse");var Zg=Vg;function Kg(e,t,r){return Zg(e,t,t,r)}g(Kg,"intersectCircle");var wB=Kg;function Qg(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,h=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&h!==0&&qn(n,h))return;const l=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=l*e.x+u*e.y+d,m=l*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(m)<c&&qn(f,m))return;const y=s*u-l*o;if(y===0)return;const x=(o*d-u*a)/y,C=(l*a-s*d)/y;return{x,y:C}}}g(Qg,"intersectLine");function qn(e,t){return e*t>0}g(qn,"sameSign");var SB=Qg;function Jg(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){a=Math.min(a,l.x),n=Math.min(n,l.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let h=i-e.width/2-a,c=s-e.height/2-n;for(let l=0;l<t.length;l++){let u=t[l],d=t[l<t.length-1?l+1:0],f=SB(e,r,{x:h+u.x,y:c+u.y},{x:h+d.x,y:c+d.y});f&&o.push(f)}return o.length?(o.length>1&&o.sort(function(l,u){let d=l.x-r.x,f=l.y-r.y,m=Math.sqrt(d*d+f*f),y=u.x-r.x,x=u.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),o[0]):e}g(Jg,"intersectPolygon");var TB=Jg,st={node:kB,circle:wB,ellipse:Zg,polygon:TB,rect:nr},me=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),BB=g(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=Ft(),n=Qt(a);return await pe(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Je=BB;function tp(e,t){const{labelStyles:r}=nt(t);t.labelStyle=r;const i=mt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,h=at.svg(o),c=ot(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const l=h.circle(0,0,a*2,c),u=o.insert(()=>l,":first-child");return u.attr("class","anchor").attr("style",jt(n)),ht(t,u),t.intersect=function(d){return V.info("Circle intersect",t,a,d),st.circle(t,a,d)},o}g(tp,"anchor");function Nn(e,t,r,i,s,o,a){const h=(e+r)/2,c=(t+i)/2,l=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/s,m=d/o,y=Math.sqrt(f**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=h+x*o*Math.sin(l)*(a?-1:1),b=c-x*s*Math.cos(l)*(a?-1:1),k=Math.atan2((t-b)/o,(e-C)/s);let v=Math.atan2((i-b)/o,(r-C)/s)-k;a&&v<0&&(v+=2*Math.PI),!a&&v>0&&(v-=2*Math.PI);const B=[];for(let F=0;F<20;F++){const M=F/19,W=k+M*v,P=C+s*Math.cos(W),$=b+o*Math.sin(W);B.push({x:P,y:$})}return B}g(Nn,"generateArcPoints");function ep(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(ep,"calculateArcSagitta");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=g(W=>W+a,"calcTotalHeight"),h=g(W=>{const P=W/2;return[P/(2.5+W/50),P]},"calcEllipseRadius"),{shapeSvg:c,bbox:l}=await xt(e,t,mt(t)),u=n(t?.height?t?.height:l.height),[d,f]=h(u),m=ep(u,d,f),x=(t?.width?t?.width:l.width)+o*2+m-m,C=u,{cssStyles:b}=t,k=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...Nn(-x/2,-C/2,-x/2,C/2,d,f,!1),{x:x/2,y:C/2},...Nn(x/2,C/2,x/2,-C/2,d,f,!0)],T=at.svg(c),v=ot(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=$t(k),F=T.path(B,v),M=c.insert(()=>F,":first-child");return 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(${d/2}, 0)`),ht(t,M),t.intersect=function(W){return st.polygon(t,k,W)},c}g(rp,"bowTieRect");async function ip(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await xt(e,t,mt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=Math.max(a.width+c*2,t.width??0,80),u=Math.max(Math.min(l*.08,12),5),d=Math.max(a.height+c*2+u,t.height??0),f=-d/2+u,m=d/2,y=l*.72,x=[`M${-l/2},${f}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${l/2},${f}`,`A${l/2},${u} 0 0 0 ${-l/2},${f}`,"Z"].join(" "),{cssStyles:C}=t,b=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const M=at.svg(o).path(x,ot(t,{}));b.node()?.appendChild(M),C&&b.attr("style",C)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",l/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),ht(t,b);const k=f+(m-f)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const T=12,v=g((F,M,W)=>Array.from({length:T+1},(P,$)=>{const q=Math.PI-$*Math.PI/T;return{x:F*Math.cos(q),y:M+W*u*Math.sin(q)}}),"arc"),B=[...v(l/2,f,-1),...v(y/2,m,1).reverse()];return t.intersect=function(F){return st.polygon(t,B,F)},o}g(ip,"bucket");var gu=20,pu=8,vB=80,_B=8;function sp(e){const{themeVariables:t}=Ft(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:_B,fill:r,stroke:i,cssClass:"collapsed-group"}}}g(sp,"getCollapsedStyle");async function op(e,t){const r=sp(t.metadata?.containerType),{fill:i,stroke:s}=r,{nodeStyles:o}=nt(t),{shapeSvg:a,bbox:n}=await xt(e,t,mt(t)),{theme:h,themeVariables:c}=Ft();we(a,t.colorIndex,h,c.borderColorArray);const l=t.padding??8,u=n.height,d=Math.max(n.width+l*2,vB,t?.width??0),f=Math.max(u+pu+gu+l*2,t?.height??0),m=-d/2,y=-f/2,x=-28/2,C=a.select(".label");C&&(t.useHtmlLabels??Qt(Ft())?C.attr("transform",`translate(${-n.width/2}, ${-n.height/2+x})`):C.attr("transform",`translate(0, ${-n.height/2+x})`));let b;if(t.look==="handDrawn"){const F=at.svg(a),M=ot(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),W=F.path(me(m,y,d,f,r.rx),M);b=a.insert(()=>W,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",jt(t.cssStyles))}else b=a.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",o).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",d).attr("height",f).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const k=y+l+u+pu;a.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",k).attr("x2",m+d-8).attr("y2",k).attr("stroke",s).attr("stroke-dasharray","3, 3");const T=k+gu/2,v=2.5,B=10;for(let F=-1;F<=1;F++)a.append("circle").attr("class","collapsed-indicator").attr("cx",F*B).attr("cy",T).attr("r",v).attr("fill",s);return ht(t,b),t.calcIntersect=function(F,M){return st.rect(F,M)},t.intersect=function(F){return st.rect(t,F)},a}g(op,"collapsedGroup");function Ye(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Ye,"insertPolygonShape");var LB=["right","left","up","down"],ch="point",FB=g(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),MB=g(e=>LB.filter(t=>e.has(t)).join("|")||ch,"getDirectionKey"),mu={"right|left|up|down":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":g(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":g(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":g(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":g(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":g(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":g(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":g(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:g(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[ch]:()=>[{x:0,y:0}]},AB=g((e,t,r,i)=>{const s=FB(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,h=i??t.width+2*n+2*o,c=MB(s);return(mu[c]??mu[ch])({height:a,midpoint:n,padding:o,width:h})},"getArrowPoints");async function ap(e,t){const r=t,{shapeSvg:i,bbox:s}=await xt(e,r,mt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,h=s.width+2*n+o,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>h?c:h,d=AB(r.directions??[],s,r,u),f=Ye(i,u,a,d);return f.attr("style",r.style??null),ht(r,f),r.intersect=function(m){return st.polygon(r,d,m)},i}g(ap,"block_arrow");async function np(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await xt(e,t,mt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=18,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const k=at.svg(o).path(me(-d/2,m,d,f,u),ot(t,{}));x.node()?.appendChild(k),y&&x.attr("style",y)}else x.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-d/2).attr("y1",m+l).attr("x2",d/2).attr("y2",m+l).attr("style",`stroke:${h};stroke-width:1px`);for(let b=0;b<3;b++)x.append("circle").attr("cx",-d/2+12+b*9).attr("cy",m+l/2).attr("r",2.5).attr("style",`fill:${h};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",m+4).attr("width",Math.max(d-56,10)).attr("height",l-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),ht(t,x);const C=m+l+(f-l)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(b){return st.rect(t,b)},o}g(np,"browser");var Ms=12;async function lp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=(t?.width??h.width)+(t.look==="neo"?o*2:o+Ms),l=(t?.height??h.height)+(t.look==="neo"?a*2:a),u=0,d=c,f=-l,m=0,y=[{x:u+Ms,y:f},{x:d,y:f},{x:d,y:m},{x:u,y:m},{x:u,y:f+Ms},{x:u+Ms,y:f}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=at.svg(n),k=ot(t,{}),T=$t(y),v=b.path(T,k);x=n.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${l/2})`),C&&x.attr("style",C)}else x=Ye(n,c,l,y);return i&&x.attr("style",i),ht(t,x),t.intersect=function(b){return st.polygon(t,y,b)},n}g(lp,"card");function hp(e,t){const{nodeStyles:r}=nt(t);t.label="";const i=e.insert("g").attr("class",mt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=at.svg(i),h=ot(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=$t(a),l=n.path(c,h),u=i.insert(()=>l,":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,a,d)},i}g(hp,"choice");async function uh(e,t,r){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await xt(e,t,mt(t),{ignoreMinWidth:!0}),h=16,c=r?.padding??n,l=Math.sqrt(a.width**2+a.height**2)/2,u=t.look==="neo"?l+h:l+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(o),y=ot(t,{}),x=m.circle(0,0,u*2,y);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",jt(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",u).attr("cx",0).attr("cy",0);return ht(t,d),t.calcIntersect=function(m,y){const x=m.width/2;return st.circle(m,x,y)},t.intersect=function(m){return V.info("Circle intersect",t,u,m),st.circle(t,u,m)},o}g(uh,"circle");async function cp(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await xt(e,r,i),n=s.insert("rect",":first-child"),h=r.padding??0,c=r.positioned?r.width??0:o.width+h,l=r.positioned?r.height??0:o.height+h,u=r.positioned?-c/2:-o.width/2-a,d=r.positioned?-l/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",c).attr("height",l),ht(r,n),r.intersect=function(f){return st.rect(r,f)},s}g(cp,"composite");async function up(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await xt(e,t,mt(t)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=t.padding??12,l=20,u=12,d=Math.max(a.width+c*2,t.width??0,90),f=Math.max(a.height+c*2+l,t.height??0),m=-f/2,{cssStyles:y}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const k=at.svg(o).path(me(-d/2,m,d,f,u),ot(t,{}));x.node()?.appendChild(k),y&&x.attr("style",y)}else x.append("rect").attr("x",-d/2).attr("y",m).attr("width",d).attr("height",f).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-d/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),ht(t,x);const C=m+l+(f-l)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${C-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(b){return st.rect(t,b)},o}g(up,"consoleWindow");function dp(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},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
232
- M ${s.x},${s.y} L ${a.x},${a.y}`}g(dp,"createLine");function fp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",mt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=at.svg(s),h=ot(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=n.circle(0,0,o*2,h),l=dp(o),u=n.path(l,h),d=s.insert(()=>c,":first-child");return d.insert(()=>u),d.attr("class","outer-path"),a&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),ht(t,d),t.intersect=function(f){return V.info("crossedCircle intersect",t,{radius:o,point:f}),st.circle(t,o,f)},s}g(fp,"crossedCircle");function Ge(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}g(Ge,"generateCirclePoints");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=o.width+n,l=o.height+h,u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...Ge(c/2,-l/2,u,30,-90,0),{x:-c/2-u,y:u},...Ge(c/2+u*2,-u,u,20,-180,-270),...Ge(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-l/2},...Ge(c/2,l/2,u,20,0,90)],m=[{x:c/2,y:-l/2-u},{x:-c/2,y:-l/2-u},...Ge(c/2,-l/2,u,20,-90,0),{x:-c/2-u,y:-u},...Ge(c/2+c*.1,-u,u,20,-180,-270),...Ge(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:l/2},...Ge(c/2,l/2,u,20,0,90),{x:-c/2,y:l/2+u},{x:c/2,y:l/2+u}],y=at.svg(s),x=ot(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=$t(f).replace("Z",""),k=y.path(b,x),T=$t(m),v=y.path(T,{...x}),B=s.insert("g",":first-child");return B.insert(()=>v,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-c/2+u-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ht(t,B),t.intersect=function(F){return st.polygon(t,m,F)},s}g(gp,"curlyBraceLeft");function Ve(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:f,y:m})}return a}g(Ve,"generateCirclePoints");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),l=o.height+(t.look==="neo"?h*2:h),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...Ve(c/2,-l/2,u,20,-90,0),{x:c/2+u,y:-u},...Ve(c/2+u*2,-u,u,20,-180,-270),...Ve(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:l/2},...Ve(c/2,l/2,u,20,0,90)],m=[{x:-c/2,y:-l/2-u},{x:c/2,y:-l/2-u},...Ve(c/2,-l/2,u,20,-90,0),{x:c/2+u,y:-u},...Ve(c/2+u*2,-u,u,20,-180,-270),...Ve(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:l/2},...Ve(c/2,l/2,u,20,0,90),{x:c/2,y:l/2+u},{x:-c/2,y:l/2+u}],y=at.svg(s),x=ot(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=$t(f).replace("Z",""),k=y.path(b,x),T=$t(m),v=y.path(T,{...x}),B=s.insert("g",":first-child");return B.insert(()=>v,":first-child").attr("stroke-opacity",0),B.insert(()=>k,":first-child"),B.attr("class","text"),d&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ht(t,B),t.intersect=function(F){return st.polygon(t,m,F)},s}g(pp,"curlyBraceRight");function te(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const d=n+u*l,f=e+r*Math.cos(d),m=t+r*Math.sin(d);a.push({x:-f,y:-m})}return a}g(te,"generateCirclePoints");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=t.look==="neo"?18:t.padding??0,h=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),l=o.height+(t.look==="neo"?h*2:h),u=Math.max(5,l*.1),{cssStyles:d}=t,f=[...te(c/2,-l/2,u,30,-90,0),{x:-c/2-u,y:u},...te(c/2+u*2,-u,u,20,-180,-270),...te(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-l/2},...te(c/2,l/2,u,20,0,90)],m=[...te(-c/2+u+u/2,-l/2,u,20,-90,-180),{x:c/2-u/2,y:u},...te(-c/2-u/2,-u,u,20,0,90),...te(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...te(-c/2+u+u/2,l/2,u,30,-180,-270)],y=[{x:c/2,y:-l/2-u},{x:-c/2,y:-l/2-u},...te(c/2,-l/2,u,20,-90,0),{x:-c/2-u,y:-u},...te(c/2+u*2,-u,u,20,-180,-270),...te(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:l/2},...te(c/2,l/2,u,20,0,90),{x:-c/2,y:l/2+u},{x:c/2-u-u/2,y:l/2+u},...te(-c/2+u+u/2,-l/2,u,20,-90,-180),{x:c/2-u/2,y:u},...te(-c/2-u/2,-u,u,20,0,90),...te(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...te(-c/2+u+u/2,l/2,u,30,-180,-270)],x=at.svg(s),C=ot(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=$t(f).replace("Z",""),T=x.path(k,C),B=$t(m).replace("Z",""),F=x.path(B,C),M=$t(y),W=x.path(M,{...C}),P=s.insert("g",":first-child");return P.insert(()=>W,":first-child").attr("stroke-opacity",0),P.insert(()=>T,":first-child"),P.insert(()=>F,":first-child"),P.attr("class","text"),d&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-l/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ht(t,P),t.intersect=function($){return st.polygon(t,y,$)},s}g(mp,"curlyBraces");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,h=5,{shapeSvg:c,bbox:l}=await xt(e,t,mt(t)),u=Math.max(h,l.height+a*2,t?.height??0),d=u/2,f=d-Math.sqrt(Math.max(0,d**2-(l.height/2)**2)),m=Math.max(u/4,f),y=Math.max(n,l.width+o*2+m*2,(l.width+o*2)*1.25,t?.width??0),{cssStyles:x}=t,C=at.svg(c),b=ot(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=y,T=u,v=k-d,B=T/4,F=[{x:v,y:0},{x:B,y:0},{x:0,y:T/2},{x:B,y:T},{x:v,y:T},...Pe(-v,-T/2,d,50,270,90)],M=$t(F),W=C.path(M,b),P=c.insert(()=>W,":first-child");return P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&P.selectChildren("path").attr("style",i),P.attr("transform",`translate(${-y/2}, ${-u/2})`),ht(t,P),t.intersect=function($){return st.polygon(t,F,$)},c}g(yp,"curvedTrapezoid");async function xp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=t.padding??20,h=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(h*.23,16),56),l=c*.27,u=Math.max(o.height+n*2,t.height?t.height-(2*c-l):0),d=Math.min(h*.177,u*.45),f=u+2*c-l,m=-f/2,y=m+2*c-l,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const M=at.svg(s),W=ot(t,{}),P=M.path(me(-h/2,y,h,u,d),W),$=M.circle(0,m+c,c*2,W);x.insert(()=>$,":first-child"),x.insert(()=>P,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-h/2).attr("y",y).attr("width",h).attr("height",u).attr("rx",d).attr("ry",d).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);ht(t,x);const b=y+u/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`);const k=m+c,T=Math.asin(Math.min(1,(y-k)/c))*180/Math.PI,F=[...Pe(0,-k,c,24,180+T,-T),...Pe(-(-h/2+d),-(y+d),d,12,90,0),...Pe(-(-h/2+d),-(f/2-d),d,12,360,270),...Pe(-(h/2-d),-(f/2-d),d,12,270,180),...Pe(-(h/2-d),-(y+d),d,12,180,90)];return t.intersect=function(M){return st.polygon(t,F,M)},s}g(xp,"person");var EB=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),$B=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),OB=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),yu=8,xu=8;async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<xu&&(t.width=xu)),t.height){const b=n/2/(2.5+n/50);t.height=t.height-o-b*3,t.height<yu&&(t.height=yu)}const{shapeSvg:h,bbox:c,label:l}=await xt(e,t,mt(t)),u=Math.max(t.width??0,c.width)+a,d=u/2,f=d/(2.5+u/50),m=Math.max(t.height??0,c.height)+o+f;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=at.svg(h),b=$B(0,0,u,m,d,f),k=OB(0,f,u,m,d,f),T=ot(t,{}),v=C.path(b,T),B=C.path(k,ot(t,{fill:"none"}));y=h.insert(()=>B,":first-child"),y=h.insert(()=>v,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=EB(0,0,u,m,d,f);y=h.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",jt(x)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-u/2}, ${-(m/2+f)})`),ht(t,y),l.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),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-k*k/(d*d));T>0&&(T=Math.sqrt(T)),T=f-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},h}g(Cp,"cylinder");async function gi(e,t,r){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await xt(e,t,mt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),h=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,l=-h/2;let u,{rx:d,ry:f}=t;const{cssStyles:m}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const y=at.svg(o),x=ot(t,{}),C=d||f?y.path(me(c,l,n,h,d||0),x):y.rectangle(c,l,n,h,x);u=o.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",jt(m))}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",jt(d)).attr("ry",jt(f)).attr("x",c).attr("y",l).attr("width",n).attr("height",h);return ht(t,u,t.look==="handDrawn"?void 0:{width:n,height:h}),t.calcIntersect=function(y,x){return st.rect(y,x)},t.intersect=function(y){return st.rect(t,y)},o}g(gi,"drawRect");async function bp(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,h={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await gi(e,t,h);if(t.look==="handDrawn"){const f=at.svg(c),m=ot(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>f.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),c.insert(()=>f.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),c}const l=c.select(".basic.label-container"),u=(Number(l.attr("width"))||a)??0,d=(Number(l.attr("height"))||n)??0;return u>0&&d>0&&l.attr("stroke-dasharray",`${u} ${d}`),c}g(bp,"datastore");async function kp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t)),c=n.width+s,l=n.height+o,u=l*.2,d=-c/2,f=-l/2-u/2,{cssStyles:m}=t,y=at.svg(a),x=ot(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:d,y:f+u},{x:-d,y:f+u},{x:-d,y:-f},{x:d,y:-f},{x:d,y:f},{x:-d,y:f},{x:-d,y:f+u}],b=y.polygon(C.map(T=>[T.x,T.y]),x),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),h.attr("transform",`translate(${d+(t.padding??0)/2-(n.x-(n.left??0))}, ${f+u+(t.padding??0)/2-(n.y-(n.top??0))})`),ht(t,k),t.intersect=function(T){return st.rect(t,T)},a}g(kp,"dividedRectangle");async function wp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t),{ignoreMinWidth:!0}),c=Math.sqrt(h.width**2+h.height**2)/2,l=(t?.width?t?.width/2:c)+(a??0),u=l+s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(n),y=ot(t,{roughness:.2,strokeWidth:2.5}),x=ot(t,{roughness:.2,strokeWidth:1.5}),C=m.circle(0,0,u*2,y),b=m.circle(0,0,l*2,x);d=n.insert("g",":first-child"),d.attr("class",jt(t.cssClasses)).attr("style",jt(f)),d.node()?.appendChild(C),d.node()?.appendChild(b)}else{d=n.insert("g",":first-child");const m=d.insert("circle",":first-child"),y=d.insert("circle");d.attr("class","basic label-container").attr("style",i),m.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),y.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return ht(t,d),t.intersect=function(m){return V.info("DoubleCircle intersect",t,u,m),st.circle(t,u,m)},n}g(wp,"doublecircle");async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a}=await xt(e,t,mt(t)),{theme:n,themeVariables:h}=Ft();we(s,t.colorIndex,n,h.borderColorArray);const c=a??10,l=o.width/2+c*2,u=o.height/2+c*2;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(s),y=ot(t,{}),x=m.ellipse(0,0,l*2,u*2,y);d=s.insert(()=>x,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else d=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",l).attr("ry",u).attr("cx",0).attr("cy",0);return t.width=l*2,t.height=u*2,ht(t,d),t.calcIntersect=function(m,y){const x=m.width/2,C=m.height/2;return st.ellipse(m,x,C,y)},t.intersect=function(m){return st.ellipse(t,l,u,m)},s}g(Sp,"usecaseEllipse");function Tp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",mt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,h=at.svg(o),{nodeBorder:c}=r,l=ot(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const u=h.circle(0,0,a*2,l),d=o.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),ht(t,d),t.intersect=function(f){return V.info("filledCircle intersect",t,{radius:a,point:f}),st.circle(t,a,f)},o}g(Tp,"filledCircle");var Cu=10,bu=10;async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<Cu&&(t.height=Cu),t.width=(t?.width??0)-o-o/2,t.width<bu&&(t.width=bu));const{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t)),c=(t?.width?t?.width:n.width)+(o??0),l=t?.height?t?.height:c+n.height,u=l,d=[{x:0,y:-l},{x:u,y:-l},{x:u/2,y:0}],{cssStyles:f}=t,m=at.svg(a),y=ot(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=$t(d),C=m.path(x,y),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=l,ht(t,b),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-l/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return V.info("Triangle intersect",t,d,k),st.polygon(t,d,k)},a}g(Bp,"flippedTriangle");async function vp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=t.padding??12,h=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,l=Math.max(Math.min(c*.16,14),8),u=Math.max(c+l,t.height??0),d=u-l,f=Math.max(h*.38,28),m=-u/2,y=[{x:-h/2,y:m},{x:-h/2+f,y:m},{x:-h/2+f,y:m+l},{x:h/2,y:m+l},{x:h/2,y:u/2},{x:-h/2,y:u/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:C}=t;let b;if(t.look==="handDrawn"){const v=at.svg(s).path(x,ot(t,{}));b=s.insert(()=>v,":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"?ht(t,b):ht(t,b,{width:h,height:u});const k=m+l+d/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${k-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(T){return st.polygon(t,y,T)},s}g(vp,"folder");function _p(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=nt(t);t.label="";const a=e.insert("g").attr("class",mt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let h=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);(r==="LR"||r==="RL")&&(h=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const l=-1*h/2,u=-1*c/2,d=at.svg(a),f=ot(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const m=d.rectangle(l,u,h,c,f),y=a.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),ht(t,y);const x=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)},a}g(_p,"forkJoin");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:h,bbox:c}=await xt(e,t,mt(t)),l=(t?.height?t?.height:Math.max(o,c.height))+n*2,u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=(t?.width?t?.width:Math.max(s,c.width)+d*2)+a*2,{cssStyles:m}=t,y=at.svg(h),x=ot(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-f/2,y:-l/2},{x:f/2-u,y:-l/2},...Pe(-f/2+u,0,u,50,90,270),{x:f/2-u,y:l/2},{x:-f/2,y:l/2}],b=$t(C),k=y.path(b,x),T=h.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),ht(t,T),t.intersect=function(v){return V.info("Pill intersect",t,{radius:u,point:v}),st.polygon(t,C,v)},h}g(Lp,"halfRoundedRectangle");var DB=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,h=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-h}const{shapeSvg:l,bbox:u}=await xt(e,t,mt(t)),d=(t?.height?t?.height:u.height)+h,f=d/s,m=(t?.width?t?.width:u.width)+2*f+c,y=[{x:f,y:0},{x:m-f,y:0},{x:m,y:-d/2},{x:m-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=at.svg(l),k=ot(t,{}),T=DB(0,0,m,d,f),v=b.path(T,k);x=l.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${d/2})`),C&&x.attr("style",C)}else x=Ye(l,m,d,y);return i&&x.attr("style",i),t.width=m,t.height=d,ht(t,x),t.intersect=function(b){return st.polygon(t,y,b)},l}g(Fp,"hexagon");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await xt(e,t,mt(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,h=at.svg(s),c=ot(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const l=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],u=$t(l),d=h.path(u,c),f=s.insert(()=>d,":first-child");return f.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-o/2}, ${-a/2})`),ht(t,f),t.intersect=function(m){return V.info("Pill intersect",t,{points:l}),st.polygon(t,l,m)},s}g(Mp,"hourglass");async function Ap(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,label:u}=await xt(e,t,"icon-shape default"),d=t.pos==="t",f=n,m=n,{nodeBorder:y}=r,{stylesMap:x}=yr(t),C=-m/2,b=-f/2,k=t.label?8:0,T=at.svg(c),v=ot(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const B=T.rectangle(C,b,m,f,v),F=Math.max(m,l.width),M=f+l.height+k,W=T.rectangle(-F/2,-M/2,F,M,{...v,fill:"transparent",stroke:"none"}),P=c.insert(()=>B,":first-child"),$=c.insert(()=>W);if(t.icon){const q=c.append("g");q.html(`<g>${await fi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=q.node().getBBox(),L=A.width,E=A.height,_=A.x,R=A.y;q.attr("transform",`translate(${-L/2-_},${d?l.height/2+k/2-E/2-R:-l.height/2-k/2-E/2-R})`),q.attr("style",`color: ${x.get("stroke")??y};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${d?-M/2:M/2-l.height})`),P.attr("transform",`translate(0,${d?l.height/2+k/2:-l.height/2-k/2})`),ht(t,$),t.intersect=function(q){if(V.info("iconSquare intersect",t,q),!t.label)return st.rect(t,q);const A=t.x??0,L=t.y??0,E=t.height??0;let _=[];return d?_=[{x:A-l.width/2,y:L-E/2},{x:A+l.width/2,y:L-E/2},{x:A+l.width/2,y:L-E/2+l.height+k},{x:A+m/2,y:L-E/2+l.height+k},{x:A+m/2,y:L+E/2},{x:A-m/2,y:L+E/2},{x:A-m/2,y:L-E/2+l.height+k},{x:A-l.width/2,y:L-E/2+l.height+k}]:_=[{x:A-m/2,y:L-E/2},{x:A+m/2,y:L-E/2},{x:A+m/2,y:L-E/2+f},{x:A+l.width/2,y:L-E/2+f},{x:A+l.width/2/2,y:L+E/2},{x:A-l.width/2,y:L+E/2},{x:A-l.width/2,y:L-E/2+f},{x:A-m/2,y:L-E/2+f}],st.polygon(t,_,q)},c}g(Ap,"icon");async function Ep(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,label:u}=await xt(e,t,"icon-shape default"),d=20,f=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=yr(t),b=at.svg(c),k=ot(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=C.get("fill");k.stroke=T??x;const v=c.append("g");t.icon&&v.html(`<g>${await fi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const B=v.node().getBBox(),F=B.width,M=B.height,W=B.x,P=B.y,$=Math.max(F,M)*Math.SQRT2+d*2,q=b.circle(0,0,$,k),A=Math.max($,l.width),L=$+l.height+f,E=b.rectangle(-A/2,-L/2,A,L,{...k,fill:"transparent",stroke:"none"}),_=c.insert(()=>q,":first-child"),R=c.insert(()=>E);return v.attr("transform",`translate(${-F/2-W},${m?l.height/2+f/2-M/2-P:-l.height/2-f/2-M/2-P})`),v.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-L/2:L/2-l.height})`),_.attr("transform",`translate(0,${m?l.height/2+f/2:-l.height/2-f/2})`),ht(t,R),t.intersect=function(I){return V.info("iconSquare intersect",t,I),st.rect(t,I)},c}g(Ep,"iconCircle");async function $p(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,halfPadding:u,label:d}=await xt(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=yr(t),k=-y/2,T=-m/2,v=t.label?8:0,B=at.svg(c),F=ot(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const M=b.get("fill");F.stroke=M??C;const W=B.path(me(k,T,y,m,5),F),P=Math.max(y,l.width),$=m+l.height+v,q=B.rectangle(-P/2,-$/2,P,$,{...F,fill:"transparent",stroke:"none"}),A=c.insert(()=>W,":first-child").attr("class","icon-shape2"),L=c.insert(()=>q);if(t.icon){const E=c.append("g");E.html(`<g>${await fi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=E.node().getBBox(),R=_.width,I=_.height,Q=_.x,j=_.y;E.attr("transform",`translate(${-R/2-Q},${f?l.height/2+v/2-I/2-j:-l.height/2-v/2-I/2-j})`),E.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-$/2:$/2-l.height})`),A.attr("transform",`translate(0,${f?l.height/2+v/2:-l.height/2-v/2})`),ht(t,L),t.intersect=function(E){if(V.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const _=t.x??0,R=t.y??0,I=t.height??0;let Q=[];return f?Q=[{x:_-l.width/2,y:R-I/2},{x:_+l.width/2,y:R-I/2},{x:_+l.width/2,y:R-I/2+l.height+v},{x:_+y/2,y:R-I/2+l.height+v},{x:_+y/2,y:R+I/2},{x:_-y/2,y:R+I/2},{x:_-y/2,y:R-I/2+l.height+v},{x:_-l.width/2,y:R-I/2+l.height+v}]:Q=[{x:_-y/2,y:R-I/2},{x:_+y/2,y:R-I/2},{x:_+y/2,y:R-I/2+m},{x:_+l.width/2,y:R-I/2+m},{x:_+l.width/2/2,y:R+I/2},{x:_-l.width/2,y:R+I/2},{x:_-l.width/2,y:R-I/2+m},{x:_-y/2,y:R-I/2+m}],st.polygon(t,Q,E)},c}g($p,"iconRounded");async function Op(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=nt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),h=i?.wrappingWidth;t.width=Math.max(n,h??0);const{shapeSvg:c,bbox:l,halfPadding:u,label:d}=await xt(e,t,"icon-shape default"),f=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=yr(t),k=-y/2,T=-m/2,v=t.label?8:0,B=at.svg(c),F=ot(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const M=b.get("fill");F.stroke=M??C;const W=B.path(me(k,T,y,m,.1),F),P=Math.max(y,l.width),$=m+l.height+v,q=B.rectangle(-P/2,-$/2,P,$,{...F,fill:"transparent",stroke:"none"}),A=c.insert(()=>W,":first-child"),L=c.insert(()=>q);if(t.icon){const E=c.append("g");E.html(`<g>${await fi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=E.node().getBBox(),R=_.width,I=_.height,Q=_.x,j=_.y;E.attr("transform",`translate(${-R/2-Q},${f?l.height/2+v/2-I/2-j:-l.height/2-v/2-I/2-j})`),E.attr("style",`color: ${b.get("stroke")??x};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${f?-$/2:$/2-l.height})`),A.attr("transform",`translate(0,${f?l.height/2+v/2:-l.height/2-v/2})`),ht(t,L),t.intersect=function(E){if(V.info("iconSquare intersect",t,E),!t.label)return st.rect(t,E);const _=t.x??0,R=t.y??0,I=t.height??0;let Q=[];return f?Q=[{x:_-l.width/2,y:R-I/2},{x:_+l.width/2,y:R-I/2},{x:_+l.width/2,y:R-I/2+l.height+v},{x:_+y/2,y:R-I/2+l.height+v},{x:_+y/2,y:R+I/2},{x:_-y/2,y:R+I/2},{x:_-y/2,y:R-I/2+l.height+v},{x:_-l.width/2,y:R-I/2+l.height+v}]:Q=[{x:_-y/2,y:R-I/2},{x:_+y/2,y:R-I/2},{x:_+y/2,y:R-I/2+m},{x:_+l.width/2,y:R-I/2+m},{x:_+l.width/2/2,y:R+I/2},{x:_-l.width/2,y:R+I/2},{x:_-l.width/2,y:R-I/2+m},{x:_-y/2,y:R-I/2+m}],st.polygon(t,Q,E)},c}g(Op,"iconSquare");async function Dp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=nt(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const h=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:h,l=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:d,label:f}=await xt(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,x=-l/2,C=t.label?8:0,b=at.svg(u),k=ot(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=b.rectangle(y,x,c,l,k),v=Math.max(c,d.width),B=l+d.height+C,F=b.rectangle(-v/2,-B/2,v,B,{...k,fill:"none",stroke:"none"}),M=u.insert(()=>T,":first-child"),W=u.insert(()=>F);if(t.img){const P=u.append("image");P.attr("href",t.img),P.attr("width",c),P.attr("height",l),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-c/2},${m?B/2-l:-B/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-l/2-d.height/2-C/2:l/2-d.height/2+C/2})`),M.attr("transform",`translate(0,${m?d.height/2+C/2:-d.height/2-C/2})`),ht(t,W),t.intersect=function(P){if(V.info("iconSquare intersect",t,P),!t.label)return st.rect(t,P);const $=t.x??0,q=t.y??0,A=t.height??0;let L=[];return m?L=[{x:$-d.width/2,y:q-A/2},{x:$+d.width/2,y:q-A/2},{x:$+d.width/2,y:q-A/2+d.height+C},{x:$+c/2,y:q-A/2+d.height+C},{x:$+c/2,y:q+A/2},{x:$-c/2,y:q+A/2},{x:$-c/2,y:q-A/2+d.height+C},{x:$-d.width/2,y:q-A/2+d.height+C}]:L=[{x:$-c/2,y:q-A/2},{x:$+c/2,y:q-A/2},{x:$+c/2,y:q-A/2+l},{x:$+d.width/2,y:q-A/2+l},{x:$+d.width/2/2,y:q+A/2},{x:$-d.width/2,y:q+A/2},{x:$-d.width/2,y:q-A/2+l},{x:$-c/2,y:q-A/2+l}],st.polygon(t,L,P)},u}g(Dp,"imageSquare");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=Math.max(h.height+o*2,t.height??0),l=Math.max(h.width+a*2,(t.width??0)-c),u=[{x:0,y:0},{x:l,y:0},{x:l+3*c/6,y:-c},{x:-3*c/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(n),y=ot(t,{}),x=$t(u),C=m.path(x,y);d=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=Ye(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ht(t,d),t.intersect=function(m){return st.polygon(t,u,m)},n}g(Ip,"inv_trapezoid");async function Pp(e,t){const{shapeSvg:r,bbox:i,label:s}=await xt(e,t,"label"),o=r.insert("rect",":first-child");return o.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))})`),ht(t,o),t.intersect=function(h){return st.rect(t,h)},r}g(Pp,"labelRect");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=Math.max(h.height+o,t.height??0),l=Math.max(h.width+a,(t.width??0)-c),u=[{x:0,y:0},{x:l+3*c/6,y:0},{x:l,y:-c},{x:-(3*c)/6,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(n),y=ot(t,{}),x=$t(u),C=m.path(x,y);d=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=Ye(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ht(t,d),t.intersect=function(m){return st.polygon(t,u,m)},n}g(Rp,"lean_left");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=Math.max(h.height+o,t.height??0),l=Math.max(h.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:l,y:0},{x:l+3*c/6,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(n),y=ot(t,{}),x=$t(u),C=m.path(x,y);d=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=Ye(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ht(t,d),t.intersect=function(m){return st.polygon(t,u,m)},n}g(qp,"lean_right");function Np(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",mt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),h=7,c=[{x:a,y:0},{x:0,y:n+h/2},{x:a-2*h,y:n+h/2},{x:0,y:2*n},{x:a,y:n-h/2},{x:2*h,y:n-h/2}],l=at.svg(s),u=ot(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=$t(c),f=l.path(d,u),m=s.insert(()=>f,":first-child");return m.attr("class","outer-path"),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${a/2},${-n})`),ht(t,m),t.intersect=function(y){return V.info("lightningBolt intersect",t,y),st.polygon(t,c,y)},s}g(Np,"lightningBolt");var IB=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),PB=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),RB=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ku=10,wu=10;async function Wp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-o,t.width<wu&&(t.width=wu);const k=C/2/(2.5+C/50);t.height=(t.height??0)-a-k*3,t.height<ku&&(t.height=ku)}const{shapeSvg:n,bbox:h,label:c}=await xt(e,t,mt(t)),l=(t?.width?t?.width:h.width)+o*2,u=l/2,d=u/(2.5+l/50),f=(t?.height?t?.height:h.height)+d+a*2,m=f*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=at.svg(n),b=PB(0,0,l,f,u,d,m),k=RB(0,d,l,f,u,d),T=ot(t,{}),v=C.path(b,T),B=C.path(k,T);n.insert(()=>B,":first-child").attr("class","line"),y=n.insert(()=>v,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=IB(0,0,l,f,u,d,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",jt(x)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-l/2}, ${-(f/2+d)})`),ht(t,y),c.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+d-(h.y-(h.top??0))})`),t.intersect=function(C){const b=st.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-k*k/(u*u));T>0&&(T=Math.sqrt(T)),T=d-T,C.y-(t.y??0)>0&&(T=-T),b.y+=T}return b},n}g(Wp,"linedCylinder");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:h,label:c}=await xt(e,t,mt(t)),l=(t?.width?t?.width:h.width)+(o??0)*2,u=(t?.height?t?.height:h.height)+(a??0)*2,d=t.look==="neo"?u/4:u/8,f=u+d,{cssStyles:m}=t,y=at.svg(n),x=ot(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...mr(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,d,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],b=y.polygon(C.map(T=>[T.x,T.y]),x),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(h.x-(h.left??0))},${-u/2+(t.padding??0)-d-(h.y-(h.top??0))})`),ht(t,k),t.intersect=function(T){return st.polygon(t,C,T)},n}g(zp,"linedWaveEdgedRect");var qB=56,Ga=72,Su=8,Tu=2,NB=8,WB={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Bu=Math.PI/3,vu=.6,Va=g((e,t)=>{const r=t*vu,i=t*Math.sqrt(1-vu**2),s=Math.cos(Bu),o=-Math.sin(Bu),a=r*-o,n=e+r*s,h=i*s,c=i*o;return`M ${a-h} ${n-c} L ${a+h} ${n+c}`},"businessMarkerPathForCircle"),zB={normal:Va(-24,12),hollow:Va(-23,9),awesome:Va(-21,13),icon:"M 12 -8 L 26 -26"},_u=g((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),dh=g((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const n=at.svg(e).path(r,ot(t,s?{fill:"none"}:{}));return e.insert(()=>n,":first-child").attr("class",i)}const o=e.append("path").attr("class",i).attr("d",r);return s&&o.attr("fill","none"),o},"appendActorPath"),HB=g((e,t,r,i,s,o,a=!1)=>{if(t.look==="handDrawn"){const c=at.svg(e).circle(r,i,s*2,ot(t,a?{fill:"none"}:{}));return e.insert(()=>c,":first-child").attr("class",o)}const n=e.append("circle").attr("class",o).attr("cx",r).attr("cy",i).attr("r",s);return a&&n.attr("fill","none"),n},"appendActorCircle"),YB=g((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",zB[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function ps(e,t,r,i){const{labelStyles:s,nodeStyles:o}=nt(t);t.labelStyle=s;const a=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:n,bbox:h,label:c}=await xt(e,a,mt(t,`usecase-actor-variant usecase-actor-${r}`)),l=t.accessibleName??t.label;l&&n.attr("role","img").attr("aria-label",l),c.attr("class","label actor-label usecase-actor-label");const{theme:u,themeVariables:d}=Ft();we(n,t.colorIndex,u,d.borderColorArray);let f,m;if(t.stereotype){const M=await Br(n,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=M.label.attr("class","label usecase-stereotype"),m=M.bbox}const y=n.append("g").attr("class",`usecase-actor-glyph ${WB[r]}`).attr("style",o||null);await i(y,t),YB(y,t,r);const x=t.padding??NB,C=m?.height??0,b=Ga+Su+h.height+(m?C+Tu:0),k=Math.max(qB,h.width,m?.width??0)+x*2,T=b+x*2,v=-b/2;y.attr("transform",`translate(0,${v+Ga/2})`);let B=v+Ga+Su;f&&m&&(B+=C/2,_u(f,m,B),B+=C/2+Tu),_u(c,h,B+h.height/2);const F=n.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-k/2).attr("y",-T/2).attr("width",k).attr("height",T).attr("opacity",0).attr("aria-hidden","true");return ht(t,F),t.intersect=M=>st.rect(t,M),n}g(ps,"renderUsecaseActor");var UB=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Hp(e,t){return ps(e,t,"normal",(r,i)=>{dh(r,i,UB,"usecase-actor-stick")})}g(Hp,"usecaseActor");var jB=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function Yp(e,t){return ps(e,t,"awesome",(r,i)=>{dh(r,i,jB,"usecase-actor-awesome-silhouette")})}g(Yp,"usecaseActorAwesome");var XB=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Up(e,t){return ps(e,t,"hollow",(r,i)=>{HB(r,i,0,-23,9,"usecase-actor-hollow-head",!0),dh(r,i,XB,"usecase-actor-hollow-body",!0)})}g(Up,"usecaseActorHollow");var Yr=52,Lu=42,Fu=-2,GB=g(async(e,t)=>{const r=-Yr/2,i=Fu-Yr/2;if(t.look==="handDrawn"){const l=at.svg(e).rectangle(r,i,Yr,Yr,ot(t,{}));e.insert(()=>l,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",Yr).attr("height",Yr).attr("rx",4).attr("ry",4);const s=t.icon??"",o=await qf(s.includes(":")?s:`fa:${s}`),a=await fi(s,{height:Lu,width:Lu,fallbackPrefix:"fa"}),n=e.append("g").attr("class",`usecase-actor-icon-symbol${o?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${a}</g>`),h=n.node()?.getBBox();h&&n.attr("transform",`translate(${-h.width/2-h.x},${Fu-h.height/2-h.y})`)},"drawIconActor");async function jp(e,t){return ps(e,t,"icon",GB)}g(jp,"usecaseActorIcon");var Mu=g((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function Xp(e,t){const r=t,{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const o=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:a,bbox:n,halfPadding:h,label:c}=await xt(e,o,mt(t,"usecase-business-shape"));c.attr("class","label usecase-label");const{theme:l,themeVariables:u}=Ft();we(a,t.colorIndex,l,u.borderColorArray);let d,f;if(r.stereotype){const A=await Br(a,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});d=A.label.attr("class","label usecase-stereotype"),f=A.bbox}const m=f?2:0,y=n.height+(f?.height??0)+m,x=Math.max(n.width,f?.width??0),C=h??10,b=x/2+C*2,k=y/2+C*2,T=Math.min(Math.max(C/5,1),C/2),v=x/2+T,B=b-T,F=v/b,M=B/b,W=k*Math.sqrt(Math.max(0,1-F*F)),P=-k*Math.sqrt(Math.max(0,1-M*M));d&&f&&Mu(d,f,-y/2+f.height/2),Mu(c,n,y/2-n.height/2);let $;if(t.look==="handDrawn"){const L=at.svg(a).ellipse(0,0,b*2,k*2,ot(t,{}));$=a.insert(()=>L,":first-child").attr("class","basic label-container usecase-business-ellipse")}else $=a.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",k).attr("cx",0).attr("cy",0);a.append("path").attr("class","usecase-business-marker").attr("d",`M ${v} ${W} L ${B} ${P}`).attr("fill","none").attr("style",s||null);const q=r.accessibleName??r.label;return q&&a.attr("role","img").attr("aria-label",q),ht(t,$),t.calcIntersect=(A,L)=>st.ellipse(A,A.width/2,A.height/2,L),t.intersect=A=>st.ellipse(t,b,k,A),a}g(Xp,"usecaseBusiness");var Za=8,Au=4,VB=1,Ka=g((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),o=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-o})`)},"positionLabel"),ZB=g(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:VB},"numericStrokeWidth");async function Gp(e,t){const r=t,{labelStyles:i,nodeStyles:s}=nt(t),{stylesMap:o}=yr(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t,"usecase-json-table"));a.attr("role","img"),r.accessibleName&&a.attr("aria-label",r.accessibleName),h.attr("class","label usecase-json-title");const c=a.append("g").attr("class","usecase-json-table-grid"),l=[];for(const A of r.jsonRows??[]){const L=await Br(c,A.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),E=await Br(c,A.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});l.push({key:{label:L.label.attr("class","label usecase-json-key"),bbox:L.bbox},value:{label:E.label.attr("class","label usecase-json-value"),bbox:E.bbox}})}const u=Math.max(0,...l.map(({key:A})=>A.bbox.width))+Za*2,d=Math.max(0,...l.map(({value:A})=>A.bbox.width))+Za*2,f=n.width+Za*2,m=Math.max(f,u+d),y=d+Math.max(0,m-u-d),x=n.height+Au*2,C=l.map(({key:A,value:L})=>Math.max(A.bbox.height,L.bbox.height)+Au*2),b=x+C.reduce((A,L)=>A+L,0),k=ZB(o.get("stroke-width")),T=m+k*2,v=b+k*2,B=-m/2,F=-b/2,M=t.look==="handDrawn"?at.svg(a):void 0,W=M?ot(t,{}):void 0,P=g((A,L,E,_,R,I)=>{if(M&&W){const Q=M.rectangle(E,_,R,I,W);return A.insert(()=>Q,":first-child").attr("class",L)}return A.insert("rect",":first-child").attr("class",L).attr("x",E).attr("y",_).attr("width",R).attr("height",I).attr("style",s)},"insertCell"),$=P(a,"label-container usecase-json-border",-T/2,-v/2,T,v);P(c,"usecase-json-cell usecase-json-title-cell",B,F,m,x),c.node()?.append(h.node()),Ka(h,n,0,F+x/2);let q=F+x;return l.forEach(({key:A,value:L},E)=>{const _=C[E],R=c.append("g").attr("class","usecase-json-row").attr("data-row-index",E).attr("transform",`translate(0,${q})`);P(R,"usecase-json-cell usecase-json-key-cell",B,0,u,_),P(R,"usecase-json-cell usecase-json-value-cell",B+u,0,y,_),R.node()?.append(A.label.node(),L.label.node()),Ka(A.label,A.bbox,B+u/2,_/2),Ka(L.label,L.bbox,B+u+y/2,_/2),q+=_}),ht(t,$),t.intersect=A=>st.rect(t,A),a}g(Gp,"usecaseJsonTable");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:h,bbox:c,label:l}=await xt(e,t,mt(t)),u=(t?.width?t?.width:c.width)+o*2+2*n,d=(t?.height?t?.height:c.height)+a*2+2*n,f=u-2*n,m=d-2*n,y=-f/2,x=-m/2,{cssStyles:C}=t,b=at.svg(h),k=ot(t,{}),T=[{x:y-n,y:x+n},{x:y-n,y:x+m+n},{x:y+f-n,y:x+m+n},{x:y+f-n,y:x+m},{x:y+f,y:x+m},{x:y+f,y:x+m-n},{x:y+f+n,y:x+m-n},{x:y+f+n,y:x-n},{x:y+n,y:x-n},{x:y+n,y:x},{x:y,y:x},{x:y,y:x+n}],v=[{x:y,y:x+n},{x:y+f-n,y:x+n},{x:y+f-n,y:x+m},{x:y+f,y:x+m},{x:y+f,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=$t(T);let F=b.path(B,k);const M=$t(v);let W=b.path(M,k);t.look!=="handDrawn"&&(F=Rn(F),W=Rn(W));const P=h.insert("g",":first-child");return P.insert(()=>F),P.insert(()=>W),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),ht(t,P),t.intersect=function($){return st.polygon(t,T,$)},h}g(Vp,"multiRect");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=t.padding??0,h=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-h*2,t.height=(t?.height??0)-c*3);const u=Math.max(o.width,t?.width??0)+h*2,d=Math.max(o.height,t?.height??0)+c*3,f=t.look==="neo"?d/4:d/8,m=d+(l?f/2:-f/2),y=-u/2,x=-m/2,C=10,{cssStyles:b}=t,k=mr(y-C,x+m+C,y+u-C,x+m+C,f,.8),T=k?.[k.length-1],v=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...k,{x:y+u-C,y:T.y-C},{x:y+u,y:T.y-C},{x:y+u,y:T.y-2*C},{x:y+u+C,y:T.y-2*C},{x:y+u+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],B=[{x:y,y:x+C},{x:y+u-C,y:x+C},{x:y+u-C,y:T.y-C},{x:y+u,y:T.y-C},{x:y+u,y:x},{x:y,y:x}],F=at.svg(s),M=ot(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const W=$t(v),P=F.path(W,M),$=$t(B),q=F.path($,M),A=s.insert(()=>P,":first-child");return A.insert(()=>q),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(0,${-f/2})`),a.attr("transform",`translate(${-(o.width/2)-C-(o.x-(o.left??0))}, ${-(o.height/2)+C-f-(o.y-(o.top??0))})`),ht(t,A),t.intersect=function(L){return st.polygon(t,v,L)},s}g(Zp,"multiWaveEdgedRectangle");async function Kp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i,t.useHtmlLabels||Qt(Nt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),l=Math.max(n.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:f}=t,m=at.svg(a),y=ot(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(u,d,c,l,y),C=a.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ht(t,C),t.intersect=function(b){return st.rect(t,b)},a}g(Kp,"note");var KB=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await xt(e,t,mt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),h=a+n,c=.5,l=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=at.svg(s),m=ot(t,{}),y=KB(0,0,h),x=f.path(y,m);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-h/2+c}, ${h/2})`),d&&u.attr("style",d)}else u=Ye(s,h,h,l),u.attr("transform",`translate(${-h/2+c}, ${h/2})`);return i&&u.attr("style",i),ht(t,u),t.calcIntersect=function(f,m){const y=f.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return st.polygon(f,x,m)},t.intersect=function(f){return this.calcIntersect(t,f)},s}g(Qp,"question");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:h,label:c}=await xt(e,t,mt(t)),l=h.width+(t.look==="neo"?o*2:o),u=Math.max(h.height+(t.look==="neo"?a*2:a),t.height??0),d=u/4,m=-Math.max(l,(t.width??0)-d)/2,y=-u/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:b}=t,k=at.svg(n),T=ot(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=$t(C),B=k.path(v,T),F=n.insert(()=>B,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ht(t,F),t.intersect=function(M){return st.polygon(t,C,M)},n}g(Jp,"rect_left_inv_arrow");async function tm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),h=t.description,c=t.label,l=await Je(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(Qt(Ft())){const M=l.children[0],W=Lt(l);u=M.getBoundingClientRect(),W.attr("width",u.width),W.attr("height",u.height)}V.info("Text 2",h);const d=h||[],f=l.getBBox(),m=await Je(n,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),y=m.children[0],x=Lt(m);u=y.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;Lt(m).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+C+5)+")"),Lt(l).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),T=-u.width/2-C,v=-u.height/2-C;let B,F;if(t.look==="handDrawn"){const M=at.svg(o),W=ot(t,{}),P=M.path(me(T,v,b,k,t.rx||0),W),$=M.line(-u.width/2-C,-u.height/2-C+f.height+C,u.width/2+C,-u.height/2-C+f.height+C,W);F=o.insert(()=>(V.debug("Rough node insert CXC",P),$),":first-child"),B=o.insert(()=>(V.debug("Rough node insert CXC",P),P),":first-child")}else B=a.insert("rect",":first-child"),F=a.insert("line"),B.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+f.height+C).attr("y2",-u.height/2-C+f.height+C);return ht(t,B),t.intersect=function(M){return st.rect(t,M)},o}g(tm,"rectWithTitle");async function em(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return gi(e,t,s)}g(em,"roundedRect");var Cr=8;async function rm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?Cr:Cr*2),l=(t?.height??n.height)+o*2,u=c-Cr,d=l,f=Cr-c/2,m=-l/2,{cssStyles:y}=t,x=at.svg(a),C=ot(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:f,y:m},{x:f+u,y:m},{x:f+u,y:m+d},{x:f-Cr,y:m+d},{x:f-Cr,y:m},{x:f,y:m},{x:f,y:m+d}],k=x.polygon(b.map(v=>[v.x,v.y]),C),T=a.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",jt(y)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),h.attr("transform",`translate(${Cr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ht(t,T),t.intersect=function(v){return st.rect(t,v)},a}g(rm,"shadedProcess");async function im(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:h,label:c}=await xt(e,t,mt(t)),l=(t?.width?t?.width:h.width)+o*2,u=((t?.height?t?.height:h.height)+a*2)*1.5,d=l,f=u/1.5,m=-d/2,y=-f/2,{cssStyles:x}=t,C=at.svg(n),b=ot(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y},{x:m,y:y+f},{x:m+d,y:y+f},{x:m+d,y:y-f/2}],T=$t(k),v=C.path(T,b),B=n.insert(()=>v,":first-child");return B.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&B.selectChildren("path").attr("style",i),B.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))}, ${-f/4+(t.padding??0)-(h.y-(h.top??0))})`),ht(t,B),t.intersect=function(F){return st.polygon(t,k,F)},n}g(im,"slopedRect");async function sm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},a=await gi(e,t,o);if(t.colorIndex!==void 0){const{theme:n,themeVariables:h}=Ft();we(a,t.colorIndex,n,h.borderColorArray)}return a}g(sm,"squareRect");var Wn=50,QB=g((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(Wn-1))),o=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-o),h:i}},"stadiumDimensions");async function om(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?40:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),{w:c,h:l}=QB(h,o,a),u=l/2,{cssStyles:d}=t,f=at.svg(n),m=ot(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2+u,y:-l/2},{x:c/2-u,y:-l/2},...Pe(-c/2+u,0,u,Wn,90,270),{x:c/2-u,y:l/2},...Pe(c/2-u,0,u,Wn,270,450)],x=$t(y),C=f.path(x,m),b=n.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),ht(t,b),t.intersect=function(k){return st.polygon(t,y,k)},n}g(om,"stadium");async function am(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return gi(e,t,r)}g(am,"state");function nm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:h,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 l=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=at.svg(l),d=ot(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=u.circle(0,0,t.width,{...d,stroke:a,strokeWidth:2}),m=n??h,y=(t.width??0)*5/14,x=u.circle(0,0,y,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=l.insert(()=>f,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),o&&C.selectAll("path").attr("style",o),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${k})`)}return ht(t,C),t.intersect=function(b){return st.circle(t,(t.width??0)/2,b)},l}g(nm,"stateEnd");function lm(e,t,{config:{themeVariables:r}}){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 o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const h=at.svg(o).circle(0,0,t.width,Kw(i));a=o.insert(()=>h),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",h=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${h})`)}return ht(t,a),t.intersect=function(n){return st.circle(t,(t.width??7)/2,n)},o}g(lm,"stateStart");var Ur=8;async function hm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=Math.max(h.width+2*Ur+o,t.width??0),l=Math.max(h.height+a,t.height??0),u=c-2*Ur,d=l,f=-c/2,m=-l/2,y=[{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=at.svg(n),C=ot(t,{}),b=x.rectangle(f,m,u+16,d,C),k=x.line(f+Ur,m,f+Ur,m+d,C),T=x.line(f+Ur+u,m,f+Ur+u,m+d,C);n.insert(()=>k,":first-child"),n.insert(()=>T,":first-child");const v=n.insert(()=>b,":first-child"),{cssStyles:B}=t;v.attr("class","basic label-container").attr("style",jt(B)),ht(t,v)}else{const x=Ye(n,u,d,y);i&&x.attr("style",i),ht(t,x)}return t.intersect=function(x){return st.polygon(t,y,x)},n}g(hm,"subroutine");var Qa=.2;async function cm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Qa*(t.height+a*2),10));const{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=(t?.height?t?.height:h.height)+a*2,l=Qa*c,u=Qa*c,f=(t?.width?t?.width:h.width)+o*2+l-l,m=c,y=-f/2,x=-m/2,{cssStyles:C}=t,b=at.svg(n),k=ot(t,{}),T=[{x:y-l/2,y:x},{x:y+f+l/2,y:x},{x:y+f+l/2,y:x+m},{x:y-l/2,y:x+m}],v=[{x:y+f-l/2,y:x+m},{x:y+f+l/2,y:x+m},{x:y+f+l/2,y:x+m-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const B=$t(T),F=b.path(B,k),M=$t(v),W=b.path(M,{...k,fillStyle:"solid"}),P=n.insert(()=>W,":first-child");return P.insert(()=>F,":first-child"),P.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),ht(t,P),t.intersect=function($){return st.polygon(t,T,$)},n}g(cm,"taggedRect");async function um(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await xt(e,t,mt(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=h/8,l=.2*n,u=.2*h,d=h+c,{cssStyles:f}=t,m=at.svg(s),y=ot(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:d/2},...mr(-n/2-n/2*.1,d/2,n/2+n/2*.1,d/2,c,.8),{x:n/2+n/2*.1,y:-d/2},{x:-n/2-n/2*.1,y:-d/2}],C=-n/2+n/2*.1,b=-d/2-u*.4,k=[{x:C+n-l,y:(b+h)*1.3},{x:C+n,y:b+h-u},{x:C+n,y:(b+h)*.9},...mr(C+n,(b+h)*1.25,C+n-l,(b+h)*1.3,-h*.02,.5)],T=$t(x),v=m.path(T,y),B=$t(k),F=m.path(B,{...y,fillStyle:"solid"}),M=s.insert(()=>F,":first-child");return M.insert(()=>v,":first-child"),M.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-h/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),ht(t,M),t.intersect=function(W){return st.polygon(t,x,W)},s}g(um,"taggedWaveEdgedRectangle");async function dm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await xt(e,t,mt(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),h=-a/2,c=-n/2,l=s.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",a).attr("height",n),ht(t,l),t.intersect=function(u){return st.rect(t,u)},s}g(dm,"text");var JB=g((e,t,r,i,s,o)=>`M${e},${t}
233
- a${s},${o} 0,0,1 0,${-i}
234
- l${r},0
235
- a${s},${o} 0,0,1 0,${i}
236
- M${r},${-i}
237
- a${s},${o} 0,0,0 0,${i}
238
- l${-r},0`,"createCylinderPathD"),tv=g((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ev=g((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Eu=5,$u=10;async function fm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<Eu&&(t.height=Eu)),t.width){const C=a/2/(2.5+a/50);t.width=t.width-o-C*3,t.width<$u&&(t.width=$u)}const{shapeSvg:n,bbox:h,label:c}=await xt(e,t,mt(t)),l=Math.max(t.height??0,h.height)+o,u=l/2,d=u/(2.5+l/50),f=Math.max(t.width??0,h.width)+d+o,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=at.svg(n),C=tv(0,0,f,l,d,u),b=ev(0,0,f,l,d,u),k=x.path(C,ot(t,{})),T=x.path(b,ot(t,{fill:"none"}));y=n.insert(()=>T,":first-child"),y=n.insert(()=>k,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=JB(0,0,f,l,d,u);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",jt(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",d),y.attr("transform",`translate(${-f/2}, ${l/2} )`),c.attr("transform",`translate(${-(h.width/2)-d-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),ht(t,y),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 k=d*d*(1-b*b/(u*u));k!=0&&(k=Math.sqrt(Math.abs(k))),k=d-k,x.x-(t.x??0)>0&&(k=-k),C.x+=k}return C},n}g(fm,"tiltedCylinder");async function gm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=Math.max(h.height+o,t.height??0),l=Math.max(h.width+a,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:l+3*c/6,y:0},{x:l,y:-c},{x:0,y:-c}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const m=at.svg(n),y=ot(t,{}),x=$t(u),C=m.path(x,y);d=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${c/2})`),f&&d.attr("style",f)}else d=Ye(n,l,c,u);return i&&d.attr("style",i),t.width=l,t.height=c,ht(t,d),t.intersect=function(m){return st.polygon(t,u,m)},n}g(gm,"trapezoid");async function pm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,h=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<h&&(t.height=h),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:l}=await xt(e,t,mt(t)),u=(t?.width?t?.width:l.width)+o*2,d=(t?.height?t?.height:l.height)+a*2,{cssStyles:f}=t,m=at.svg(c),y=ot(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.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=$t(x),b=m.path(C,y),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),ht(t,k),t.intersect=function(T){return st.polygon(t,x,T)},c}g(pm,"trapezoidalPentagon");var Ou=10,Du=10;async function mm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<Du&&(t.width=Du),t.height=t?.height??0,t.height<Ou&&(t.height=Ou));const{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t)),c=ze(Ft().flowchart?.htmlLabels),l=(t?.width?t?.width:n.width)+o,u=t?.height?t?.height:l+n.height,d=u,f=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-u}],{cssStyles:m}=t,y=at.svg(a),x=ot(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=$t(f),b=y.path(C,x),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=l,t.height=u,ht(t,k),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(T){return V.info("Triangle intersect",t,f,T),st.polygon(t,f,T)},a}g(mm,"triangle");async function ym(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:h,bbox:c,label:l}=await xt(e,t,mt(t)),u=(t?.width?t?.width:c.width)+(o??0)*2,d=(t?.height?t?.height:c.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,m=d+(n?f:-f),{cssStyles:y}=t,C=14-u,b=C>0?C/2:0,k=at.svg(h),T=ot(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const v=[{x:-u/2-b,y:m/2},...mr(-u/2-b,m/2,u/2+b,m/2,f,.8),{x:u/2+b,y:-m/2},{x:-u/2-b,y:-m/2}],B=$t(v),F=k.path(B,T),M=h.insert(()=>F,":first-child");return M.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-f/2})`),l.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f-(c.y-(c.top??0))})`),ht(t,M),t.intersect=function(W){return st.polygon(t,v,W)},h}g(ym,"waveEdgedRectangle");async function xm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-T*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:h}=await xt(e,t,mt(t)),c=(t?.width?t?.width:h.width)+o*2,l=(t?.height?t?.height:h.height)+a,u=l/8,d=l+u*2,{cssStyles:f}=t,m=at.svg(n),y=ot(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-c/2,y:d/2},...mr(-c/2,d/2,c/2,d/2,u,1),{x:c/2,y:-d/2},...mr(c/2,-d/2,-c/2,-d/2,u,-1)],C=$t(x),b=m.path(C,y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),ht(t,k),t.intersect=function(T){return st.polygon(t,x,T)},n}g(xm,"waveRectangle");var Wt=10;async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Wt,10),t.height=Math.max((t?.height??0)-o*2-Wt,10));const{shapeSvg:a,bbox:n,label:h}=await xt(e,t,mt(t)),c=(t?.width?t?.width:n.width)+s*2+Wt,l=(t?.height?t?.height:n.height)+o*2+Wt,u=c-Wt,d=l-Wt,f=-u/2,m=-d/2,{cssStyles:y}=t,x=at.svg(a),C=ot(t,{}),b=[{x:f-Wt,y:m-Wt},{x:f-Wt,y:m+d},{x:f+u,y:m+d},{x:f+u,y:m-Wt}],k=`M${f-Wt},${m-Wt} L${f+u},${m-Wt} L${f+u},${m+d} L${f-Wt},${m+d} L${f-Wt},${m-Wt}
239
- M${f-Wt},${m} L${f+u},${m}
240
- M${f},${m-Wt} L${f},${m+d}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const T=x.path(k,C),v=a.insert(()=>T,":first-child");return v.attr("transform",`translate(${Wt/2}, ${Wt/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(n.width/2)+Wt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Wt/2-(n.y-(n.top??0))})`),ht(t,v),t.intersect=function(B){return st.polygon(t,b,B)},a}g(Cm,"windowPane");var Iu=new Set(["redux-color","redux-dark-color"]),rv=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function fh(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Nt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:h}=s;if(t.look==="handDrawn"){const{themeVariables:lt}=Nt(),{background:Ct}=lt,_t={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Ct}`]};await fh(e,_t)}const c=Nt();t.useHtmlLabels=c.htmlLabels;let l=c.er?.diagramPadding??10,u=c.er?.entityPadding??6;const{cssStyles:d}=t,{labelStyles:f,nodeStyles:m}=nt(t);if(r.attributes.length===0&&t.label){const lt={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};or(t.label,c)+lt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Ct=await gi(e,t,lt);if(i!=null&&Iu.has(i)){const _t=r.colorIndex??0;Ct.attr("data-color-id",`color-${_t%h.length}`)}if(!ze(c.htmlLabels)){const _t=Ct.select("text"),G=_t.node()?.getBBox();_t.attr("transform",`translate(${-G.width/2}, 0)`)}return Ct}c.htmlLabels||(l*=1.25,u*=1.25);let y=mt(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await jr(x,t.label??"",c,0,0,["name"],f);C.height+=u;let b=0;const k=[],T=[];let v=0,B=0,F=0,M=0,W=!0,P=!0;for(const lt of r.attributes){const Ct=await jr(x,lt.type,c,0,b,["attribute-type"],f);v=Math.max(v,Ct.width+l);const _t=await jr(x,lt.name,c,0,b,["attribute-name"],f);B=Math.max(B,_t.width+l);const G=await jr(x,lt.keys.join(),c,0,b,["attribute-keys"],f);F=Math.max(F,G.width+l);const ct=await jr(x,lt.comment,c,0,b,["attribute-comment"],f);M=Math.max(M,ct.width+l);const gt=Math.max(Ct.height,_t.height,G.height,ct.height)+u;T.push({yOffset:b,rowHeight:gt}),b+=gt}let $=4;F<=l&&(W=!1,F=0,$--),M<=l&&(P=!1,M=0,$--);const q=x.node().getBBox();if(C.width+l*2-(v+B+F+M)>0){const lt=C.width+l*2-(v+B+F+M);v+=lt/$,B+=lt/$,F>0&&(F+=lt/$),M>0&&(M+=lt/$)}const A=v+B+F+M,L=at.svg(x),E=ot(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let _=0;T.length>0&&(_=T.reduce((lt,Ct)=>lt+(Ct?.rowHeight??0),0));const R=Math.max(q.width+l*2,t?.width||0,A),I=Math.max((_??0)+C.height,t?.height||0),Q=-R/2,j=-I/2;if(x.selectAll("g:not(:first-child)").each((lt,Ct,_t)=>{const G=Lt(_t[Ct]),ct=G.attr("transform");let gt=0,J=0;if(ct){const At=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ct);At&&(gt=parseFloat(At[1]),J=parseFloat(At[2]),G.attr("class").includes("attribute-name")?gt+=v:G.attr("class").includes("attribute-keys")?gt+=v+B:G.attr("class").includes("attribute-comment")&&(gt+=v+B+F))}G.attr("transform",`translate(${Q+l/2+gt}, ${J+j+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(j+u/2)+")"),i!=null&&Iu.has(i)){const lt=r.colorIndex??0;x.attr("data-color-id",`color-${lt%h.length}`)}const pt=L.rectangle(Q,j,R,I,E),yt=x.insert(()=>pt,":first-child").attr("class","outer-path").attr("style",d.join(""));k.push(0);for(const[lt,Ct]of T.entries()){const G=(lt+1)%2===0&&Ct.yOffset!==0,ct=L.rectangle(Q,C.height+j+Ct?.yOffset,R,Ct?.rowHeight,{...E,fill:G?o:a,stroke:n});x.insert(()=>ct,"g.label").attr("style",d.join("")).attr("class",`row-rect-${G?"even":"odd"}`)}const bt=1e-4;let wt=Xr(Q,C.height+j,R+Q,C.height+j,bt),ft=L.polygon(wt.map(lt=>[lt.x,lt.y]),E);if(x.insert(()=>ft).attr("class","divider"),wt=Xr(v+Q,C.height+j,v+Q,I+j,bt),ft=L.polygon(wt.map(lt=>[lt.x,lt.y]),E),x.insert(()=>ft).attr("class","divider"),W){const lt=v+B+Q;wt=Xr(lt,C.height+j,lt,I+j,bt),ft=L.polygon(wt.map(Ct=>[Ct.x,Ct.y]),E),x.insert(()=>ft).attr("class","divider")}if(P){const lt=v+B+F+Q;wt=Xr(lt,C.height+j,lt,I+j,bt),ft=L.polygon(wt.map(Ct=>[Ct.x,Ct.y]),E),x.insert(()=>ft).attr("class","divider")}for(const lt of k){const Ct=C.height+j+lt;wt=Xr(Q,Ct,R+Q,Ct,bt),ft=L.polygon(wt.map(_t=>[_t.x,_t.y]),E),x.insert(()=>ft).attr("class","divider")}if(ht(t,yt),m&&t.look!=="handDrawn")if(i!=null&&rv.has(i))x.selectAll("path").attr("style",m);else{const Ct=m.split(";")?.filter(_t=>_t.includes("stroke"))?.map(_t=>`${_t}`).join("; ");x.selectAll("path").attr("style",Ct??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(lt){return st.rect(t,lt)},x}g(fh,"erBox");async function jr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Th(t)&&(t=Th(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const h=n.node().appendChild(await pe(n,t,{width:or(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let l=h.children[0];for(l.textContent=l.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");l.childNodes[0];)l=l.childNodes[0],l.textContent=l.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=h.getBBox();if(ze(r.htmlLabels)){const l=h.children[0];l.style.textAlign="start";const u=Lt(h);c=l.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}g(jr,"addText");function Xr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(Xr,"lineToPolygon");async function bm(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",mt(t)).attr("id",t.domId||t.id);let n=null,h=null,c=null,l=null,u=0,d=0,f=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ni(n,{text:`«${b}»`},0),u=n.node().getBBox().height}h=a.insert("g").attr("class","label-group text"),await Ni(h,t,0,["font-weight: bolder"]);const m=h.node().getBBox();d=m.height,c=a.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Ni(c,b,y,[b.parseClassifier()]);y+=k+o}f=c.node().getBBox().height,f<=0&&(f=s/2),l=a.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const k=await Ni(l,b,x,[b.parseClassifier()]);x+=k+o}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return h.attr("transform",`translate(${-m.width/2}, ${u})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${u+d+s*2})`),C=a.node().getBBox(),l.attr("transform",`translate(0, ${u+d+(f?f+s*4:s*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}g(bm,"textHelper");async function Ni(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Nt();let a="useHtmlLabels"in t?t.useHtmlLabels:ze(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Ji(n)&&(a=!0);const h=await pe(s,rl(gr(n)),{width:or(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,l=1;if(a){const u=h.children[0],d=Lt(h);l=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(l+=u.innerHTML.split("<mrow>").length-1),await lh(u),c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Lt(h).selectAll("tspan").attr("font-weight",""),l=h.children.length;const u=h.children[0];(h.textContent===""||h.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=h.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*l)+r)+")"),c.height}g(Ni,"addText");async function km(e,t){const r=Ft(),{theme:i,themeVariables:s}=r,{useGradient:o,borderColorArray:a}=s,n=r.class.padding??12,h=n,c=t.useHtmlLabels??ze(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await bm(e,t,r,c,h);we(u,t.colorIndex,i,a);const{labelStyles:f,nodeStyles:m}=nt(t);t.labelStyle=f,t.cssStyles=l.styles||"";const y=l.styles?.join(";")||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const x=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,C=at.svg(u),b=ot(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Math.max(t.width??0,d.width);let T=Math.max(t.height??0,d.height);const v=(t.height??0)>d.height;l.members.length===0&&l.methods.length===0?T+=h:l.members.length>0&&l.methods.length===0&&(T+=h*2);const B=-k/2,F=-T/2;let M=x?n*2:l.members.length===0&&l.methods.length===0?-n:0;v&&(M=n*2);const W=C.rectangle(B-n,F-n-(x?n:l.members.length===0&&l.methods.length===0?-n/2:0),k+2*n,T+2*n+M,b),P=u.insert(()=>W,":first-child");P.attr("class","basic label-container outer-path");const $=P.node().getBBox(),q=u.select(".annotation-group").node().getBBox().height-(x?n/2:0)||0,A=u.select(".label-group").node().getBBox().height-(x?n/2:0)||0,L=u.select(".members-group").node().getBBox().height-(x?n/2:0)||0,E=(q+A+F+n-(F-n-(x?n:l.members.length===0&&l.methods.length===0?-n/2:0)))/2;if(u.selectAll(".text").each((_,R,I)=>{const Q=Lt(I[R]),j=Q.attr("transform");let pt=0;if(j){const ft=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);ft&&(pt=parseFloat(ft[2]))}let yt=pt+F+n-(x?n:l.members.length===0&&l.methods.length===0?-n/2:0);if(Q.attr("class").includes("methods-group")){const wt=Math.max(L,h/2);v?yt=Math.max(E,q+A+wt+F+h*2+n)+h*2:yt=q+A+wt+F+h*4+n}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?yt=pt-h:yt=pt),c||(yt-=4);let bt=B;(Q.attr("class").includes("label-group")||Q.attr("class").includes("annotation-group"))&&(bt=-Q.node()?.getBBox().width/2||0,u.selectAll("text").each(function(wt,ft,lt){window.getComputedStyle(lt[ft]).textAnchor==="middle"&&(bt=0)})),Q.attr("transform",`translate(${bt}, ${yt})`)}),l.members.length>0||l.methods.length>0||x){const _=q+A+F+n,R=C.line($.x,_,$.x+$.width,_+.001,b);u.insert(()=>R).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(x||l.members.length>0||l.methods.length>0){const _=q+A+L+F+h*2+n,R=C.line($.x,v?Math.max(E,_):_,$.x+$.width,(v?Math.max(E,_):_)+.001,b);u.insert(()=>R).attr("class",`divider${t.look==="neo"&&!o?" neo-line":""}`).attr("style",y)}if(l.look!=="handDrawn"&&u.selectAll("path").attr("style",y),P.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",y),!c){const _=RegExp(/color\s*:\s*([^;]*)/),R=_.exec(y);if(R){const I=R[0].replace("color","fill");u.selectAll("tspan").attr("style",I)}else if(f){const I=_.exec(f);if(I){const Q=I[0].replace("color","fill");u.selectAll("tspan").attr("style",Q)}}}return ht(t,P),t.intersect=function(_){return st.rect(t,_)},u}g(km,"classBox");async function wm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,h="verifyMethod"in t,c=mt(t),l=Ft(),{themeVariables:u}=l,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;h?x=await De(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):x=await De(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let C=x;const b=await De(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=b+n,h){const $=await De(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=$;const q=await De(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=q;const A=await De(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=A,await De(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const $=await De(y,`${o.type?`Type: ${o.type}`:""}`,C,t.labelStyle,m);C+=$,await De(y,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,C,t.labelStyle,m)}const k=(y.node()?.getBBox().width??200)+a,T=(y.node()?.getBBox().height??200)+a,v=-k/2,B=-T/2,F=at.svg(y),M=ot(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");const W=F.rectangle(v,B,k,T,M),P=y.insert(()=>W,":first-child");if(P.attr("class","basic label-container outer-path").attr("style",i),d?.length){const $=t.colorIndex??0;y.attr("data-color-id",`color-${$%d.length}`)}if(y.selectAll(".label").each(($,q,A)=>{const L=Lt(A[q]),E=L.attr("transform");let _=0,R=0;if(E){const pt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(E);pt&&(_=parseFloat(pt[1]),R=parseFloat(pt[2]))}const I=R-T/2;let Q=v+a/2;(q===0||q===1)&&(Q=_),L.attr("transform",`translate(${Q}, ${I+a})`)}),C>x+b+n){const $=B+x+b+n;let q;if(t.look==="neo"){const E=[[v,$],[v+k,$],[v+k,$+.001],[v,$+.001]];q=F.polygon(E,M)}else q=F.line(v,$,v+k,$,M);y.insert(()=>q).attr("class","divider")}return ht(t,P),t.intersect=function($){return st.rect(t,$)},i&&t.look!=="handDrawn"&&(f||d?.length)&&y.selectAll("path").attr("style",i),y}g(wm,"requirementBox");async function De(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=Ft(),n=a.htmlLabels??!0,h=await pe(o,rl(gr(t)),{width:or(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const l=h.children[0],u=Lt(h);s==="start"&&Lt(l).style("text-align","left"),c=l.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const l=h.children[0];for(const u of l.children)i&&u.setAttribute("style",i);if(s==="start"){l.setAttribute("text-anchor","start");for(const u of l.children)u.setAttribute("text-anchor","start")}c=h.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}g(De,"addText");var iv=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Sm(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=nt(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:h,label:c}=await xt(e,t,mt(t)),l=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;d?{label:m,bbox:y}=await Br(d,"ticket"in t&&t.ticket||"",f):{label:m,bbox:y}=await Br(n,"ticket"in t&&t.ticket||"",f);const{label:x,bbox:C}=await Br(n,"assigned"in t&&t.assigned||"",f);t.width=a;const b=10,k=t?.width||0,T=Math.max(y.height,C.height)/2,v=Math.max(h.height+b*2,t?.height||0)+T,B=-k/2,F=-v/2;c.attr("transform","translate("+(l-k/2)+", "+(-T-h.height/2)+")"),m.attr("transform","translate("+(l-k/2)+", "+(-T+h.height/2)+")"),x.attr("transform","translate("+(l+k/2-C.width-2*o)+", "+(-T+h.height/2)+")");let M;const{rx:W,ry:P}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const q=at.svg(n),A=ot(t,{}),L=W||P?q.path(me(B,F,k,v,W||0),A):q.rectangle(B,F,k,v,A);M=n.insert(()=>L,":first-child"),M.attr("class","basic label-container").attr("style",$||null)}else{M=n.insert("rect",":first-child"),M.attr("class","basic label-container __APA__").attr("style",s).attr("rx",W??5).attr("ry",P??5).attr("x",B).attr("y",F).attr("width",k).attr("height",v);const q="priority"in t&&t.priority;if(q){const A=n.append("line"),L=B+2,E=F+Math.floor((W??0)/2),_=F+v-Math.floor((W??0)/2);A.attr("x1",L).attr("y1",E).attr("x2",L).attr("y2",_).attr("stroke-width","4").attr("stroke",iv(q))}}return ht(t,M),t.height=v,t.intersect=function(q){return st.rect(t,q)},n}g(Sm,"kanbanItem");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await xt(e,t,mt(t)),h=o.width+10*a,c=o.height+8*a,l=.15*h,{cssStyles:u}=t,d=o.width+20,f=o.height+20,m=Math.max(h,d),y=Math.max(c,f);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let x;const C=`M0 0
241
- a${l},${l} 1 0,0 ${m*.25},${-1*y*.1}
242
- a${l},${l} 1 0,0 ${m*.25},0
243
- a${l},${l} 1 0,0 ${m*.25},0
244
- a${l},${l} 1 0,0 ${m*.25},${y*.1}
245
-
246
- a${l},${l} 1 0,0 ${m*.15},${y*.33}
247
- a${l*.8},${l*.8} 1 0,0 0,${y*.34}
248
- a${l},${l} 1 0,0 ${-1*m*.15},${y*.33}
249
-
250
- a${l},${l} 1 0,0 ${-1*m*.25},${y*.15}
251
- a${l},${l} 1 0,0 ${-1*m*.25},0
252
- a${l},${l} 1 0,0 ${-1*m*.25},0
253
- a${l},${l} 1 0,0 ${-1*m*.25},${-1*y*.15}
254
-
255
- a${l},${l} 1 0,0 ${-1*m*.1},${-1*y*.33}
256
- a${l*.8},${l*.8} 1 0,0 0,${-1*y*.34}
257
- a${l},${l} 1 0,0 ${m*.1},${-1*y*.33}
258
- H0 V0 Z`;if(t.look==="handDrawn"){const b=at.svg(s),k=ot(t,{}),T=b.path(C,k);x=s.insert(()=>T,":first-child"),x.attr("class","basic label-container").attr("style",jt(u))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),ht(t,x),t.calcIntersect=function(b,k){return st.rect(b,k)},t.intersect=function(b){return V.info("Bang intersect",t,b),st.rect(t,b)},s}g(Tm,"bang");async function Bm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await xt(e,t,mt(t)),h=o.width+2*a,c=o.height+2*a,l=.15*h,u=.25*h,d=.35*h,f=.2*h,{cssStyles:m}=t;let y;const x=`M0 0
259
- a${l},${l} 0 0,1 ${h*.25},${-1*h*.1}
260
- a${d},${d} 1 0,1 ${h*.4},${-1*h*.1}
261
- a${u},${u} 1 0,1 ${h*.35},${h*.2}
262
-
263
- a${l},${l} 1 0,1 ${h*.15},${c*.35}
264
- a${f},${f} 1 0,1 ${-1*h*.15},${c*.65}
265
-
266
- a${u},${l} 1 0,1 ${-1*h*.25},${h*.15}
267
- a${d},${d} 1 0,1 ${-1*h*.5},0
268
- a${l},${l} 1 0,1 ${-1*h*.25},${-1*h*.15}
269
-
270
- a${l},${l} 1 0,1 ${-1*h*.1},${-1*c*.35}
271
- a${f},${f} 1 0,1 ${h*.1},${-1*c*.65}
272
- H0 V0 Z`;if(t.look==="handDrawn"){const C=at.svg(s),b=ot(t,{}),k=C.path(x,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",jt(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),y.attr("transform",`translate(${-h/2}, ${-c/2})`),ht(t,y),t.calcIntersect=function(C,b){return st.rect(C,b)},t.intersect=function(C){return V.info("Cloud intersect",t,C),st.rect(t,C)},s}g(Bm,"cloud");async function vm(e,t){const{labelStyles:r,nodeStyles:i}=nt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await xt(e,t,mt(t)),h=o.width+8*a,c=o.height+2*a,l=5,u=t.look==="neo"?`
273
- M${-h/2} ${c/2-l}
274
- v${-c+2*l}
275
- q0,-${l} ${l},-${l}
276
- h${h-2*l}
277
- q${l},0 ${l},${l}
278
- v${c-l}
279
- H${-h/2}
280
- Z
281
- `:`
282
- M${-h/2} ${c/2-l}
283
- v${-c+2*l}
284
- q0,-${l} ${l},-${l}
285
- h${h-2*l}
286
- q${l},0 ${l},${l}
287
- v${c-2*l}
288
- q0,${l} ${-l},${l}
289
- h${-(h-2*l)}
290
- q${-l},0 ${-l},${-l}
291
- Z
292
- `;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",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),ht(t,d),t.calcIntersect=function(f,m){return st.rect(f,m)},t.intersect=function(f){return st.rect(t,f)},s}g(vm,"defaultMindmapNode");async function _m(e,t){const r={padding:t.padding??0};return uh(e,t,r)}g(_m,"mindmapCircle");var sv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:sm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:em},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:om},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:hm},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Cp},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:bp},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:vp},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ip},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:up},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:np},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:xp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:uh},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Tm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Bm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Qp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Fp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:qp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Rp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:gm},{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:Ip},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:wp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:dm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:lp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:rm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:lm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:nm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:_p},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Mp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:gp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:pp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:mp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Np},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ym},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Lp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:fm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Wp},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:yp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:kp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:mm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Cm},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Tp},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:pm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Bp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:im},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Zp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Vp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:rp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:fp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:um},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:cm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:xm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Jp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:zp}],ov=g(()=>{const t=[...Object.entries({state:am,choice:hp,note:Kp,composite:cp,rectWithTitle:tm,labelRect:Pp,block_arrow:ap,collapsedGroup:op,iconSquare:Op,iconCircle:Ep,icon:Ap,iconRounded:$p,imageSquare:Dp,anchor:tp,kanbanItem:Sm,mindmapCircle:_m,defaultMindmapNode:vm,classBox:km,erBox:fh,requirementBox:wm,usecaseActor:Hp,usecaseActorHollow:Up,usecaseActorAwesome:Yp,usecaseActorIcon:jp,usecaseBusiness:Xp,usecaseEllipse:Sp,usecaseJsonTable:Gp}),...sv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Lm=ov();function av(e){return e in Lm}g(av,"isValidShape");var ms=g(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Jo=new Map;async function Fm(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Lm[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",jt(t.look)),t.tooltip&&s.attr("title",t.tooltip),Jo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(Fm,"insertNode");var P5=g((e,t)=>{Jo.set(t.id,e)},"setNodeElem"),R5=g(()=>{Jo.clear()},"clear"),q5=g(e=>{const t=Jo.get(e.id);V.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"),nv=g(async(e,t)=>{const r=Ft(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:n,borderColorArray:h}=s,c=n,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=nt(t),m=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);we(m,t.colorIndex,i,h);const y=ze(r.flowchart.htmlLabels),x=t.direction==="LR",C=m.insert("g").attr("class","cluster-label swimlane-label"),b=await pe(C,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let k=b.getBBox();if(y){const E=b.children[0],_=Lt(b);k=E.getBoundingClientRect(),_.attr("width",k.width),_.attr("height",k.height)}const T=t.padding??0,v=t.width<=k.width+T?k.width+T:t.width;t.width<=k.width+T?t.diff=(v-t.width)/2-T:t.diff=-T;const B=t.height,F=t.y-B/2,M=t.y+B/2,W=t.x-v/2,P=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:F+B/3,$=x?4:0,q=k.height+2*$;let A,L;if(x){const E=Math.max(q,k.height+2*$),_=W+E,R=Math.max(0,v-E);if(t.look==="handDrawn"){const j=at.svg(m),pt=ot(t,{roughness:.7,fill:a,stroke:c,seed:o}),yt=ot(t,{roughness:.7,fill:"none",stroke:c,seed:o}),bt=j.rectangle(W,F,E,B,pt);A=m.insert(()=>bt,":first-child").attr("class","swimlane-title");const wt=j.rectangle(_,F,R,B,yt);L=m.insert(()=>wt,":first-child").attr("class","swimlane-body"),A.select("path:nth-child(2)").attr("style",d.join(";")),A.select("path").attr("style",f.join(";").replace("fill","stroke"))}else A=m.insert("rect",":first-child"),L=m.insert("rect",":first-child"),A.attr("class","swimlane-title").attr("style",u).attr("x",W).attr("y",F).attr("width",E).attr("height",B).attr("fill",a).attr("stroke",c),L.attr("class","swimlane-body").attr("style",u).attr("x",_).attr("y",F).attr("width",R).attr("height",B).attr("fill","none").attr("stroke",c);const I=W+E/2,Q=t.y;C.attr("transform",`translate(${I}, ${Q}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{const E=Math.max(0,P-F),_=Math.min(q,E),R=F+_,I=Math.max(0,M-R),Q=t.x-v/2;if(t.look==="handDrawn"){const yt=at.svg(m),bt=ot(t,{roughness:.7,fill:a,stroke:c,fillWeight:3,seed:o}),wt=ot(t,{roughness:.7,fill:"none",stroke:c,seed:o}),ft=yt.rectangle(Q,F,v,_,bt);A=m.insert(()=>ft,":first-child").attr("class","swimlane-title");const lt=yt.rectangle(Q,R,v,I,wt);L=m.insert(()=>lt,":first-child").attr("class","swimlane-body"),A.select("path:nth-child(2)").attr("style",d.join(";")),A.select("path").attr("style",f.join(";").replace("fill","stroke"))}else A=m.insert("rect",":first-child"),L=m.insert("rect",":first-child"),A.attr("class","swimlane-title").attr("style",u).attr("x",Q).attr("y",F).attr("width",v).attr("height",_).attr("fill",a).attr("stroke",c),L.attr("class","swimlane-body").attr("style",u).attr("x",Q).attr("y",R).attr("width",v).attr("height",I).attr("fill","none").attr("stroke",c);const j=t.x-k.width/2,pt=F+(_-k.height)/2;C.attr("transform",`translate(${j}, ${pt})`)}if(V.trace("Swimlane data ",t,JSON.stringify(t)),l){const E=C.select("span");E&&E.attr("style",l)}return t.offsetX=0,t.width=v,t.height=B,t.offsetY=k.height-T/2,t.intersect=function(E){return nr(t,E)},{cluster:m,labelBBox:k}},"swimlane"),Mm=g(async(e,t)=>{V.info("Creating subgraph rect for ",t.id,t);const r=Ft(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:n,borderColorArray:h}=s,{labelStyles:c,nodeStyles:l,borderStyles:u,backgroundStyles:d}=nt(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);we(f,t.colorIndex,i,h);const m=Qt(r),y=f.insert("g").attr("class","cluster-label ");let x;t.labelType==="markdown"?x=await pe(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):x=await Je(y,t.label,t.labelStyle||"",!1,!0);let C=x.getBBox();if(Qt(r)){const W=x.children[0],P=Lt(x);C=W.getBoundingClientRect(),P.attr("width",C.width),P.attr("height",C.height)}const b=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height,T=t.x-b/2,v=t.y-k/2;V.trace("Data ",t,JSON.stringify(t));let B;if(t.look==="handDrawn"){const W=at.svg(f),P=ot(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:o}),$=W.path(me(T,v,b,k,0),P);B=f.insert(()=>(V.debug("Rough node insert CXC",$),$),":first-child"),B.select("path:nth-child(2)").attr("style",u.join(";")),B.select("path").attr("style",d.join(";").replace("fill","stroke"))}else B=f.insert("rect",":first-child"),B.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",v).attr("width",b).attr("height",k);const{subGraphTitleTopMargin:F}=ms(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+F})`),c){const W=y.select("span");W&&W.attr("style",c)}const M=B.node().getBBox();return t.offsetX=0,t.width=M.width,t.height=M.height,t.offsetY=C.height-t.padding/2,t.intersect=function(W){return nr(t,W)},{cluster:f,labelBBox:C}},"rect"),lv=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return nr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),hv=g(async(e,t)=>{const r=Ft(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{altBackground:a,borderColorArray:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:l}=s,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);we(u,t.colorIndex,i,n);const d=u.insert("g",":first-child"),f=u.insert("g").attr("class","cluster-label");let m=u.append("rect");const y=await Je(f,t.label,t.labelStyle,void 0,!0);let x=y.getBBox();if(Qt(r)){const $=y.children[0],q=Lt(y);x=$.getBoundingClientRect(),q.attr("width",x.width),q.attr("height",x.height)}const C=0*t.padding,b=C/2,k=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+C;t.width<=x.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const T=t.height+C,v=t.height+C-x.height-6,B=t.x-k/2,F=t.y-T/2;t.width=k;const M=t.y-t.height/2-b+x.height+2;let W;if(t.look==="handDrawn"){const $=t.cssClasses.includes("statediagram-cluster-alt"),q=at.svg(u),A=t.rx||t.ry?q.path(me(B,F,k,T,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:l,seed:o}):q.rectangle(B,F,k,T,{seed:o});W=u.insert(()=>A,":first-child");const L=q.rectangle(B,M,k,v,{fill:$?a:h,fillStyle:$?"hachure":"solid",stroke:l,seed:o});W=u.insert(()=>A,":first-child"),m=u.insert(()=>L),W.attr("class","outer"),m.attr("class","inner")}else W=d.insert("rect",":first-child"),W.attr("class","outer").attr("x",B).attr("y",F).attr("width",k).attr("height",T).attr("data-look",t.look),m.attr("class","inner").attr("x",B).attr("y",M).attr("width",k).attr("height",v);f.attr("transform",`translate(${t.x-x.width/2}, ${F+1-(Qt(r)?0:3)})`);const P=W.node().getBBox();return t.height=P.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function($){return nr(t,$)},{cluster:u,labelBBox:x}},"roundedWithTitle"),cv=g(async(e,t)=>{V.info("Creating subgraph rect for ",t.id,t);const r=Ft(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:h,borderStyles:c,backgroundStyles:l}=nt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),d=Qt(r),f=u.insert("g").attr("class","cluster-label "),m=await pe(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let y=m.getBBox();if(Qt(r)){const F=m.children[0],M=Lt(m);y=F.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,k=t.y-C/2;V.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const F=at.svg(u),M=ot(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),W=F.path(me(b,k,x,C,t.rx),M);T=u.insert(()=>(V.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",l.join(";").replace("fill","stroke"))}else T=u.insert("rect",":first-child"),T.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:v}=ms(r);if(f.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const F=f.select("span");F&&F.attr("style",n)}const B=T.node().getBBox();return t.offsetX=0,t.width=B.width,t.height=B.height,t.offsetY=y.height-t.padding/2,t.intersect=function(F){return nr(t,F)},{cluster:u,labelBBox:y}},"kanbanSection"),uv=g((e,t)=>{const r=Ft(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{altBackground:a,nodeBorder:n,borderColorArray:h}=s,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);we(c,t.colorIndex,i,h);const l=c.insert("g",":first-child"),u=0*t.padding,d=t.width+u;t.diff=-t.padding;const f=t.height+u,m=t.x-d/2,y=t.y-f/2;t.width=d;let x;if(t.look==="handDrawn"){const k=at.svg(c).rectangle(m,y,d,f,{fill:a??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:n,seed:o});x=c.insert(()=>k,":first-child").attr("class","divider")}else{x=l.insert("rect",":first-child");let b="outer";t.look,b="divider",x.attr("class",b).attr("x",m).attr("y",y).attr("width",d).attr("height",f).attr("data-look",t.look)}const C=x.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return nr(t,b)},{cluster:c,labelBBox:{}}},"divider"),dv=g(async(e,t,r)=>{V.info(`Creating ${r.cssClass} for `,t.id,t);const i=Ft(),{theme:s,themeVariables:o,handDrawnSeed:a}=i,{borderColorArray:n}=o,{labelStyles:h,borderStyles:c}=nt(t),l=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);we(l,t.colorIndex,s,n);const u=Qt(i),d=l.insert("g").attr("class","cluster-label");let f={width:0,height:0};const m=t.label?.trim();if(m){let v;if(t.labelType==="markdown"?v=await pe(d,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):v=await Je(d,t.label,t.labelStyle||"",!1,!0),f=v.getBBox(),u){const B=v.children[0],F=Lt(v);f=B.getBoundingClientRect(),F.attr("width",f.width),F.attr("height",f.height)}}const y=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,b=t.y-x/2;let k;if(t.look==="handDrawn"){const v=at.svg(l),B=ot(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:a,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),F=v.path(me(C,b,y,x,r.rx),B);k=l.insert(()=>F,":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";"))}else k=l.insert("rect",":first-child"),k.attr("rx",r.rx).attr("ry",r.rx).attr("x",C).attr("y",b).attr("width",y).attr("height",x).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&k.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:v}=ms(i);if(d.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+v})`),h){const B=d.select("span");B&&B.attr("style",h)}}const T=k.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=f.height-t.padding/2,t.intersect=function(v){return nr(t,v)},{cluster:l,labelBBox:f}},"createContainerGroup"),fv=g(async(e,t)=>{const{themeVariables:r}=Ft(),i=r.flowContainerStroke||r.secondaryBorderColor;return dv(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),gv=g((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,o=Math.max(e.width,t.width+i),a=r==="package"?Math.max(e.height,s+e.padding*2):e.height,n=e.x-o/2,h=e.y-a/2;return{boundaryType:r,width:o,height:a,x:n,y:h,bodyY:h+s,bodyHeight:a-s,tabHeight:s,tabWidth:r==="package"?Math.min(o,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),pv=g(async(e,t)=>{V.info("Creating usecase system boundary for ",t.id,t);const r=Ft(),{theme:i,themeVariables:s,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:n,borderColorArray:h}=s,{labelStyles:c,nodeStyles:l}=nt(t),{stylesMap:u}=yr(t),d=t.boundaryType||"rect",f=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${d} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",d).attr("data-look",t.look);we(f,t.colorIndex,i,h);const m=Qt(r),y=f.insert("g").attr("class","cluster-label system-boundary-title"),x=await pe(y,t.label,{style:c,useHtmlLabels:m,isNode:!0});let C=x.getBBox();if(m){const A=x.children[0],L=Lt(x);C=A.getBoundingClientRect(),L.attr("width",C.width),L.attr("height",C.height)}const b=gv(t,C),{width:k,height:T,x:v,y:B,bodyY:F,bodyHeight:M,tabHeight:W,tabWidth:P}=b;t.diff=t.width<=C.width+t.padding?(k-t.width)/2-t.padding:-t.padding;const $=ot(t,{fill:u.get("fill")||a,stroke:u.get("stroke")||n,strokeWidth:u.get("stroke-width")?.replace("px","")||1,seed:o});if(t.look==="handDrawn"){const A=at.svg(f),L=A.rectangle(v,F,k,M,$);if(f.insert(()=>L,":first-child").attr("class","boundary-body label-container"),d==="package"){const E=A.rectangle(v,B,P,W,$);f.insert(()=>E,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else f.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",l).attr("x",v).attr("y",F).attr("width",k).attr("height",M),d==="package"&&f.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",l).attr("x",v).attr("y",B).attr("width",P).attr("height",W);const{subGraphTitleTopMargin:q}=ms(r);return d==="package"?y.attr("transform",`translate(${v+(P-C.width)/2}, ${B+(W-C.height)/2})`):y.attr("transform",`translate(${t.x-C.width/2}, ${B+q})`),c&&(y.attr("style",c),y.select("span").attr("style",c)),t.offsetX=0,t.width=k,t.height=T,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(A){return nr(t,A)},{cluster:f,labelBBox:C}},"usecaseSystemBoundary"),mv=Mm,yv={rect:Mm,squareRect:mv,roundedWithTitle:hv,noteGroup:lv,divider:uv,kanbanSection:cv,flowGroup:fv,usecaseSystemBoundary:pv,swimlane:nv},xv=new Set(["noteGroup","divider"]),N5=g(e=>!xv.has(e??"rect"),"clusterPaintsTitle"),Am=new Map,Cv=g(async(e,t)=>{const r=t.shape||"rect",i=await yv[r](e,t);return Am.set(t.id,i),i},"insertCluster"),W5=g(()=>{Am=new Map},"clear"),Ei=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),ae={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},Pu={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Wi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=qt(e),t=qt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}g(Wi,"calculateDeltaAndAngle");var qt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),bv=g(e=>({x:g(function(t,r,i){let s=0;const o=qt(i[0]).x<qt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(ae,e.arrowTypeStart)){const{angle:f,deltaX:m}=Wi(i[0],i[1]);s=ae[e.arrowTypeStart]*Math.cos(f)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ae,e.arrowTypeEnd)){const{angle:f,deltaX:m}=Wi(i[i.length-1],i[i.length-2]);s=ae[e.arrowTypeEnd]*Math.cos(f)*(m>=0?1:-1)}const a=Math.abs(qt(t).x-qt(i[i.length-1]).x),n=Math.abs(qt(t).y-qt(i[i.length-1]).y),h=Math.abs(qt(t).x-qt(i[0]).x),c=Math.abs(qt(t).y-qt(i[0]).y),l=ae[e.arrowTypeStart],u=ae[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=o==="right"?-1:1,s-=f}if(h<l&&h>0&&c<l){let f=l+d-h;f*=o==="right"?-1:1,s+=f}return qt(t).x+s},"x"),y:g(function(t,r,i){let s=0;const o=qt(i[0]).y<qt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(ae,e.arrowTypeStart)){const{angle:f,deltaY:m}=Wi(i[0],i[1]);s=ae[e.arrowTypeStart]*Math.abs(Math.sin(f))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(ae,e.arrowTypeEnd)){const{angle:f,deltaY:m}=Wi(i[i.length-1],i[i.length-2]);s=ae[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(m>=0?1:-1)}const a=Math.abs(qt(t).y-qt(i[i.length-1]).y),n=Math.abs(qt(t).x-qt(i[i.length-1]).x),h=Math.abs(qt(t).y-qt(i[0]).y),c=Math.abs(qt(t).x-qt(i[0]).x),l=ae[e.arrowTypeStart],u=ae[e.arrowTypeEnd],d=1;if(a<u&&a>0&&n<u){let f=u+d-a;f*=o==="up"?-1:1,s-=f}if(h<l&&h>0&&c<l){let f=l+d-h;f*=o==="up"?-1:1,s+=f}return qt(t).y+s},"y")}),"getLineFunctionsWithOffset"),kv=g((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Ru(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Ru(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),wv={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},arrow_hierarchy:{type:"hierarchy",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}},Sv=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ru=g((e,t,r,i,s,o,a=!1,n)=>{if(!r||r==="none")return;const h=wv[r],c=h&&Sv.includes(h.type);if(!h){V.warn(`Unknown arrow type: ${r}`);return}const l=h.type,f=`${s}_${o}-${l}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const m=n.replace(/[^\dA-Za-z]/g,"_"),y=`${f}_${m}`;if(!document.getElementById(y)){const x=document.getElementById(f);if(x){const C=x.cloneNode(!0);C.id=y,C.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),h.fill&&k.setAttribute("fill",n)}),x.parentNode?.appendChild(C)}}e.attr(`marker-${t}`,`url(${i}#${y})`)}else e.attr(`marker-${t}`,`url(${i}#${f})`)},"addEdgeMarker"),Tv=g(e=>typeof e=="string"?e:Ft()?.flowchart?.curve,"resolveEdgeCurveType"),Ao=new Map,ee=new Map,z5=g(()=>{Ao.clear(),ee.clear()},"clear"),H5=g(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),$i=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Bv=g(async(e,t)=>{const r=Ft();let i=Qt(r);const{labelStyles:s}=nt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await pe(e,t.label,{style:$i(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),V.info("abc82",t,t.labelType);let l,u;if(i){const f=c.children[0],m=Lt(c);l=await Ar.measure(()=>f.getBoundingClientRect()),u=l,m.attr("width",l.width),m.attr("height",l.height)}else{const f=Lt(c).select("text").node();await Ar.measure(()=>{l=c.getBBox(),f&&typeof f.getBBox=="function"?u=f.getBBox():u=l})}a.attr("transform",Ei(u,i)),Ao.set(t.id,o),t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Je(m,t.startLabelLeft,$i(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=Lt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ei(x,i)),ee.get(t.id)||ee.set(t.id,{}),ee.get(t.id).startLeft=f,Hi(d,t.startLabelLeft,x),zi(t,"startLeft",x)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Je(m,t.startLabelRight,$i(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=Lt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ei(x,i)),ee.get(t.id)||ee.set(t.id,{}),ee.get(t.id).startRight=f,Hi(d,t.startLabelRight,x),zi(t,"startRight",x)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Je(m,t.endLabelLeft,$i(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=Lt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ei(x,i)),ee.get(t.id)||ee.set(t.id,{}),ee.get(t.id).endLeft=f,Hi(d,t.endLabelLeft,x),zi(t,"endLeft",x)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),m=f.insert("g").attr("class","inner"),y=await Je(m,t.endLabelRight,$i(t.labelStyle)||"",!1,!1);d=y;let x=y.getBBox();if(i){const C=y.children[0],b=Lt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",Ei(x,i)),ee.get(t.id)||ee.set(t.id,{}),ee.get(t.id).endRight=f,Hi(d,t.endLabelRight,x),zi(t,"endRight",x)}return c},"insertEdgeLabel");function zi(e,t,r){e.terminalLabelSizes??={},e.terminalLabelSizes[t]={width:r.width,height:r.height}}g(zi,"recordTerminalLabelSize");function Hi(e,t,r){Qt(Ft())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}g(Hi,"setTerminalWidth");var vv=g((e,t)=>{let r=e.x,i=e.y;if(t?.updatedPath){const s=Ce.calcLabelPosition(t.updatedPath);if(t.originalPath){const o=Ce.calcLabelPosition(t.originalPath);r=e.x+(s.x-o.x),i=e.y+(s.y-o.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),_v=g((e,t)=>{V.debug("Moving label abc88 ",e.id,e.label,Ao.get(e.id),t);const r=Ft(),{subGraphTitleTotalMargin:i}=ms(r);if(e.label){const o=Ao.get(e.id),{x:a,y:n}=vv(e,t);V.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",a,",",n,") abc88"),o.attr("transform",`translate(${a}, ${n+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const o=ee.get(e.id).startLeft;let a=e.x,n=e.y;if(s){const h=Ce.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);a=h.x,n=h.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=ee.get(e.id).startRight;let a=e.x,n=e.y;if(s){const h=Ce.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);a=h.x,n=h.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=ee.get(e.id).endLeft;let a=e.x,n=e.y;if(s){const h=Ce.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);a=h.x,n=h.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=ee.get(e.id).endRight;let a=e.x,n=e.y;if(s){const h=Ce.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);a=h.x,n=h.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),Lv=g((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Fv=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),Mv=g((e,t,r)=>{V.debug(`intersection calc abc89:
293
- outsidePoint: ${JSON.stringify(t)}
294
- insidePoint : ${JSON.stringify(r)}
295
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const h=e.height/2,c=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*h){let u=r.y<t.y?t.y-h-s:s-h-t.y;n=l*u/c;const d={x:r.x<t.x?r.x+n:r.x-l+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(d.x=t.x,d.y=t.y),l===0&&(d.x=t.x),c===0&&(d.y=t.y),V.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${l}, r ${n}`,d),d}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let u=c*n/l,d=r.x<t.x?r.x+l-n:r.x-l+n,f=r.y<t.y?r.y+u:r.y-u;return V.debug(`sides calc abc89, Q ${c}, q ${u}, R ${l}, r ${n}`,{_x:d,_y:f}),n===0&&(d=t.x,f=t.y),l===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),qu=g((e,t)=>{V.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(V.info("abc88 checking point",o,t),!Fv(t,o)&&!s){const a=Mv(t,i,o);V.debug("abc88 inside",o,i,a),V.debug("abc88 intersection",a,t);let n=!1;r.forEach(h=>{n=n||h.x===a.x&&h.y===a.y}),r.some(h=>h.x===a.x&&h.y===a.y)?V.warn("abc88 no intersect",a,r):r.push(a),s=!0}else V.warn("abc88 outside",o,i),i=o,s||r.push(o)}),V.debug("returning points",r),r},"cutPathAtIntersect");function Em(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(Em,"extractCornerPoints");var Nu=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),Av=g(function(e){const{cornerPointPositions:t}=Em(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Nu(s,a,5),h=Nu(o,a,5),c=h.x-n.x,l=h.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let d={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){V.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const f=5;a.x===n.x?d={x:c<0?n.x-f+u:n.x+f-u,y:l<0?n.y-u:n.y+u}:d={x:c<0?n.x-u:n.x+u,y:l<0?n.y-f+u:n.y+f-u}}else V.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(d,h)}else r.push(e[i]);return r},"fixCorners"),Ev=g((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),h=Number.isFinite(n)?Math.max(0,n):0,c=Array(h).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),$v=g(function(e,t,r,i,s,o,a,n=!1,h=void 0){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:c,layout:l}=Ft(),u=h??l;let d=t.points,f=!1;const m=s;var y=o;const x=[];for(const j in t.cssCompiledStyles)Df(j)||x.push(t.cssCompiledStyles[j]);if(u==="swimlane"){if(!n&&y.intersect&&m.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[m.intersect(d[0]),y.intersect(d[1])];else{const j=d.slice(1,-1),pt=j[0],yt=j[j.length-1],bt=.5,wt=Math.abs(d[d.length-1].x-yt.x)<bt&&Math.abs(d[d.length-1].y-yt.y)<bt,ft=m.intersect(pt),lt=wt?yt:y.intersect(yt),Ct=Math.abs(lt.x-yt.x)<bt&&Math.abs(lt.y-yt.y)<bt,G=Math.abs(ft.x-pt.x)<bt&&Math.abs(ft.y-pt.y)<bt?[]:[ft],ct=Ct?[]:[lt];d=[...G,...j,...ct]}d=Lv(t,d)}else y.intersect&&m.intersect&&!n&&(d=d.slice(1,t.points.length-1),d.unshift(m.intersect(d[0])),d.push(y.intersect(d[d.length-1])));const C=btoa(JSON.stringify(d));t.toCluster&&(V.info("to cluster abc88",r.get(t.toCluster)),d=qu(t.points,r.get(t.toCluster).node),f=!0),t.fromCluster&&(V.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(d,null,2)),d=qu(d.reverse(),r.get(t.fromCluster).node).reverse(),f=!0);let b=d.filter(j=>!Number.isNaN(j.y));const k=Tv(t.curve);k!=="rounded"&&(b=Av(b));let T=Vi;switch(k){case"linear":T=Vi;break;case"basis":T=Tn;break;case"cardinal":T=pf;break;case"bumpX":T=cf;break;case"bumpY":T=uf;break;case"catmullRom":T=yf;break;case"monotoneX":T=Sf;break;case"monotoneY":T=Tf;break;case"natural":T=vf;break;case"step":T=_f;break;case"stepAfter":T=Ff;break;case"stepBefore":T=Lf;break;case"rounded":T=Vi;break;default:T=Tn}const{x:v,y:B}=bv(t),F=Ow().x(v).y(B).curve(T);let M;switch(t.thickness){case"normal":M="edge-thickness-normal";break;case"thick":M="edge-thickness-thick";break;case"invisible":M="edge-thickness-invisible";break;default:M="edge-thickness-normal"}switch(t.pattern){case"solid":M+=" edge-pattern-solid";break;case"dotted":M+=" edge-pattern-dotted";break;case"dashed":M+=" edge-pattern-dashed";break;default:M+=" edge-pattern-solid"}let W,P=k==="rounded"?$m(Om(b,t),5):F(b);const $=Array.isArray(t.style)?t.style:[t.style];let q=$.find(j=>j?.startsWith("stroke:")),A="";t.animate&&(A="edge-animation-fast"),t.animation&&(A="edge-animation-"+t.animation);let L=!1;if(t.look==="handDrawn"){const j=at.svg(e);Object.assign([],b);const pt=j.path(P,{roughness:.3,seed:c});M+=" transition",W=Lt(pt).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+M+(t.classes?" "+t.classes:"")+(A?" "+A:"")).attr("style",$?$.reduce((bt,wt)=>bt+";"+wt,""):"");let yt=W.attr("d");W.attr("d",yt),e.node().appendChild(W.node())}else{const j=x.join(";"),pt=$?$.reduce((Ct,_t)=>Ct+_t+";",""):"",yt=(j?j+";"+pt+";":pt)+";"+($?$.reduce((Ct,_t)=>Ct+";"+_t,""):"");W=e.append("path").attr("d",P).attr("id",`${a}-${t.id}`).attr("class"," "+M+(t.classes?" "+t.classes:"")+(A?" "+A:"")).attr("style",yt),q=yt.match(/stroke:([^;]+)/)?.[1],L=t.animate===!0||!!t.animation||j.includes("animation");const bt=W.node(),wt=typeof bt.getTotalLength=="function"?bt.getTotalLength():0,ft=Pu[t.arrowTypeStart]||0,lt=Pu[t.arrowTypeEnd]||0;if(t.look==="neo"&&!L){const _t=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Ev(wt,ft,lt):`0 ${ft} ${wt-ft-lt} ${lt}`}; stroke-dashoffset: 0;`;W.attr("style",_t+W.attr("style"))}}W.attr("data-edge",!0),W.attr("data-et","edge"),W.attr("data-id",t.id),W.attr("data-points",C),W.attr("data-look",jt(t.look)),t.showPoints&&b.forEach(j=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",j.x).attr("cy",j.y)});let E="";(Ft().flowchart.arrowMarkerAbsolute||Ft().state.arrowMarkerAbsolute)&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),V.info("arrowTypeStart",t.arrowTypeStart),V.info("arrowTypeEnd",t.arrowTypeEnd);const _=!L&&t?.look==="neo";kv(W,t,E,a,i,_,q);const R=Math.floor(d.length/2),I=d[R];Ce.isLabelCoordinateInPath(I,W.attr("d"))||(f=!0);let Q={};return f&&(Q.updatedPath=d),Q.originalPath=t.points,Q},"insertEdge");function $m(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],h=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,l=a.y-n.y,u=h.x-a.x,d=h.y-a.y,f=Math.hypot(c,l),m=Math.hypot(u,d);if(f<s||m<s){r+=`L${a.x},${a.y}`;continue}const y=c/f,x=l/f,C=u/m,b=d/m,k=y*C+x*b,T=Math.max(-1,Math.min(1,k)),v=Math.acos(T);if(v<s||Math.abs(Math.PI-v)<s){r+=`L${a.x},${a.y}`;continue}const B=Math.min(t/Math.sin(v/2),f/2,m/2),F=a.x-y*B,M=a.y-x*B,W=a.x+C*B,P=a.y+b*B;r+=`L${F},${M}`,r+=`Q${a.x},${a.y} ${W},${P}`}}return r}g($m,"generateRoundedPath");function zn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(zn,"calculateDeltaAndAngle");function Om(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&ae[t.arrowTypeStart]){const s=ae[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=zn(o,a),h=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+h,r[0].y=o.y+c}const i=e.length;if(i>=2&&ae[t.arrowTypeEnd]){const s=ae[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=zn(a,o),h=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-h,r[i-1].y=o.y-c}return r}g(Om,"applyMarkerOffsetsToPoints");var Ov=g((e,t,r,i)=>{t.forEach(s=>{s_[s](e,r,i)})},"insertMarkers"),Dv=g((e,t,r)=>{V.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"),Iv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Pv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Rv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),qv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Nv=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Wv=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),zv=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Hv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Yv=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{transitionColor:o}=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",`${o}`)},"barbNeo"),Uv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),jv=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Xv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Gv=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Vv=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`),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",`${o}`)},"only_one_neo"),Zv=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const h=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");h.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),Kv=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`),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",`${o}`)},"one_or_more_neo"),Qv=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const h=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");h.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),Jv=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
296
- L20,10
297
- M20,10
298
- L0,20`)},"requirement_arrow"),t_=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{strokeWidth:o}=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",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
299
- L20,10
300
- M20,10
301
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),e_=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),r_=g((e,t,r)=>{const i=Nt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),i_=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),s_={extension:Dv,composition:Iv,aggregation:Pv,dependency:Rv,lollipop:qv,point:Nv,circle:Wv,cross:zv,barb:Hv,barbNeo:Yv,hierarchy:i_,only_one:Uv,zero_or_one:jv,one_or_more:Xv,zero_or_more:Gv,only_one_neo:Vv,zero_or_one_neo:Zv,one_or_more_neo:Kv,zero_or_more_neo:Qv,requirement_arrow:Jv,requirement_contains:e_,requirement_arrow_neo:t_,requirement_contains_neo:r_},o_=Ov,a_={common:ns,getConfig:Nt,insertCluster:Cv,insertEdge:$v,insertEdgeLabel:Bv,insertMarkers:o_,insertNode:Fm,interpolateToCurve:Hl,labelHelper:xt,log:V,positionEdgeLabel:_v},n_=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],ss=Object.create(null),Dm=g(e=>{for(const t of e)ss[t.name]=t},"registerLayoutLoaders"),l_=g(()=>{const e=g(async()=>await Mt(()=>import("./elk-QONTBCTQ-DHsjY8Z_.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...n_.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),h_=g(()=>{Dm([{name:"dagre",loader:g(async()=>await Mt(()=>import("./dagre-NK4GIZVX-Dv6vuUbR.js"),__vite__mapDeps([5,2,3,4]),import.meta.url),"loader")},{name:"swimlane",loader:g(async()=>await Mt(()=>import("./swimlanes-B3ENRKFQ-DdJOuuMV.js"),__vite__mapDeps([6,1,2,3,4]),import.meta.url),"loader")},{name:"cose-bilkent",loader:g(async()=>await Mt(()=>import("./cose-bilkent-JH36ORCC-6rqR5iJk.js"),__vite__mapDeps([7,8,4]),import.meta.url),"loader")},...l_()])},"registerDefaultLayoutLoaders");h_();var Y5=g(async(e,t)=>{if(!Object.hasOwn(ss,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const s of e.nodes){const o=s.domId||s.id;s.domId=`${e.diagramId}-${o}`}const r=ss[e.layoutAlgorithm],i=await r.loader();return Zw(t,e.config),i.render(e,t,a_,{algorithm:r.algorithm})},"render"),Ja="dagre",U5=g((e="",{fallback:t=Ja}={})=>{if(Object.hasOwn(ss,e))return e;for(const r of[t,Ja])if(Object.hasOwn(ss,r))return V.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${Ja} is registered.`)},"getRegisteredLayoutAlgorithm"),gh="comm",Im="rule",Pm="decl",c_="@media",u_="@import",d_="@supports",f_="@namespace",Hn="@keyframes",Rm="@layer",g_="@scope",p_=Math.abs,Qi=String.fromCharCode;function qm(e){return e.trim()}function Yn(e,t,r){return e.replace(t,r)}function ei(e,t){return e.charCodeAt(t)|0}function li(e,t,r){return e.slice(t,r)}function Ie(e){return e.length}function Nm(e){return e.length}function As(e,t){return t.push(e),e}var ta=1,hi=1,Wm=0,ke=0,Yt=0,pi="";function ph(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:ta,column:hi,length:a,return:"",siblings:n}}function m_(){return Yt}function y_(){return Yt=ke>0?ei(pi,--ke):0,hi--,Yt===10&&(hi=1,ta--),Yt}function Fe(){return Yt=ke<Wm?ei(pi,ke++):0,hi++,Yt===10&&(hi=1,ta++),Yt}function cr(){return ei(pi,ke)}function js(){return ke}function ea(e,t){return li(pi,e,t)}function os(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 x_(e){return ta=hi=1,Wm=Ie(pi=e),ke=0,[]}function C_(e){return pi="",e}function tn(e){return qm(ea(ke-1,Un(e===91?e+2:e===40?e+1:e)))}function b_(e){for(;(Yt=cr())&&Yt<33;)Fe();return os(e)>2||os(Yt)>3?"":" "}function k_(e,t){for(;--t&&Fe()&&!(Yt<48||Yt>102||Yt>57&&Yt<65||Yt>70&&Yt<97););return ea(e,js()+(t<6&&cr()==32&&Fe()==32))}function Un(e){for(;Fe();)switch(Yt){case e:return ke;case 34:case 39:e!==34&&e!==39&&Un(Yt);break;case 40:e===41&&Un(e);break;case 92:Fe();break}return ke}function w_(e,t){for(;Fe()&&e+Yt!==57;)if(e+Yt===84&&cr()===47)break;return"/*"+ea(t,ke-1)+"*"+Qi(e===47?e:Fe())}function S_(e){for(;!os(cr());)Fe();return ea(e,ke)}function T_(e){return C_(Xs("",null,null,null,[""],e=x_(e),0,[0],e))}function Xs(e,t,r,i,s,o,a,n,h){for(var c=0,l=0,u=a,d=0,f=0,m=0,y=1,x=1,C=1,b=0,k=0,T="",v=s,B=o,F=i,M=T;x;)switch(m=k,k=Fe()){case 40:m!=108&&ei(M,u-1)==58?(b++,M+="("):M+=tn(k);break;case 41:b--,M+=")";break;case 34:case 39:case 91:M+=tn(k);break;case 9:case 10:case 13:case 32:if(b>0){M+=Qi(k);break}M+=b_(m);break;case 92:M+=k_(js()-1,7);continue;case 47:switch(cr()){case 42:case 47:As(B_(w_(Fe(),js()),t,r,h),h),(os(m||1)==5||os(cr()||1)==5)&&Ie(M)&&li(M,-1,void 0)!==" "&&(M+=" ");break;default:M+="/"}break;case 123*y:n[c++]=Ie(M)*C;case 125*y:case 59:case 0:if(b>0&&k){M+=Qi(k);break}switch(k){case 0:case 125:x=0;case 59+l:C==-1&&(M=Yn(M,/\f/g,"")),f>0&&(Ie(M)-u||y===0)&&As(f>32?zu(M+";",i,r,u-1,h):zu(Yn(M," ","")+";",i,r,u-2,h),h);break;case 59:M+=";";default:if(As(F=Wu(M,t,r,c,l,s,n,T,v=[],B=[],u,o),o),k===123)if(l===0)Xs(M,t,F,F,v,o,u,n,B);else{switch(d){case 99:if(ei(M,3)===110)break;case 108:if(ei(M,2)===97)break;default:l=0;case 100:case 109:case 115:}l?Xs(e,F,F,i&&As(Wu(e,F,F,0,0,s,n,T,s,v=[],u,B),B),s,B,u,n,i?v:B):Xs(M,F,F,F,[""],B,0,n,B)}}c=l=f=0,y=C=1,T=M="",u=a;break;case 58:u=1+Ie(M),f=m;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&y_()==125)continue}switch(M+=Qi(k),k*y){case 38:C=l>0?1:(M+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Ie(M)-1)*C,C=1;break;case 64:cr()===45&&(M+=tn(Fe())),d=cr(),l=u=Ie(T=M+=S_(js())),k++;break;case 45:m===45&&Ie(M)==2&&(y=0)}}return o}function Wu(e,t,r,i,s,o,a,n,h,c,l,u){for(var d=s-1,f=s===0?o:[""],m=Nm(f),y=0,x=0,C=0;y<i;++y)for(var b=0,k=li(e,d+1,d=p_(x=a[y])),T=e;b<m;++b)(T=qm(x>0?f[b]+" "+k:Yn(k,/&\f/g,f[b])))&&(h[C++]=T);return ph(e,t,r,s===0?Im:n,h,c,l,u)}function B_(e,t,r,i){return ph(e,t,r,gh,Qi(m_()),li(e,2,-2),0,i)}function zu(e,t,r,i,s){return ph(e,t,r,Pm,li(e,0,i),li(e,i+1,-1),i,s)}function jn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function v_(e,t,r,i){switch(e.type){case Rm:if(e.children.length)break;case u_:case f_:case Pm:return e.return=e.return||e.value;case gh:return"";case Hn:return e.return=e.value+"{"+jn(e.children,i)+"}";case Im:if(!Ie(e.value=e.props.join(",")))return""}return Ie(r=jn(e.children,i))?e.return=e.value+"{"+r+"}":""}function __(e){var t=Nm(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var zm="c4",L_=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),F_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./c4Diagram-XDPPPE54-5zdyxFvA.js");return{diagram:t}},__vite__mapDeps([9,10,4]),import.meta.url);return{id:zm,diagram:e}},"loader"),M_={id:zm,detector:L_,loader:F_},A_=M_,Hm="flowchart-v2",E_=g(e=>/^\s*(graph|flowchart)/.test(e),"detector"),$_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-IUGLLWBU-CWsiqTQC.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,4]),import.meta.url);return{id:Hm,diagram:e}},"loader"),O_={id:Hm,detector:E_,loader:$_},D_=O_,Ym="agentflow",I_=g(e=>/^\s*agentflow-beta\b/.test(e),"detector"),P_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-TYUNFSNR-YTl5QdfL.js");return{diagram:t}},__vite__mapDeps([15,12,13,14,10,4]),import.meta.url);return{id:Ym,diagram:e}},"loader"),R_={id:Ym,detector:I_,loader:P_},q_=R_,Um="swimlane",N_=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),W_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-AYQRV4AK-BWt3HxHV.js");return{diagram:t}},__vite__mapDeps([16,11,12,13,14,10,4]),import.meta.url);return{id:Um,diagram:e}},"loader"),z_={id:Um,detector:N_,loader:W_},H_=z_,jm="er",Y_=g(e=>/^\s*erDiagram/.test(e),"detector"),U_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./erDiagram-KYQIGQAA-CUAbTUl1.js");return{diagram:t}},__vite__mapDeps([17,13,14,4]),import.meta.url);return{id:jm,diagram:e}},"loader"),j_={id:jm,detector:Y_,loader:U_},X_=j_,Xm="gitGraph",G_=g(e=>/^\s*gitGraph/.test(e),"detector"),V_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PDYL7XHY-ByrdgJmw.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,4]),import.meta.url);return{id:Xm,diagram:e}},"loader"),Z_={id:Xm,detector:G_,loader:V_},K_=Z_,Gm="gantt",Q_=g(e=>/^\s*gantt/.test(e),"detector"),J_=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ganttDiagram-R7GPNTJY-DetBW0Wm.js");return{diagram:t}},__vite__mapDeps([22,4]),import.meta.url);return{id:Gm,diagram:e}},"loader"),tL={id:Gm,detector:Q_,loader:J_},eL=tL,Vm="info",rL=g(e=>/^\s*info/.test(e),"detector"),iL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./infoDiagram-MVDRKAX5-BM48fjhU.js");return{diagram:t}},__vite__mapDeps([23,21,4]),import.meta.url);return{id:Vm,diagram:e}},"loader"),sL={id:Vm,detector:rL,loader:iL},Zm="pie",oL=g(e=>/^\s*pie/.test(e),"detector"),aL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./pieDiagram-GNMPY74T-Duf6YP0N.js");return{diagram:t}},__vite__mapDeps([24,20,21,4]),import.meta.url);return{id:Zm,diagram:e}},"loader"),nL={id:Zm,detector:oL,loader:aL},Km="quadrantChart",lL=g(e=>/^\s*quadrantChart/.test(e),"detector"),hL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./quadrantDiagram-D57K4MC3-B2eYoUUy.js");return{diagram:t}},__vite__mapDeps([25,4]),import.meta.url);return{id:Km,diagram:e}},"loader"),cL={id:Km,detector:lL,loader:hL},uL=cL,Qm="xychart",dL=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),fL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./xychartDiagram-4URNHDU4-DoLjYxeB.js");return{diagram:t}},__vite__mapDeps([26,4]),import.meta.url);return{id:Qm,diagram:e}},"loader"),gL={id:Qm,detector:dL,loader:fL},pL=gL,Jm="requirement",mL=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),yL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./requirementDiagram-EQYSW5RA-HhPMEqB1.js");return{diagram:t}},__vite__mapDeps([27,13,14,4]),import.meta.url);return{id:Jm,diagram:e}},"loader"),xL={id:Jm,detector:mL,loader:yL},CL=xL,ty="sequence",bL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),kL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./sequenceDiagram-BLEHNHQU-C9wR2ll7.js");return{diagram:t}},__vite__mapDeps([28,19,10,4]),import.meta.url);return{id:ty,diagram:e}},"loader"),wL={id:ty,detector:bL,loader:kL},SL=wL,ey="classDiagram",TL=g(e=>/^\s*classDiagram/.test(e),"detector"),BL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./classDiagram-v2-4MYWR3UA-CMoqNk-b.js");return{diagram:t}},__vite__mapDeps([29,12,13,14,10,4]),import.meta.url);return{id:ey,diagram:e}},"loader"),vL={id:ey,detector:TL,loader:BL},_L=vL,ry="stateDiagram",LL=g(e=>/^\s*stateDiagram/.test(e),"detector"),FL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-A6IESKWZ-D_gtonhE.js");return{diagram:t}},__vite__mapDeps([30,13,14,10,4]),import.meta.url);return{id:ry,diagram:e}},"loader"),ML={id:ry,detector:LL,loader:FL},AL=ML,iy="journey",EL=g(e=>/^\s*journey/.test(e),"detector"),$L=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./journeyDiagram-BOSHW7O7-DJ1LiRh3.js");return{diagram:t}},__vite__mapDeps([31,12,10,4]),import.meta.url);return{id:iy,diagram:e}},"loader"),OL={id:iy,detector:EL,loader:$L},DL=OL,Es=4,Oi=75,IL=g(e=>{const t=[];for(const s of e.split(/\s+/)){let o=[...s];for(;o.length>Oi;)t.push(o.slice(0,Oi).join("")),o=o.slice(Oi);o.length>0&&t.push(o.join(""))}const r=[];let i="";for(const s of t){const o=i?`${i} ${s}`:s;[...o].length>Oi?(r.push(i),i=s):i=o}if(i&&r.push(i),r.length>Es){r.length=Es;const s=r[Es-1]??"";r[Es-1]=`${[...s].slice(0,Oi-3).join("")}...`}return r},"wrapErrorMessage"),PL=g((e,t,r,i)=>{V.debug(`rendering svg for syntax error
302
- `);const s=Uw(t),o=s.append("g"),a=IL(i?.db.getErrorMessage?.()??""),n=a.length>0?500+a.length*56:512;s.attr("viewBox",`0 0 2412 ${n}`),hd(s,100,n,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),a.forEach((h,c)=>{o.append("text").attr("class","error-text").attr("x",1440).attr("y",510+c*56).attr("font-size","42px").style("text-anchor","middle").text(h)})},"draw"),sy={draw:PL},RL=sy,en,qL={clear(){en=void 0},setErrorMessage(e){en=e},getErrorMessage(){return en}},NL={db:qL,renderer:sy,parser:{parse:g(()=>{},"parse")}},WL=NL,oy="flowchart-elk",zL=g((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),HL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./flowDiagram-IUGLLWBU-CWsiqTQC.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([11,12,13,14,10,4]),import.meta.url);return{id:oy,diagram:e}},"loader"),YL={id:oy,detector:zL,loader:HL},UL=YL,ay="timeline",jL=g(e=>/^\s*timeline/.test(e),"detector"),XL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./timeline-definition-JXYKGLGB-DQsdwJe-.js");return{diagram:t}},__vite__mapDeps([32,4]),import.meta.url);return{id:ay,diagram:e}},"loader"),GL={id:ay,detector:jL,loader:XL},VL=GL,ny="mindmap",ZL=g(e=>/^\s*mindmap/.test(e),"detector"),KL=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./mindmap-definition-6OY57UG3-zbqYOEY6.js");return{diagram:t}},__vite__mapDeps([33,13,14,4]),import.meta.url);return{id:ny,diagram:e}},"loader"),QL={id:ny,detector:ZL,loader:KL},JL=QL,ly="kanban",tF=g(e=>/^\s*kanban/.test(e),"detector"),eF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./kanban-definition-FNSA4HC5-DPPt8pwJ.js");return{diagram:t}},__vite__mapDeps([34,12,4]),import.meta.url);return{id:ly,diagram:e}},"loader"),rF={id:ly,detector:tF,loader:eF},iF=rF,hy="sankey",sF=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),oF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./sankeyDiagram-SY24JHO5-CMUTwFBB.js");return{diagram:t}},__vite__mapDeps([35,4]),import.meta.url);return{id:hy,diagram:e}},"loader"),aF={id:hy,detector:sF,loader:oF},nF=aF,cy="packet",lF=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),hF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-I5XIIV2D-BB9cMoRW.js");return{diagram:t}},__vite__mapDeps([36,20,21,4]),import.meta.url);return{id:cy,diagram:e}},"loader"),cF={id:cy,detector:lF,loader:hF},uy="radar",uF=g(e=>/^\s*radar-beta/.test(e),"detector"),dF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-RJA3I4VV-CzkY_8Fo.js");return{diagram:t}},__vite__mapDeps([37,20,21,4]),import.meta.url);return{id:uy,diagram:e}},"loader"),fF={id:uy,detector:uF,loader:dF},dy="block",gF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),pF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./blockDiagram-RJAE7QA3-wbIxEiYN.js");return{diagram:t}},__vite__mapDeps([38,12,3,4]),import.meta.url);return{id:dy,diagram:e}},"loader"),mF={id:dy,detector:gF,loader:pF},yF=mF,fy="treeView",xF=g(e=>/^\s*treeView-beta/.test(e),"detector"),CF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-ODIL2UCW-BVcRtsdy.js");return{diagram:t}},__vite__mapDeps([39,19,20,21,4]),import.meta.url);return{id:fy,diagram:e}},"loader"),bF={id:fy,detector:xF,loader:CF},kF=bF,gy="architecture",wF=g(e=>/^\s*architecture/.test(e),"detector"),SF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZHVYKT53-BsCWa_qC.js");return{diagram:t}},__vite__mapDeps([40,20,21,8,4]),import.meta.url);return{id:gy,diagram:e}},"loader"),TF={id:gy,detector:wF,loader:SF},BF=TF,py="eventmodeling",vF=g(e=>/^\s*eventmodeling/.test(e),"detector"),_F=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-PFBEJUXE-BbGSOtJx.js");return{diagram:t}},__vite__mapDeps([41,20,21,4]),import.meta.url);return{id:py,diagram:e}},"loader"),LF={id:py,detector:vF,loader:_F},FF=LF,my="ishikawa",MF=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),AF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-HPEHV2GE-DtHYywHZ.js");return{diagram:t}},__vite__mapDeps([42,4]),import.meta.url);return{id:my,diagram:e}},"loader"),EF={id:my,detector:MF,loader:AF},yy="venn",$F=g(e=>/^\s*venn-beta/.test(e),"detector"),OF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./vennDiagram-Q3Y3IDCW-dihYszm0.js");return{diagram:t}},__vite__mapDeps([43,4]),import.meta.url);return{id:yy,diagram:e}},"loader"),DF={id:yy,detector:$F,loader:OF},IF=DF,xy="treemap",PF=g(e=>/^\s*treemap/.test(e),"detector"),RF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./diagram-CBK3MWTC-DJgMDeYd.js");return{diagram:t}},__vite__mapDeps([44,20,14,21,4]),import.meta.url);return{id:xy,diagram:e}},"loader"),qF={id:xy,detector:PF,loader:RF},Cy="usecase",NF=g(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),WF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./usecaseDiagram-WPOLBNNX-DTRyFq7d.js");return{diagram:t}},__vite__mapDeps([45,13,14,4]),import.meta.url);return{id:Cy,diagram:e}},"loader"),zF={id:Cy,detector:NF,loader:WF},by="wardley",HF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),YF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./wardleyDiagram-IVAIDKWA-BoPpgYfK.js");return{diagram:t}},__vite__mapDeps([46,20,21,4]),import.meta.url);return{id:by,diagram:e}},"loader"),UF={id:by,detector:HF,loader:YF},jF=UF,ky="cynefin",XF=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),GF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./cynefinDiagram-WF24UDRP-8b2CEBlR.js");return{diagram:t}},__vite__mapDeps([47,20,21,4]),import.meta.url);return{id:ky,diagram:e}},"loader"),VF={id:ky,detector:XF,loader:GF},wy="railroad",ZF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),KF=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./railroadDiagram-Y72NRBL7-BWCzPcI_.js");return{diagram:t}},__vite__mapDeps([48,49,20,21,4]),import.meta.url);return{id:wy,diagram:e}},"loader"),QF={id:wy,detector:ZF,loader:KF},Sy="railroadEbnf",JF=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),tM=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./ebnfDiagram-V4P3TTPT-COVjPAjE.js");return{diagram:t}},__vite__mapDeps([50,49,20,21,4]),import.meta.url);return{id:Sy,diagram:e}},"loader"),eM={id:Sy,detector:JF,loader:tM},Ty="railroadAbnf",rM=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),iM=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./abnfDiagram-WEYOIA3C-BgXsTF7a.js");return{diagram:t}},__vite__mapDeps([51,49,20,21,4]),import.meta.url);return{id:Ty,diagram:e}},"loader"),sM={id:Ty,detector:rM,loader:iM},By="railroadPeg",oM=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),aM=g(async()=>{const{diagram:e}=await Mt(async()=>{const{diagram:t}=await import("./pegDiagram-ECIUJNBX-e7QG7TMq.js");return{diagram:t}},__vite__mapDeps([52,49,20,21,4]),import.meta.url);return{id:By,diagram:e}},"loader"),nM={id:By,detector:oM,loader:aM},Hu=!1,ra=g(()=>{Hu||(Hu=!0,to("error",WL,e=>e.toLowerCase().trim()==="error"),to("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),sn(UL,JL,BF),sn(q_,A_,iF,_L,X_,eL,sL,nL,CL,SL,H_,D_,VL,K_,AL,DL,uL,nF,cF,pL,yF,FF,kF,fF,EF,qF,QF,eM,sM,nM,IF,jF,VF,zF))},"addDiagrams"),lM=g(async()=>{V.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(vr).map(async([r,{detector:i,loader:s}])=>{if(s)try{hn(r)}catch{try{const{diagram:o,id:a}=await s();to(a,o,i)}catch(o){throw V.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete vr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){V.error(`Failed to load ${t.length} external diagrams`);for(const r of t)V.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),hM="graphics-document document";function vy(e,t){e.attr("role",hM),t!==""&&e.attr("aria-roledescription",t)}g(vy,"setA11yDiagramInfo");function _y(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(_y,"addSVGa11yTitleDescription");var Eo=class Ly{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static{g(this,"Diagram")}static async fromText(t,r={}){const i=typeof t=="string"?{cleaned:t}:t,s=Nt(),o=Do(i.cleaned,s);try{hn(o)}catch{const d=r0(o);if(!d)throw new Zu(`Diagram ${o} not found.`);const{id:f,diagram:m}=await d();to(f,m)}const{db:a,parser:n,renderer:h,init:c}=hn(o);n.parser&&(n.parser.yy=a),a.clear?.(),c?.(s),r.title&&a.setDiagramTitle?.(r.title);let l=i.cleaned;if(a.preserveCommentsWhenParsing&&i.withComments){const d=s.maxTextSize??Zn.maxTextSize;i.withComments.length>d?V.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${d}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):l=i.withComments}const u=sT(l)+`
303
- `;return i.frontmatterLineOffset&&a.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await n.parse(u),new Ly(o,u,a,n,h)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},Yu=[],cM=g(()=>{Yu.forEach(e=>{e()}),Yu=[]},"attachFunctions"),uM=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Fy(e){const t=Vu(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
304
- `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
305
- `):t.body;let s=Vw(i,{schema:Gw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t.length),metadata:o}}g(Fy,"extractFrontMatter");var dM=g(e=>e.replace(/\r\n?/g,`
306
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fM=g(e=>{const{text:t,metadata:r}=Fy(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),gM=g(e=>{const t=Ce.detectInit(e)??{},r=Ce.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:US(e),directive:t}},"processDirectives");function mh(e){const t=e,r=dM(e),i=fM(r),s=gM(i.text),o=Gl(i.config,s.directive),a=s.text,n=uM(a),h=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:n,withComments:a,frontmatterLineOffset:h},title:i.title,config:o}}g(mh,"preprocessDiagram");function My(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(My,"toBase64");var pM=5e4,mM="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",yM="sandbox",xM="loose",CM="http://www.w3.org/2000/svg",bM="http://www.w3.org/1999/xlink",kM="http://www.w3.org/1999/xhtml",wM="100%",SM="100%",TM="border:0;margin:0;",BM="margin:0",vM="allow-top-navigation-by-user-activation allow-popups",_M='The "iframe" tag is not supported by your browser.',LM=["foreignobject"],FM=["dominant-baseline"];function yh(e){const t=mh(e);Qs();let r;try{r=Do(t.code.cleaned,Nt())}catch{r=void 0}return Kn(r),R0(t.config??{}),t}g(yh,"processAndSetConfigs");async function Ay(e,t){ra();try{const{code:r,config:i}=yh(e);return{diagramType:(await Eo.fromText(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}finally{Kn(void 0)}}g(Ay,"parse");var Uu=g((e,t,r=[])=>{const i=td(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),MM=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Qt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(h=>{Gc(h.styles)||n.forEach(c=>{r.insertRule(Uu(h.id,c,h.styles),r.cssRules.length)}),Gc(h.textStyles)||r.insertRule(Uu(h.id,"tspan",(h?.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=ln(s)+`
307
- `}else i+=`${e.themeCSS}
308
- `;return i+ln(r)},"createCssStyles"),AM=g((e,t)=>jn(T_(`${e}{${t}}`),__([g(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Hn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[c_,d_,Rm,g_,"@container","@starting-style"],Hn].includes(i.type)||(V.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=gh))},"addNamespace"),v_])),"compileCSS"),EM=g((e,t,r,i)=>{const s=MM(e,r),o=ox(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return AM(i,o)},"createUserStyles"),$M=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=gr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),OM=g((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":SM,i=My(`<body style="${BM}">${e}</body>`);return`<iframe style="width:${wM};height:${r};${TM}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${vM}">
309
- ${_M}
310
- </iframe>`},"putIntoIFrame"),ju=g((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",CM);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Xn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Xn,"sandboxedIframe");var DM=g((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),IM=g(async function(e,t,r){ra();const i=yh(t);let s=i.code;t=s.cleaned;const o=Nt();V.debug(o),t.length>(o?.maxTextSize??pM)&&(t=mM,s={raw:t,cleaned:t});const a=`#${e}`,n="i"+e,h="#"+n,c="d"+e,l="#"+c,u=g(()=>{const E=Lt(f?h:l).node();E&&"remove"in E&&E.remove()},"removeTempElements");let d=Lt(document.body);const f=o.securityLevel===yM,m=o.securityLevel===xM,y=o.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const L=Xn(Lt(r),n);d=Lt(L.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Lt(r);ju(d,e,c,`font-family: ${y}`,bM)}else{if(DM(document,e,c,n),f){const L=Xn(Lt(document.body),n);d=Lt(L.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Lt("body");ju(d,e,c)}let x,C;try{x=await Eo.fromText(s,{title:i.title})}catch(L){if(o.suppressErrorRendering)throw u(),L;x=await Eo.fromText("error"),C=L,x.db.setErrorMessage?.(gg(L))}const b=d.select(l).node(),k=x.type,T=b.firstChild,v=T.firstChild,B=x.renderer.getClasses?.(t,x),F=EM(o,k,B,a),M=document.createElement("style");M.innerHTML=F,T.insertBefore(M,v);try{await x.renderer.draw(t,e,"12.2.0",x)}catch(L){throw o.suppressErrorRendering?u():RL.draw(t,e,"12.2.0"),L}const W=d.select(`${l} svg`),P=x.db.getAccTitle?.(),$=x.db.getAccDescription?.();$y(k,W,P,$);const A=g(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",kM);let L=d.select(l).node().innerHTML;if(V.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),L=$M(L,f,ze(o.arrowMarkerAbsolute)),f){const E=d.select(l+" svg").node();L=OM(L,E)}else m||(L=ri.sanitize(L,{ADD_TAGS:LM,ADD_ATTR:FM,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return cM(),L},"serializeSvg")();if(C)throw C;return u(),{diagramType:k,svg:A,bindFunctions:x.db.bindFunctions}},"renderDiagram"),PM=g(async function(e,t,r){try{return await IM(e,t,r)}finally{Kn(void 0)}},"render");function Ey(e={}){const t=Ut({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),I0(t);const r=dr.theme;t?.theme&&Object.hasOwn(tr,t.theme)?t.themeVariables=tr[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=tr[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?D0(t):ed();Gn(i.logLevel),ra()}g(Ey,"initialize");var RM=g((e,t={})=>{const{code:r}=mh(e);return Eo.fromText(r,t)},"getDiagramFromText");function $y(e,t,r,i){vy(t,e),_y(t,r,i,t.attr("id"))}g($y,"addA11yInfo");var Er=Object.freeze({render:PM,parse:Ay,getDiagramFromText:RM,initialize:Ey,getConfig:Nt,setConfig:rd,getSiteConfig:ed,updateSiteConfig:P0,reset:g(()=>{Qs()},"reset"),globalReset:g(()=>{Qs(dr)},"globalReset"),defaultConfig:dr});Gn(Nt().logLevel);Qs(Nt());var qM=g((e,t,r)=>{V.warn(e),Xl(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"),Oy=g(async function(e={querySelector:".mermaid"}){try{await NM(e)}catch(t){if(Xl(t)&&V.error(t.str),ar.parseError&&ar.parseError(t),!e.suppressErrors)throw V.error("Use the suppressErrors option to suppress these errors"),t}},"run"),NM=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Er.getConfig();V.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");V.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(V.debug("Start On Load: "+i?.startOnLoad),Er.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Ce.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const h of Array.from(s)){if(V.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=h.innerHTML,a=_g(Ce.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=Ce.detectInit(a);l&&V.debug("Detected early reinit: ",l);try{const{svg:u,bindFunctions:d}=await Ry(c,a,h);h.innerHTML=u,e&&await e(c),d&&d(h)}catch(u){qM(u,n,ar.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Dy=g(function(e){Er.initialize(e)},"initialize"),WM=g(async function(e,t,r){V.warn("mermaid.init is deprecated. Please use run instead."),e&&Dy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Oy(i)},"init"),zM=g(async(e,{lazyLoad:t=!0}={})=>{ra(),sn(...e),t===!1&&await lM()},"registerExternalDiagrams"),Iy=g(function(){if(ar.startOnLoad){const{startOnLoad:e}=Er.getConfig();e&&ar.run().catch(t=>V.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Iy,!1);var HM=g(function(e){ar.parseError=e},"setParseErrorHandler"),$o=[],rn=!1,Py=g(async()=>{if(!rn){for(rn=!0;$o.length>0;){const e=$o.shift();if(e)try{await e()}catch(t){V.error("Error executing queue",t)}}rn=!1}},"executeQueue"),YM=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((o,a)=>{Er.parse(e,t).then(n=>{o(n),r(n)},n=>{V.error("Error parsing",n),ar.parseError?.(n),a(n),i(n)})}),"performCall");$o.push(s),Py().catch(i)}),"parse"),Ry=g((e,t,r)=>new Promise((i,s)=>{const o=g(()=>new Promise((a,n)=>{Er.render(e,t,r).then(h=>{a(h),i(h)},h=>{V.error("Error parsing",h),ar.parseError?.(h),n(h),s(h)})}),"performCall");$o.push(o),Py().catch(s)}),"render"),UM=g(()=>Object.keys(vr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ar={startOnLoad:!0,mermaidAPI:Er,parse:YM,render:Ry,init:WM,run:Oy,registerExternalDiagrams:zM,registerLayoutLoaders:Dm,initialize:Dy,parseError:void 0,contentLoaded:Iy,setParseErrorHandler:HM,detectType:Do,registerIconPacks:kS,getRegisteredDiagramsMetadata:UM},jM=ar;/*! Check if previously processed *//*!
311
- * Wait for document loaded before starting the execution
312
- */const j5=Object.freeze(Object.defineProperty({__proto__:null,default:jM},Symbol.toStringTag,{value:"Module"}));export{TS as $,e5 as A,QT as B,D5 as C,oh as D,I5 as E,ur as F,ZM as G,VT as H,Wg as I,Gw as J,zy as K,Nt as L,gx as M,Gl as N,Zn as O,ZS as P,Uw as Q,Xo as R,c5 as S,Vd as T,u5 as U,i2 as V,l0 as W,Gk as X,GT as Y,Ow as Z,g as _,lx as a,c2 as a$,Ji as a0,JM as a1,WS as a2,G0 as a3,ld as a4,Th as a5,VS as a6,as as a7,de as a8,z as a9,W5 as aA,H5 as aB,Ao as aC,Mt as aD,ms as aE,vv as aF,ee as aG,xt as aH,KM as aI,QM as aJ,GM as aK,qy as aL,Vi as aM,N5 as aN,Pu as aO,pe as aP,bS as aQ,l5 as aR,i5 as aS,r5 as aT,a5 as aU,jy as aV,o5 as aW,sf as aX,pl as aY,zo as aZ,u2 as a_,H as aa,rx as ab,cd as ac,Cv as ad,Fm as ae,q5 as af,Zw as ag,o_ as ah,$v as ai,Bv as aj,_v as ak,T5 as al,ug as am,we as an,fi as ao,kS as ap,jl as aq,at as ar,jd as as,Gd as at,n5 as au,nt as av,Df as aw,ae as ax,R5 as ay,z5 as az,nx as b,ai as b0,h2 as b1,l2 as b2,mo as b3,cs as b4,fl as b5,dl as b6,Vr as b7,po as b8,s5 as b9,h5 as ba,Mg as bb,ht as bc,P5 as bd,j5 as be,Ft as c,hd as d,Ut as e,or as f,cx as g,Lm as h,st as i,be as j,Lt as k,V as l,ns as m,fg as n,t5 as o,U5 as p,ux as q,Y5 as r,hx as s,dx as t,Ce as u,Vw as v,JS as w,av as x,B5 as y,ax as z};