turtlecode 0.1.0 → 0.1.3

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 (127) hide show
  1. package/assets/assets/{_basePickBy-B_7ShcHh.js → _basePickBy-BcOvpC5b.js} +1 -1
  2. package/assets/assets/{_baseUniq-BsW7XEuT.js → _baseUniq-D9AKNI-S.js} +1 -1
  3. package/assets/assets/{arc-BbW57NUb.js → arc-ClcBVsDq.js} +1 -1
  4. package/assets/assets/architectureDiagram-2XIMDMQ5-CRV28Qi0.js +36 -0
  5. package/assets/assets/{auth-callback-C2n64Qcj.js → auth-callback-D7CK9pHp.js} +1 -1
  6. package/assets/assets/{blockDiagram-WCTKOSBZ-C1Ni5oSK.js → blockDiagram-WCTKOSBZ-CL-sI8NU.js} +2 -2
  7. package/assets/assets/{c4Diagram-IC4MRINW-g8EmnUUA.js → c4Diagram-IC4MRINW-AFG5p1yt.js} +2 -2
  8. package/assets/assets/channel-BXqEQVGi.js +1 -0
  9. package/assets/assets/{chunk-4BX2VUAB-CGR6NDgJ.js → chunk-4BX2VUAB-CgNy2Qqu.js} +1 -1
  10. package/assets/assets/chunk-55IACEB6-Bsz0SHtO.js +1 -0
  11. package/assets/assets/{chunk-FMBD7UC4-CBSUaebz.js → chunk-FMBD7UC4-BRuwu34q.js} +1 -1
  12. package/assets/assets/chunk-JSJVCQXG-Bt0GkrjS.js +1 -0
  13. package/assets/assets/{chunk-KX2RTZJC-D_r6FHlr.js → chunk-KX2RTZJC-BiUvn-D7.js} +1 -1
  14. package/assets/assets/{chunk-NQ4KR5QH-_-NyPl-E.js → chunk-NQ4KR5QH-DH4YUQE9.js} +1 -1
  15. package/assets/assets/{chunk-QZHKN3VN-CMDZeFvi.js → chunk-QZHKN3VN-CrLB363X.js} +1 -1
  16. package/assets/assets/chunk-VVM5DH6Z-D2vG_ZPx.js +1 -0
  17. package/assets/assets/{chunk-WL4C6EOR-p1mj0O6S.js → chunk-WL4C6EOR-913dgDB-.js} +1 -1
  18. package/assets/assets/classDiagram-VBA2DB6C-gcpKg8SN.js +1 -0
  19. package/assets/assets/classDiagram-v2-RAHNMMFH-gcpKg8SN.js +1 -0
  20. package/assets/assets/clone-oMsF326O.js +1 -0
  21. package/assets/assets/{connection-popover-Sip4k8lc.js → connection-popover-D2MEtT6z.js} +1 -1
  22. package/assets/assets/{context-popover-jX8NoD9w.js → context-popover-C1ZDT4aK.js} +1 -1
  23. package/assets/assets/cose-bilkent-S5V4N54A-DRWnwV5H.js +1 -0
  24. package/assets/assets/{cssMode-xHiM5mcb.js → cssMode-DX-s2EC8.js} +2 -2
  25. package/assets/assets/dagre-KLK3FWXG-CN4ule0l.js +4 -0
  26. package/assets/assets/diagram-E7M64L7V-docJyJu4.js +24 -0
  27. package/assets/assets/diagram-IFDJBPK2-ChVpZldk.js +43 -0
  28. package/assets/assets/diagram-P4PSJMXO-Bf1-kRnd.js +24 -0
  29. package/assets/assets/dialog-clone-project-B1wF7jYQ.js +1 -0
  30. package/assets/assets/{dialog-connect-provider-BEqcXIot.js → dialog-connect-provider-Ot6Qr5dL.js} +2 -2
  31. package/assets/assets/dialog-create-project-BUc4DxX6.js +1 -0
  32. package/assets/assets/{dialog-edit-project-BfeaBlLZ.js → dialog-edit-project-BrkjzrGe.js} +1 -1
  33. package/assets/assets/{dialog-fork-D0oj4IQ5.js → dialog-fork-CyeKjf0e.js} +1 -1
  34. package/assets/assets/{dialog-manage-models-mDJUOPob.js → dialog-manage-models-CoiwPdu-.js} +1 -1
  35. package/assets/assets/{dialog-select-directory-BocFiQ9d.js → dialog-select-directory-K0nOY5Ky.js} +3 -3
  36. package/assets/assets/{dialog-select-file-CifFpv3x.js → dialog-select-file-Dx0Bny2E.js} +1 -1
  37. package/assets/assets/{dialog-select-mcp-Bz0DoDof.js → dialog-select-mcp-ehJzhdpz.js} +1 -1
  38. package/assets/assets/{dialog-select-model-unpaid-Da_CQzO4.js → dialog-select-model-unpaid-IVl97Sa_.js} +2 -2
  39. package/assets/assets/{dialog-select-provider-2iOfyWxy.js → dialog-select-provider-CBq6hNDx.js} +1 -1
  40. package/assets/assets/{dialog-select-server-DBhmJ2f8.js → dialog-select-server-DA5hATxx.js} +1 -1
  41. package/assets/assets/{dialog-settings-gGxknIbS.js → dialog-settings-BoOPbXZp.js} +1 -1
  42. package/assets/assets/{erDiagram-INFDFZHY-7L6v8ikj.js → erDiagram-INFDFZHY-kDj6gvOH.js} +2 -2
  43. package/assets/assets/{file-icon-CgbvTpIc.js → file-icon-DVEMs7Sx.js} +1 -1
  44. package/assets/assets/{flowDiagram-PKNHOUZH-aJT2T3cx.js → flowDiagram-PKNHOUZH-CsQeJUub.js} +2 -2
  45. package/assets/assets/{freemarker2-BgcPHQt-.js → freemarker2-B_-gEFnj.js} +2 -2
  46. package/assets/assets/ganttDiagram-A5KZAMGK-D1W7NciY.js +292 -0
  47. package/assets/assets/{ghostty-web-CyXMoQwm.js → ghostty-web-BQl0ls6m.js} +1 -1
  48. package/assets/assets/gitGraphDiagram-K3NZZRJ6-D4eeLV-l.js +65 -0
  49. package/assets/assets/{graph-CFcaDaoV.js → graph-KGuLNbW2.js} +1 -1
  50. package/assets/assets/{handlebars-DSpGDIPh.js → handlebars-DlnQtQmF.js} +2 -2
  51. package/assets/assets/{home-6Va-8zmR.js → home-BnHPimua.js} +1 -1
  52. package/assets/assets/{html-CNWh6Ln_.js → html-DrjCwvQg.js} +2 -2
  53. package/assets/assets/{htmlMode-LcU-TZaJ.js → htmlMode-C1xX0YwN.js} +3 -3
  54. package/assets/assets/index-DKwABhnu.js +2584 -0
  55. package/assets/assets/{index-DpJDxStT.css → index-DTxAHLat.css} +1 -1
  56. package/assets/assets/infoDiagram-LFFYTUFH-DsQ9EVx0.js +2 -0
  57. package/assets/assets/{ishikawaDiagram-PHBUUO56-y62OJXdI.js → ishikawaDiagram-PHBUUO56-MzetUfFK.js} +6 -6
  58. package/assets/assets/{javascript-CTmFPESg.js → javascript-CBQQIA5q.js} +2 -2
  59. package/assets/assets/{jobs-popover-DRbIcR2O.js → jobs-popover-DQmVz-e0.js} +1 -1
  60. package/assets/assets/{journeyDiagram-4ABVD52K-Bi9XcKs5.js → journeyDiagram-4ABVD52K-BkKgSN_9.js} +2 -2
  61. package/assets/assets/{jsonMode-CW1XLtuQ.js → jsonMode-B2Ye6w7y.js} +3 -3
  62. package/assets/assets/{kanban-definition-K7BYSVSG-DE01LQ5I.js → kanban-definition-K7BYSVSG-DIJz6AsI.js} +4 -4
  63. package/assets/assets/{layout-C6rurAvx.js → layout-BZKpv2Gr.js} +1 -1
  64. package/assets/assets/linear-COY9pyF4.js +1 -0
  65. package/assets/assets/{liquid-DB5uFXiY.js → liquid-CQXVmj19.js} +2 -2
  66. package/assets/assets/{list-BPk4NMWt.js → list-DPJi0fzr.js} +1 -1
  67. package/assets/assets/{mdx-Q7_EfF7H.js → mdx-QuCI1OJC.js} +2 -2
  68. package/assets/assets/{mermaid.core-DdXWHS-1.js → mermaid.core-bhqKFRxj.js} +10 -10
  69. package/assets/assets/{mindmap-definition-YRQLILUH-BajbwusW.js → mindmap-definition-YRQLILUH-CVv44i-B.js} +2 -2
  70. package/assets/assets/pieDiagram-SKSYHLDU-2ekrtn6z.js +30 -0
  71. package/assets/assets/{python-B3qjyNJj.js → python-Bx2b-xP4.js} +2 -2
  72. package/assets/assets/{quadrantDiagram-337W2JSQ-CZMB9UKV.js → quadrantDiagram-337W2JSQ-BoTofVsV.js} +2 -2
  73. package/assets/assets/{razor-CJkx1qh1.js → razor-2zgukQRj.js} +2 -2
  74. package/assets/assets/{requirementDiagram-Z7DCOOCP-BlyteLn_.js → requirementDiagram-Z7DCOOCP-LSodooxy.js} +2 -2
  75. package/assets/assets/sankeyDiagram-WA2Y5GQK-DUXSSMar.js +10 -0
  76. package/assets/assets/{select-CEKfrTm2.js → select-BbwOgh1Q.js} +1 -1
  77. package/assets/assets/{sequenceDiagram-2WXFIKYE-B2cOVhRx.js → sequenceDiagram-2WXFIKYE-C01qZdHR.js} +11 -11
  78. package/assets/assets/{server-row-BhbnbNJy.js → server-row-mRVGCgvL.js} +1 -1
  79. package/assets/assets/session-BXKBDkSI.js +34 -0
  80. package/assets/assets/stateDiagram-RAJIS63D-BuPj1Py4.js +1 -0
  81. package/assets/assets/stateDiagram-v2-FVOUBMTO-CjYACBI3.js +1 -0
  82. package/assets/assets/{status-popover-body-DkLpfJ2k.js → status-popover-body-9YRn8z8W.js} +2 -2
  83. package/assets/assets/{switch-DPq0vsit.js → switch-CHySmW8J.js} +1 -1
  84. package/assets/assets/{tabs-dF68ik4J.js → tabs-CKNlwTKd.js} +1 -1
  85. package/assets/assets/{tag--BCZ5q7_.js → tag-C4xikCZp.js} +1 -1
  86. package/assets/assets/{timeline-definition-YZTLITO2-C18tfizI.js → timeline-definition-YZTLITO2-CPcDqVYw.js} +2 -2
  87. package/assets/assets/transform-BwXaE9hv.js +1 -0
  88. package/assets/assets/{treemap-KZPCXAKY-C7fWdgj-.js → treemap-KZPCXAKY-Bin819KW.js} +1 -1
  89. package/assets/assets/{trellis-6YKi26t8.js → trellis-Csm7WAqm.js} +217 -231
  90. package/assets/assets/{trellis-badge-demo-BDa3ILpo.js → trellis-badge-demo-nxtlIRoh.js} +1 -1
  91. package/assets/assets/{trellis-op-icon-5x1lMwNH.js → trellis-op-icon-CzIuo5X7.js} +1 -1
  92. package/assets/assets/{tsMode-Bg19hQiu.js → tsMode-qOM514sL.js} +2 -2
  93. package/assets/assets/{typescript-8CtqEj8t.js → typescript-XOJMwr_m.js} +2 -2
  94. package/assets/assets/{vennDiagram-LZ73GAT5-DWmAgqdE.js → vennDiagram-LZ73GAT5-BDAdfrV5.js} +2 -2
  95. package/assets/assets/{xml-BKjz9euG.js → xml-BIwomT_0.js} +2 -2
  96. package/assets/assets/{xychartDiagram-JWTSCODW-Ckcyhr_q.js → xychartDiagram-JWTSCODW-Be2x0vdX.js} +2 -2
  97. package/assets/assets/{yaml-jJWTWPtR.js → yaml-BZMZa-4Z.js} +2 -2
  98. package/assets/index.html +2 -4
  99. package/assets/oc-theme-preload.js +0 -2
  100. package/bin/cli.mjs +203 -25
  101. package/package.json +1 -1
  102. package/assets/assets/architectureDiagram-2XIMDMQ5-DVePwAIo.js +0 -36
  103. package/assets/assets/channel-CPcPUiyc.js +0 -1
  104. package/assets/assets/chunk-55IACEB6-CuagpIkW.js +0 -1
  105. package/assets/assets/chunk-JSJVCQXG-DK5RSVJJ.js +0 -1
  106. package/assets/assets/chunk-VVM5DH6Z-COaOSPgd.js +0 -1
  107. package/assets/assets/classDiagram-VBA2DB6C-BAnp4Zaa.js +0 -1
  108. package/assets/assets/classDiagram-v2-RAHNMMFH-BAnp4Zaa.js +0 -1
  109. package/assets/assets/clone-Cf5BTVxd.js +0 -1
  110. package/assets/assets/cose-bilkent-S5V4N54A-C5LXU9pd.js +0 -1
  111. package/assets/assets/dagre-KLK3FWXG-m-9cmD-w.js +0 -4
  112. package/assets/assets/diagram-E7M64L7V-Cn-5LVpt.js +0 -24
  113. package/assets/assets/diagram-IFDJBPK2-CD8BK0Gp.js +0 -43
  114. package/assets/assets/diagram-P4PSJMXO-JVUlmg7w.js +0 -24
  115. package/assets/assets/dialog-clone-project-BgrtjUcd.js +0 -1
  116. package/assets/assets/dialog-create-project-TcSOut-3.js +0 -1
  117. package/assets/assets/ganttDiagram-A5KZAMGK-C5vwClxA.js +0 -292
  118. package/assets/assets/gitGraphDiagram-K3NZZRJ6-CI0SeLE3.js +0 -65
  119. package/assets/assets/index-bSvs-Qh3.js +0 -2544
  120. package/assets/assets/infoDiagram-LFFYTUFH-H6835-cD.js +0 -2
  121. package/assets/assets/linear-ilW0Y4uJ.js +0 -1
  122. package/assets/assets/pieDiagram-SKSYHLDU-DxK57epR.js +0 -30
  123. package/assets/assets/purify.es-A66Cw1IH.js +0 -2
  124. package/assets/assets/sankeyDiagram-WA2Y5GQK-DrdtRBZz.js +0 -10
  125. package/assets/assets/session-CdcUAq9-.js +0 -60
  126. package/assets/assets/stateDiagram-RAJIS63D-C4udRYnl.js +0 -1
  127. package/assets/assets/stateDiagram-v2-FVOUBMTO-CECUON5A.js +0 -1
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-bSvs-Qh3.js","assets/index-DpJDxStT.css","assets/dagre-KLK3FWXG-m-9cmD-w.js","assets/graph-CFcaDaoV.js","assets/_baseUniq-BsW7XEuT.js","assets/layout-C6rurAvx.js","assets/_basePickBy-B_7ShcHh.js","assets/clone-Cf5BTVxd.js","assets/purify.es-A66Cw1IH.js","assets/trellis-6YKi26t8.js","assets/select-CEKfrTm2.js","assets/chunk-VVM5DH6Z-COaOSPgd.js","assets/trellis-op-icon-5x1lMwNH.js","assets/trellis-CZsWDIog.css","assets/cose-bilkent-S5V4N54A-C5LXU9pd.js","assets/cytoscape.esm-DtBltrT8.js","assets/c4Diagram-IC4MRINW-g8EmnUUA.js","assets/chunk-JSJVCQXG-DK5RSVJJ.js","assets/flowDiagram-PKNHOUZH-aJT2T3cx.js","assets/chunk-FMBD7UC4-CBSUaebz.js","assets/chunk-55IACEB6-CuagpIkW.js","assets/chunk-KX2RTZJC-D_r6FHlr.js","assets/channel-CPcPUiyc.js","assets/erDiagram-INFDFZHY-7L6v8ikj.js","assets/gitGraphDiagram-K3NZZRJ6-CI0SeLE3.js","assets/chunk-4BX2VUAB-CGR6NDgJ.js","assets/chunk-QZHKN3VN-CMDZeFvi.js","assets/treemap-KZPCXAKY-C7fWdgj-.js","assets/ganttDiagram-A5KZAMGK-C5vwClxA.js","assets/linear-ilW0Y4uJ.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-LFFYTUFH-H6835-cD.js","assets/pieDiagram-SKSYHLDU-DxK57epR.js","assets/arc-BbW57NUb.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-337W2JSQ-CZMB9UKV.js","assets/xychartDiagram-JWTSCODW-Ckcyhr_q.js","assets/requirementDiagram-Z7DCOOCP-BlyteLn_.js","assets/sequenceDiagram-2WXFIKYE-B2cOVhRx.js","assets/classDiagram-VBA2DB6C-BAnp4Zaa.js","assets/chunk-WL4C6EOR-p1mj0O6S.js","assets/classDiagram-v2-RAHNMMFH-BAnp4Zaa.js","assets/stateDiagram-RAJIS63D-C4udRYnl.js","assets/chunk-NQ4KR5QH-_-NyPl-E.js","assets/stateDiagram-v2-FVOUBMTO-CECUON5A.js","assets/journeyDiagram-4ABVD52K-Bi9XcKs5.js","assets/timeline-definition-YZTLITO2-C18tfizI.js","assets/mindmap-definition-YRQLILUH-BajbwusW.js","assets/kanban-definition-K7BYSVSG-DE01LQ5I.js","assets/sankeyDiagram-WA2Y5GQK-DrdtRBZz.js","assets/diagram-P4PSJMXO-JVUlmg7w.js","assets/diagram-IFDJBPK2-CD8BK0Gp.js","assets/blockDiagram-WCTKOSBZ-C1Ni5oSK.js","assets/architectureDiagram-2XIMDMQ5-DVePwAIo.js","assets/ishikawaDiagram-PHBUUO56-y62OJXdI.js","assets/vennDiagram-LZ73GAT5-DWmAgqdE.js","assets/diagram-E7M64L7V-Cn-5LVpt.js"])))=>i.map(i=>d[i]);
2
- import{bF as df,_ as st}from"./index-bSvs-Qh3.js";import{p as Ye}from"./purify.es-A66Cw1IH.js";import{s as rt}from"./trellis-6YKi26t8.js";var Kr={exports:{}},ff=Kr.exports,an;function pf(){return an||(an=1,(function(e,t){(function(r,i){e.exports=i()})(ff,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var B=["th","st","nd","rd"],w=L%100;return"["+L+(B[(w-20)%10]||B[w]||B[0])+"]"}},k=function(L,B,w){var M=String(L);return!M||M.length>=B?L:""+Array(B+1-M.length).join(w)+L},v={s:k,z:function(L){var B=-L.utcOffset(),w=Math.abs(B),M=Math.floor(w/60),$=w%60;return(B<=0?"+":"-")+k(M,2,"0")+":"+k($,2,"0")},m:function L(B,w){if(B.date()<w.date())return-L(w,B);var M=12*(w.year()-B.year())+(w.month()-B.month()),$=B.clone().add(M,u),z=w-$<0,G=B.clone().add(M+(z?-1:1),u);return+(-(M+(w-$)/(z?$-G:G-$))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:d,w:h,d:c,D:g,h:l,m:n,s:o,ms:s,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},_="en",S={};S[_]=b;var T="$isDayjsObject",F=function(L){return L instanceof I||!(!L||!L[T])},P=function L(B,w,M){var $;if(!B)return _;if(typeof B=="string"){var z=B.toLowerCase();S[z]&&($=z),w&&(S[z]=w,$=z);var G=B.split("-");if(!$&&G.length>1)return L(G[0])}else{var et=B.name;S[et]=B,$=et}return!M&&$&&(_=$),$||!M&&_},D=function(L,B){if(F(L))return L.clone();var w=typeof B=="object"?B:{};return w.date=L,w.args=arguments,new I(w)},E=v;E.l=P,E.i=F,E.w=function(L,B){return D(L,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var I=(function(){function L(w){this.$L=P(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[T]=!0}var B=L.prototype;return B.parse=function(w){this.$d=(function(M){var $=M.date,z=M.utc;if($===null)return new Date(NaN);if(E.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var G=$.match(y);if(G){var et=G[2]-1||0,Z=(G[7]||"0").substring(0,3);return z?new Date(Date.UTC(G[1],et,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Z)):new Date(G[1],et,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Z)}}return new Date($)})(w),this.init()},B.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},B.$utils=function(){return E},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(w,M){var $=D(w);return this.startOf(M)<=$&&$<=this.endOf(M)},B.isAfter=function(w,M){return D(w)<this.startOf(M)},B.isBefore=function(w,M){return this.endOf(M)<D(w)},B.$g=function(w,M,$){return E.u(w)?this[M]:this.set($,w)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(w,M){var $=this,z=!!E.u(M)||M,G=E.p(w),et=function(le,yt){var ce=E.w($.$u?Date.UTC($.$y,yt,le):new Date($.$y,yt,le),$);return z?ce:ce.endOf(c)},Z=function(le,yt){return E.w($.toDate()[le].apply($.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(yt)),$)},tt=this.$W,it=this.$M,ct=this.$D,At="set"+(this.$u?"UTC":"");switch(G){case d:return z?et(1,0):et(31,11);case u:return z?et(1,it):et(0,it+1);case h:var Ct=this.$locale().weekStart||0,oe=(tt<Ct?tt+7:tt)-Ct;return et(z?ct-oe:ct+(6-oe),it);case c:case g:return Z(At+"Hours",0);case l:return Z(At+"Minutes",1);case n:return Z(At+"Seconds",2);case o:return Z(At+"Milliseconds",3);default:return this.clone()}},B.endOf=function(w){return this.startOf(w,!1)},B.$set=function(w,M){var $,z=E.p(w),G="set"+(this.$u?"UTC":""),et=($={},$[c]=G+"Date",$[g]=G+"Date",$[u]=G+"Month",$[d]=G+"FullYear",$[l]=G+"Hours",$[n]=G+"Minutes",$[o]=G+"Seconds",$[s]=G+"Milliseconds",$)[z],Z=z===c?this.$D+(M-this.$W):M;if(z===u||z===d){var tt=this.clone().set(g,1);tt.$d[et](Z),tt.init(),this.$d=tt.set(g,Math.min(this.$D,tt.daysInMonth())).$d}else et&&this.$d[et](Z);return this.init(),this},B.set=function(w,M){return this.clone().$set(w,M)},B.get=function(w){return this[E.p(w)]()},B.add=function(w,M){var $,z=this;w=Number(w);var G=E.p(M),et=function(it){var ct=D(z);return E.w(ct.date(ct.date()+Math.round(it*w)),z)};if(G===u)return this.set(u,this.$M+w);if(G===d)return this.set(d,this.$y+w);if(G===c)return et(1);if(G===h)return et(7);var Z=($={},$[n]=i,$[l]=a,$[o]=r,$)[G]||1,tt=this.$d.getTime()+w*Z;return E.w(tt,this)},B.subtract=function(w,M){return this.add(-1*w,M)},B.format=function(w){var M=this,$=this.$locale();if(!this.isValid())return $.invalidDate||m;var z=w||"YYYY-MM-DDTHH:mm:ssZ",G=E.z(this),et=this.$H,Z=this.$m,tt=this.$M,it=$.weekdays,ct=$.months,At=$.meridiem,Ct=function(yt,ce,ir,Hr){return yt&&(yt[ce]||yt(M,z))||ir[ce].slice(0,Hr)},oe=function(yt){return E.s(et%12||12,yt,"0")},le=At||function(yt,ce,ir){var Hr=yt<12?"AM":"PM";return ir?Hr.toLowerCase():Hr};return z.replace(x,(function(yt,ce){return ce||(function(ir){switch(ir){case"YY":return String(M.$y).slice(-2);case"YYYY":return E.s(M.$y,4,"0");case"M":return tt+1;case"MM":return E.s(tt+1,2,"0");case"MMM":return Ct($.monthsShort,tt,ct,3);case"MMMM":return Ct(ct,tt);case"D":return M.$D;case"DD":return E.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return Ct($.weekdaysMin,M.$W,it,2);case"ddd":return Ct($.weekdaysShort,M.$W,it,3);case"dddd":return it[M.$W];case"H":return String(et);case"HH":return E.s(et,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return le(et,Z,!0);case"A":return le(et,Z,!1);case"m":return String(Z);case"mm":return E.s(Z,2,"0");case"s":return String(M.$s);case"ss":return E.s(M.$s,2,"0");case"SSS":return E.s(M.$ms,3,"0");case"Z":return G}return null})(yt)||G.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(w,M,$){var z,G=this,et=E.p(M),Z=D(w),tt=(Z.utcOffset()-this.utcOffset())*i,it=this-Z,ct=function(){return E.m(G,Z)};switch(et){case d:z=ct()/12;break;case u:z=ct();break;case f:z=ct()/3;break;case h:z=(it-tt)/6048e5;break;case c:z=(it-tt)/864e5;break;case l:z=it/a;break;case n:z=it/i;break;case o:z=it/r;break;default:z=it}return $?z:E.a(z)},B.daysInMonth=function(){return this.endOf(u).$D},B.$locale=function(){return S[this.$L]},B.locale=function(w,M){if(!w)return this.$L;var $=this.clone(),z=P(w,M,!0);return z&&($.$L=z),$},B.clone=function(){return E.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},L})(),O=I.prototype;return D.prototype=O,[["$ms",s],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(L){O[L[1]]=function(B){return this.$g(B,L[0],L[1])}})),D.extend=function(L,B){return L.$i||(L(B,I,D),L.$i=!0),D},D.locale=P,D.isDayjs=F,D.unix=function(L){return D(1e3*L)},D.en=S[_],D.Ls=S,D.p={},D}))})(Kr)),Kr.exports}var gf=pf();const mf=df(gf);var yo=Object.defineProperty,p=(e,t)=>yo(e,"name",{value:t,configurable:!0}),yf=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},Kt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ls=p(function(e="fatal"){let t=Kt.fatal;typeof e=="string"?e.toLowerCase()in Kt&&(t=Kt[e]):typeof e=="number"&&(t=e),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},t<=Kt.fatal&&(A.fatal=console.error?console.error.bind(console,Pt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Pt("FATAL"))),t<=Kt.error&&(A.error=console.error?console.error.bind(console,Pt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Pt("ERROR"))),t<=Kt.warn&&(A.warn=console.warn?console.warn.bind(console,Pt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Pt("WARN"))),t<=Kt.info&&(A.info=console.info?console.info.bind(console,Pt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Pt("INFO"))),t<=Kt.debug&&(A.debug=console.debug?console.debug.bind(console,Pt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pt("DEBUG"))),t<=Kt.trace&&(A.trace=console.debug?console.debug.bind(console,Pt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pt("TRACE")))},"setLogLevel"),Pt=p(e=>`%c${mf().format("ss.SSS")} : ${e} : `,"format");const Qr={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return Qr.hue2rgb(s,a,e+1/3)*255;case"g":return Qr.hue2rgb(s,a,e)*255;case"b":return Qr.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){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}}},xf={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},bf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},J={channel:Qr,lang:xf,unit:bf},he={};for(let e=0;e<=255;e++)he[e]=J.unit.dec2hex(e);const kt={ALL:0,RGB:1,HSL:2};class Cf{constructor(){this.type=kt.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=kt.ALL}is(t){return this.type===t}}class kf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Cf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=kt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=J.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=J.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=J.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=J.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=J.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=J.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(kt.HSL)&&r!==void 0?r:(this._ensureHSL(),J.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(kt.HSL)&&r!==void 0?r:(this._ensureHSL(),J.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(kt.HSL)&&r!==void 0?r:(this._ensureHSL(),J.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(kt.RGB)&&r!==void 0?r:(this._ensureRGB(),J.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(kt.RGB)&&r!==void 0?r:(this._ensureRGB(),J.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(kt.RGB)&&r!==void 0?r:(this._ensureRGB(),J.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(kt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(kt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(kt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(kt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(kt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(kt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Pi=new kf({r:0,g:0,b:0,a:0},"transparent"),He={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(He.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Pi.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${he[Math.round(t)]}${he[Math.round(r)]}${he[Math.round(i)]}${he[Math.round(a*255)]}`:`#${he[Math.round(t)]}${he[Math.round(r)]}${he[Math.round(i)]}`}},Se={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(Se.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return J.channel.clamp.h(parseFloat(r)*.9);case"rad":return J.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return J.channel.clamp.h(parseFloat(r)*360)}}return J.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Se.re);if(!r)return;const[,i,a,s,o,n]=r;return Pi.set({h:Se._hue2deg(i),s:J.channel.clamp.s(parseFloat(a)),l:J.channel.clamp.l(parseFloat(s)),a:o?J.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${J.lang.round(t)}, ${J.lang.round(r)}%, ${J.lang.round(i)}%, ${a})`:`hsl(${J.lang.round(t)}, ${J.lang.round(r)}%, ${J.lang.round(i)}%)`}},mr={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=mr.colors[e];if(t)return He.parse(t)},stringify:e=>{const t=He.stringify(e);for(const r in mr.colors)if(mr.colors[r]===t)return r}},ur={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(ur.re);if(!r)return;const[,i,a,s,o,n,l,c,h]=r;return Pi.set({r:J.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:J.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:J.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?J.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${J.lang.round(t)}, ${J.lang.round(r)}, ${J.lang.round(i)}, ${J.lang.round(a)})`:`rgb(${J.lang.round(t)}, ${J.lang.round(r)}, ${J.lang.round(i)})`}},Ut={format:{keyword:mr,hex:He,rgb:ur,rgba:ur,hsl:Se,hsla:Se},parse:e=>{if(typeof e!="string")return e;const t=He.parse(e)||ur.parse(e)||Se.parse(e)||mr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(kt.HSL)||e.data.r===void 0?Se.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ur.stringify(e):He.stringify(e)},xo=(e,t)=>{const r=Ut.parse(e);for(const i in t)r[i]=J.channel.clamp[i](t[i]);return Ut.stringify(r)},yr=(e,t,r=0,i=1)=>{if(typeof e!="number")return xo(e,{a:t});const a=Pi.set({r:J.channel.clamp.r(e),g:J.channel.clamp.g(t),b:J.channel.clamp.b(r),a:J.channel.clamp.a(i)});return Ut.stringify(a)},_f=e=>{const{r:t,g:r,b:i}=Ut.parse(e),a=.2126*J.channel.toLinear(t)+.7152*J.channel.toLinear(r)+.0722*J.channel.toLinear(i);return J.lang.round(a)},wf=e=>_f(e)>=.5,Er=e=>!wf(e),bo=(e,t,r)=>{const i=Ut.parse(e),a=i[t],s=J.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ut.stringify(i)},W=(e,t)=>bo(e,"l",t),U=(e,t)=>bo(e,"l",-t),C=(e,t)=>{const r=Ut.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return xo(e,i)},vf=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Ut.parse(e),{r:n,g:l,b:c,a:h}=Ut.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+n*y,b=a*m+l*y,k=s*m+c*y,v=o*u+h*(1-u);return yr(x,b,k,v)},R=(e,t=100)=>{const r=Ut.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vf(r,e,t)};var Co=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,xr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Sf=/\s*%%.*\n/gm,ko=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Le={},cs=p(function(e,t){e=e.replace(Co,"").replace(xr,"").replace(Sf,`
3
- `);for(const[r,{detector:i}]of Object.entries(Le))if(i(e,t))return r;throw new ko(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)_o(t,r,i)},"registerLazyLoadedDiagrams"),_o=p((e,t,r)=>{Le[e]&&A.warn(`Detector with key ${e} already exists. Overwriting.`),Le[e]={detector:t,loader:r},A.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Tf=p(e=>Le[e].loader,"getDiagramLoader"),ba=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>ba(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=ba(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),gt=ba,Ii="#ffffff",Ri="#f2f2f2",Lt=p((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),Bf=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||R(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||R(this.tertiaryColor),this.lineColor=this.lineColor||R(this.background),this.arrowheadColor=this.arrowheadColor||R(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||R(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||R(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||U(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]||C(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(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||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(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||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(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??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(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||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Lf=p(e=>{const t=new Bf;return t.calculate(e),t},"getThemeVariables"),$f=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(R("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=yr(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.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.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=yr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=yr(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||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=W(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=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=W(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=R(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||R(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||C(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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)]??W(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||C(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||C(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||C(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||C(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||C(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(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]=e[r]})}},Mf=p(e=>{const t=new $f;return t.calculate(e),t},"getThemeVariables"),Af=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=yr(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=U(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||C(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||C(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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||R(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||R(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.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||C(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||C(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||C(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??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(R(this.git0),25),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Ff=p(e=>{const t=new Af;return t.calculate(e),t},"getThemeVariables"),Ef=class{static{p(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=W("#cde498",10),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.primaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=U(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||C(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]||C(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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.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||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{l:-30}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||C(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??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Df=p(e=>{const t=new Ef;return t.calculate(e),t},"getThemeVariables"),Of=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(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.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.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||R(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||U(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]||C(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=U(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=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||C(this.primaryColor,{h:-30}),this.git4=this.pie5||C(this.primaryColor,{h:-60}),this.git5=this.pie6||C(this.primaryColor,{h:-90}),this.git6=this.pie7||C(this.primaryColor,{h:60}),this.git7=this.pie8||C(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Pf=p(e=>{const t=new Of;return t.calculate(e),t},"getThemeVariables"),te={base:{getThemeVariables:Lf},dark:{getThemeVariables:Mf},default:{getThemeVariables:Ff},forest:{getThemeVariables:Df},neutral:{getThemeVariables:Pf}},It={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},wo={...It,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:te.default.getThemeVariables(),sequence:{...It.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...It.gantt,tickInterval:void 0,useWidth:void 0},c4:{...It.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...It.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...It.pie,useWidth:984},xyChart:{...It.xyChart,useWidth:void 0},requirement:{...It.requirement,useWidth:void 0},packet:{...It.packet},radar:{...It.radar},ishikawa:{...It.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...It.venn}},vo=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...vo(e[i],"")]:[...r,t+i],[]),"keyify"),If=new Set(vo(wo,"")),So=wo,oi=p(e=>{if(A.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>oi(t));return}for(const t of Object.keys(e)){if(A.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!If.has(t)||e[t]==null){A.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){A.debug("sanitizing object",t),oi(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(A.debug("sanitizing css option",t),e[t]=Rf(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]="")}A.debug("After sanitization",e)}},"sanitizeDirective"),Rf=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ge=Object.freeze(So),xe=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Et=gt({},Ge),li,$e=[],br=gt({},Ge),Ni=p((e,t)=>{let r=gt({},e),i={};for(const a of t)Lo(a),i=gt(i,a);if(r=gt(r,i),i.theme&&i.theme in te){const a=gt({},li),s=gt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in te&&(r.themeVariables=te[r.theme].getThemeVariables(s))}return br=r,Mo(br),br},"updateCurrentConfig"),Nf=p(e=>(Et=gt({},Ge),Et=gt(Et,e),e.theme&&te[e.theme]&&(Et.themeVariables=te[e.theme].getThemeVariables(e.themeVariables)),Ni(Et,$e),Et),"setSiteConfig"),zf=p(e=>{li=gt({},e)},"saveConfigFromInitialize"),Wf=p(e=>(Et=gt(Et,e),Ni(Et,$e),Et),"updateSiteConfig"),To=p(()=>gt({},Et),"getSiteConfig"),Bo=p(e=>(Mo(e),gt(br,e),wt()),"setConfig"),wt=p(()=>gt({},br),"getConfig"),Lo=p(e=>{e&&(["secure",...Et.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(A.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"&&Lo(e[t])}))},"sanitize"),qf=p(e=>{oi(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),$e.push(e),Ni(Et,$e)},"addDirective"),ci=p((e=Et)=>{$e=[],Ni(e,$e)},"reset"),Hf={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."},sn={},$o=p(e=>{sn[e]||(A.warn(Hf[e]),sn[e]=!0)},"issueWarning"),Mo=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&$o("LAZY_LOAD_DEPRECATED")},"checkConfig"),Pk=p(()=>{let e={};li&&(e=gt(e,li));for(const t of $e)e=gt(e,t);return e},"getUserDefinedConfig"),Tt=p(e=>(e.flowchart?.htmlLabels!=null&&$o("FLOWCHART_HTML_LABELS_DEPRECATED"),xe(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Dr=/<br\s*\/?>/gi,jf=p(e=>e?Eo(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Yf=(()=>{let e=!1;return()=>{e||(Ao(),e=!0)}})();function Ao(){const e="data-temp-href-target";Ye.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ye.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Ao,"setupDompurifyHooks");var Fo=p(e=>(Yf(),Ye.sanitize(e)),"removeScript"),nn=p((e,t)=>{if(Tt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Fo(e):r!=="loose"&&(e=Eo(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Xf(e))}return e},"sanitizeMore"),jt=p((e,t)=>e&&(t.dompurifyConfig?e=Ye.sanitize(nn(e,t),t.dompurifyConfig).toString():e=Ye.sanitize(nn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Gf=p((e,t)=>typeof e=="string"?jt(e,t):e.flat().map(r=>jt(r,t)),"sanitizeTextOrArray"),Vf=p(e=>Dr.test(e),"hasBreaks"),Uf=p(e=>e.split(Dr),"splitBreaks"),Xf=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Eo=p(e=>e.replace(Dr,"#br#"),"breakToPlaceholder"),Zf=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Kf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Qf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),on=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];Jf(s,o)&&(a=s+","+o,i++,r.pop())}r.push(tp(a))}return r.join("")},"parseGenericTypes"),Ca=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Jf=p((e,t)=>{const r=Ca(e,"~"),i=Ca(t,"~");return r===1&&i===1},"shouldCombineSets"),tp=p(e=>{const t=Ca(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ln=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ka=/\$\$(.*)\$\$/g,wr=p(e=>(e.match(ka)?.length??0)>0,"hasKatex"),Ik=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Do(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 a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),ep=p(async(e,t)=>{if(!wr(e))return e;if(!(ln()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ka,"MathML is unsupported in this environment.");{const{default:r}=await st(async()=>{const{default:a}=await import("./index-bSvs-Qh3.js").then(s=>s.dh);return{default:a}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!ln()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Dr).map(a=>wr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(ka,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Do=p(async(e,t)=>jt(await ep(e,t),t),"renderKatexSanitized"),Or={getRows:jf,sanitizeText:jt,sanitizeTextOrArray:Gf,hasBreaks:Vf,splitBreaks:Uf,lineBreakRegex:Dr,removeScript:Fo,getUrl:Zf,evaluate:xe,getMax:Kf,getMin:Qf},rp=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),ip=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Oo=p(function(e,t,r,i){const a=ip(t,r,i);rp(e,a)},"configureSvgSize"),ap=p(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;A.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;A.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,A.info(`Calculated bounds: ${n}x${l}`),Oo(t,l,n,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Jr={},sp=p((e,t,r)=>{let i="";return e in Jr&&Jr[e]?i=Jr[e](r):A.warn(`No theme found for ${e}`),` & {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DKwABhnu.js","assets/index-DTxAHLat.css","assets/dagre-KLK3FWXG-CN4ule0l.js","assets/graph-KGuLNbW2.js","assets/_baseUniq-D9AKNI-S.js","assets/layout-BZKpv2Gr.js","assets/_basePickBy-BcOvpC5b.js","assets/clone-oMsF326O.js","assets/transform-BwXaE9hv.js","assets/cose-bilkent-S5V4N54A-DRWnwV5H.js","assets/cytoscape.esm-DtBltrT8.js","assets/c4Diagram-IC4MRINW-AFG5p1yt.js","assets/chunk-JSJVCQXG-Bt0GkrjS.js","assets/flowDiagram-PKNHOUZH-CsQeJUub.js","assets/chunk-FMBD7UC4-BRuwu34q.js","assets/chunk-55IACEB6-Bsz0SHtO.js","assets/chunk-KX2RTZJC-BiUvn-D7.js","assets/channel-BXqEQVGi.js","assets/erDiagram-INFDFZHY-kDj6gvOH.js","assets/gitGraphDiagram-K3NZZRJ6-D4eeLV-l.js","assets/chunk-4BX2VUAB-CgNy2Qqu.js","assets/chunk-QZHKN3VN-CrLB363X.js","assets/treemap-KZPCXAKY-Bin819KW.js","assets/ganttDiagram-A5KZAMGK-D1W7NciY.js","assets/linear-COY9pyF4.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-LFFYTUFH-DsQ9EVx0.js","assets/pieDiagram-SKSYHLDU-2ekrtn6z.js","assets/arc-ClcBVsDq.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-337W2JSQ-BoTofVsV.js","assets/xychartDiagram-JWTSCODW-Be2x0vdX.js","assets/requirementDiagram-Z7DCOOCP-LSodooxy.js","assets/sequenceDiagram-2WXFIKYE-C01qZdHR.js","assets/classDiagram-VBA2DB6C-gcpKg8SN.js","assets/chunk-WL4C6EOR-913dgDB-.js","assets/classDiagram-v2-RAHNMMFH-gcpKg8SN.js","assets/stateDiagram-RAJIS63D-BuPj1Py4.js","assets/chunk-NQ4KR5QH-DH4YUQE9.js","assets/stateDiagram-v2-FVOUBMTO-CjYACBI3.js","assets/journeyDiagram-4ABVD52K-BkKgSN_9.js","assets/timeline-definition-YZTLITO2-CPcDqVYw.js","assets/mindmap-definition-YRQLILUH-CVv44i-B.js","assets/kanban-definition-K7BYSVSG-DIJz6AsI.js","assets/sankeyDiagram-WA2Y5GQK-DUXSSMar.js","assets/diagram-P4PSJMXO-Bf1-kRnd.js","assets/diagram-IFDJBPK2-ChVpZldk.js","assets/blockDiagram-WCTKOSBZ-CL-sI8NU.js","assets/architectureDiagram-2XIMDMQ5-CRV28Qi0.js","assets/ishikawaDiagram-PHBUUO56-MzetUfFK.js","assets/vennDiagram-LZ73GAT5-BDAdfrV5.js","assets/diagram-E7M64L7V-docJyJu4.js"])))=>i.map(i=>d[i]);
2
+ import{bG as df,a9 as Ye,_ as st}from"./index-DKwABhnu.js";import{s as rt}from"./transform-BwXaE9hv.js";var Kr={exports:{}},ff=Kr.exports,an;function pf(){return an||(an=1,(function(e,t){(function(r,i){e.exports=i()})(ff,(function(){var r=1e3,i=6e4,a=36e5,s="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var B=["th","st","nd","rd"],w=L%100;return"["+L+(B[(w-20)%10]||B[w]||B[0])+"]"}},k=function(L,B,w){var M=String(L);return!M||M.length>=B?L:""+Array(B+1-M.length).join(w)+L},v={s:k,z:function(L){var B=-L.utcOffset(),w=Math.abs(B),M=Math.floor(w/60),$=w%60;return(B<=0?"+":"-")+k(M,2,"0")+":"+k($,2,"0")},m:function L(B,w){if(B.date()<w.date())return-L(w,B);var M=12*(w.year()-B.year())+(w.month()-B.month()),$=B.clone().add(M,u),z=w-$<0,G=B.clone().add(M+(z?-1:1),u);return+(-(M+(w-$)/(z?$-G:G-$))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:u,y:d,w:h,d:c,D:g,h:l,m:n,s:o,ms:s,Q:f}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},_="en",S={};S[_]=b;var T="$isDayjsObject",F=function(L){return L instanceof I||!(!L||!L[T])},P=function L(B,w,M){var $;if(!B)return _;if(typeof B=="string"){var z=B.toLowerCase();S[z]&&($=z),w&&(S[z]=w,$=z);var G=B.split("-");if(!$&&G.length>1)return L(G[0])}else{var et=B.name;S[et]=B,$=et}return!M&&$&&(_=$),$||!M&&_},D=function(L,B){if(F(L))return L.clone();var w=typeof B=="object"?B:{};return w.date=L,w.args=arguments,new I(w)},E=v;E.l=P,E.i=F,E.w=function(L,B){return D(L,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var I=(function(){function L(w){this.$L=P(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[T]=!0}var B=L.prototype;return B.parse=function(w){this.$d=(function(M){var $=M.date,z=M.utc;if($===null)return new Date(NaN);if(E.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var G=$.match(y);if(G){var et=G[2]-1||0,Z=(G[7]||"0").substring(0,3);return z?new Date(Date.UTC(G[1],et,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Z)):new Date(G[1],et,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Z)}}return new Date($)})(w),this.init()},B.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},B.$utils=function(){return E},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(w,M){var $=D(w);return this.startOf(M)<=$&&$<=this.endOf(M)},B.isAfter=function(w,M){return D(w)<this.startOf(M)},B.isBefore=function(w,M){return this.endOf(M)<D(w)},B.$g=function(w,M,$){return E.u(w)?this[M]:this.set($,w)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(w,M){var $=this,z=!!E.u(M)||M,G=E.p(w),et=function(le,yt){var ce=E.w($.$u?Date.UTC($.$y,yt,le):new Date($.$y,yt,le),$);return z?ce:ce.endOf(c)},Z=function(le,yt){return E.w($.toDate()[le].apply($.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(yt)),$)},tt=this.$W,it=this.$M,ct=this.$D,At="set"+(this.$u?"UTC":"");switch(G){case d:return z?et(1,0):et(31,11);case u:return z?et(1,it):et(0,it+1);case h:var Ct=this.$locale().weekStart||0,oe=(tt<Ct?tt+7:tt)-Ct;return et(z?ct-oe:ct+(6-oe),it);case c:case g:return Z(At+"Hours",0);case l:return Z(At+"Minutes",1);case n:return Z(At+"Seconds",2);case o:return Z(At+"Milliseconds",3);default:return this.clone()}},B.endOf=function(w){return this.startOf(w,!1)},B.$set=function(w,M){var $,z=E.p(w),G="set"+(this.$u?"UTC":""),et=($={},$[c]=G+"Date",$[g]=G+"Date",$[u]=G+"Month",$[d]=G+"FullYear",$[l]=G+"Hours",$[n]=G+"Minutes",$[o]=G+"Seconds",$[s]=G+"Milliseconds",$)[z],Z=z===c?this.$D+(M-this.$W):M;if(z===u||z===d){var tt=this.clone().set(g,1);tt.$d[et](Z),tt.init(),this.$d=tt.set(g,Math.min(this.$D,tt.daysInMonth())).$d}else et&&this.$d[et](Z);return this.init(),this},B.set=function(w,M){return this.clone().$set(w,M)},B.get=function(w){return this[E.p(w)]()},B.add=function(w,M){var $,z=this;w=Number(w);var G=E.p(M),et=function(it){var ct=D(z);return E.w(ct.date(ct.date()+Math.round(it*w)),z)};if(G===u)return this.set(u,this.$M+w);if(G===d)return this.set(d,this.$y+w);if(G===c)return et(1);if(G===h)return et(7);var Z=($={},$[n]=i,$[l]=a,$[o]=r,$)[G]||1,tt=this.$d.getTime()+w*Z;return E.w(tt,this)},B.subtract=function(w,M){return this.add(-1*w,M)},B.format=function(w){var M=this,$=this.$locale();if(!this.isValid())return $.invalidDate||m;var z=w||"YYYY-MM-DDTHH:mm:ssZ",G=E.z(this),et=this.$H,Z=this.$m,tt=this.$M,it=$.weekdays,ct=$.months,At=$.meridiem,Ct=function(yt,ce,ir,Hr){return yt&&(yt[ce]||yt(M,z))||ir[ce].slice(0,Hr)},oe=function(yt){return E.s(et%12||12,yt,"0")},le=At||function(yt,ce,ir){var Hr=yt<12?"AM":"PM";return ir?Hr.toLowerCase():Hr};return z.replace(x,(function(yt,ce){return ce||(function(ir){switch(ir){case"YY":return String(M.$y).slice(-2);case"YYYY":return E.s(M.$y,4,"0");case"M":return tt+1;case"MM":return E.s(tt+1,2,"0");case"MMM":return Ct($.monthsShort,tt,ct,3);case"MMMM":return Ct(ct,tt);case"D":return M.$D;case"DD":return E.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return Ct($.weekdaysMin,M.$W,it,2);case"ddd":return Ct($.weekdaysShort,M.$W,it,3);case"dddd":return it[M.$W];case"H":return String(et);case"HH":return E.s(et,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return le(et,Z,!0);case"A":return le(et,Z,!1);case"m":return String(Z);case"mm":return E.s(Z,2,"0");case"s":return String(M.$s);case"ss":return E.s(M.$s,2,"0");case"SSS":return E.s(M.$ms,3,"0");case"Z":return G}return null})(yt)||G.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(w,M,$){var z,G=this,et=E.p(M),Z=D(w),tt=(Z.utcOffset()-this.utcOffset())*i,it=this-Z,ct=function(){return E.m(G,Z)};switch(et){case d:z=ct()/12;break;case u:z=ct();break;case f:z=ct()/3;break;case h:z=(it-tt)/6048e5;break;case c:z=(it-tt)/864e5;break;case l:z=it/a;break;case n:z=it/i;break;case o:z=it/r;break;default:z=it}return $?z:E.a(z)},B.daysInMonth=function(){return this.endOf(u).$D},B.$locale=function(){return S[this.$L]},B.locale=function(w,M){if(!w)return this.$L;var $=this.clone(),z=P(w,M,!0);return z&&($.$L=z),$},B.clone=function(){return E.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},L})(),O=I.prototype;return D.prototype=O,[["$ms",s],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",g]].forEach((function(L){O[L[1]]=function(B){return this.$g(B,L[0],L[1])}})),D.extend=function(L,B){return L.$i||(L(B,I,D),L.$i=!0),D},D.locale=P,D.isDayjs=F,D.unix=function(L){return D(1e3*L)},D.en=S[_],D.Ls=S,D.p={},D}))})(Kr)),Kr.exports}var gf=pf();const mf=df(gf);var yo=Object.defineProperty,p=(e,t)=>yo(e,"name",{value:t,configurable:!0}),yf=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},Kt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},A={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ls=p(function(e="fatal"){let t=Kt.fatal;typeof e=="string"?e.toLowerCase()in Kt&&(t=Kt[e]):typeof e=="number"&&(t=e),A.trace=()=>{},A.debug=()=>{},A.info=()=>{},A.warn=()=>{},A.error=()=>{},A.fatal=()=>{},t<=Kt.fatal&&(A.fatal=console.error?console.error.bind(console,Pt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Pt("FATAL"))),t<=Kt.error&&(A.error=console.error?console.error.bind(console,Pt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Pt("ERROR"))),t<=Kt.warn&&(A.warn=console.warn?console.warn.bind(console,Pt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Pt("WARN"))),t<=Kt.info&&(A.info=console.info?console.info.bind(console,Pt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Pt("INFO"))),t<=Kt.debug&&(A.debug=console.debug?console.debug.bind(console,Pt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pt("DEBUG"))),t<=Kt.trace&&(A.trace=console.debug?console.debug.bind(console,Pt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pt("TRACE")))},"setLogLevel"),Pt=p(e=>`%c${mf().format("ss.SSS")} : ${e} : `,"format");const Qr={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;switch(i){case"r":return Qr.hue2rgb(s,a,e+1/3)*255;case"g":return Qr.hue2rgb(s,a,e)*255;case"b":return Qr.hue2rgb(s,a,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const a=Math.max(e,t,r),s=Math.min(e,t,r),o=(a+s)/2;if(i==="l")return o*100;if(a===s)return 0;const n=a-s,l=o>.5?n/(2-a-s):n/(a+s);if(i==="s")return l*100;switch(a){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}}},xf={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},bf={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},J={channel:Qr,lang:xf,unit:bf},he={};for(let e=0;e<=255;e++)he[e]=J.unit.dec2hex(e);const kt={ALL:0,RGB:1,HSL:2};class Cf{constructor(){this.type=kt.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=kt.ALL}is(t){return this.type===t}}class kf{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Cf}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=kt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:a}=t;r===void 0&&(t.h=J.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=J.channel.rgb2hsl(t,"s")),a===void 0&&(t.l=J.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:a}=t;r===void 0&&(t.r=J.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=J.channel.hsl2rgb(t,"g")),a===void 0&&(t.b=J.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(kt.HSL)&&r!==void 0?r:(this._ensureHSL(),J.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(kt.HSL)&&r!==void 0?r:(this._ensureHSL(),J.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(kt.HSL)&&r!==void 0?r:(this._ensureHSL(),J.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(kt.RGB)&&r!==void 0?r:(this._ensureRGB(),J.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(kt.RGB)&&r!==void 0?r:(this._ensureRGB(),J.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(kt.RGB)&&r!==void 0?r:(this._ensureRGB(),J.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(kt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(kt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(kt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(kt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(kt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(kt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Pi=new kf({r:0,g:0,b:0,a:0},"transparent"),He={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(He.re);if(!t)return;const r=t[1],i=parseInt(r,16),a=r.length,s=a%4===0,o=a>4,n=o?1:17,l=o?8:4,c=s?0:-1,h=o?255:15;return Pi.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`#${he[Math.round(t)]}${he[Math.round(r)]}${he[Math.round(i)]}${he[Math.round(a*255)]}`:`#${he[Math.round(t)]}${he[Math.round(r)]}${he[Math.round(i)]}`}},Se={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(Se.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return J.channel.clamp.h(parseFloat(r)*.9);case"rad":return J.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return J.channel.clamp.h(parseFloat(r)*360)}}return J.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Se.re);if(!r)return;const[,i,a,s,o,n]=r;return Pi.set({h:Se._hue2deg(i),s:J.channel.clamp.s(parseFloat(a)),l:J.channel.clamp.l(parseFloat(s)),a:o?J.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a}=e;return a<1?`hsla(${J.lang.round(t)}, ${J.lang.round(r)}%, ${J.lang.round(i)}%, ${a})`:`hsl(${J.lang.round(t)}, ${J.lang.round(r)}%, ${J.lang.round(i)}%)`}},mr={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=mr.colors[e];if(t)return He.parse(t)},stringify:e=>{const t=He.stringify(e);for(const r in mr.colors)if(mr.colors[r]===t)return r}},ur={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(ur.re);if(!r)return;const[,i,a,s,o,n,l,c,h]=r;return Pi.set({r:J.channel.clamp.r(a?parseFloat(i)*2.55:parseFloat(i)),g:J.channel.clamp.g(o?parseFloat(s)*2.55:parseFloat(s)),b:J.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?J.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a}=e;return a<1?`rgba(${J.lang.round(t)}, ${J.lang.round(r)}, ${J.lang.round(i)}, ${J.lang.round(a)})`:`rgb(${J.lang.round(t)}, ${J.lang.round(r)}, ${J.lang.round(i)})`}},Ut={format:{keyword:mr,hex:He,rgb:ur,rgba:ur,hsl:Se,hsla:Se},parse:e=>{if(typeof e!="string")return e;const t=He.parse(e)||ur.parse(e)||Se.parse(e)||mr.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(kt.HSL)||e.data.r===void 0?Se.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ur.stringify(e):He.stringify(e)},xo=(e,t)=>{const r=Ut.parse(e);for(const i in t)r[i]=J.channel.clamp[i](t[i]);return Ut.stringify(r)},yr=(e,t,r=0,i=1)=>{if(typeof e!="number")return xo(e,{a:t});const a=Pi.set({r:J.channel.clamp.r(e),g:J.channel.clamp.g(t),b:J.channel.clamp.b(r),a:J.channel.clamp.a(i)});return Ut.stringify(a)},_f=e=>{const{r:t,g:r,b:i}=Ut.parse(e),a=.2126*J.channel.toLinear(t)+.7152*J.channel.toLinear(r)+.0722*J.channel.toLinear(i);return J.lang.round(a)},wf=e=>_f(e)>=.5,Er=e=>!wf(e),bo=(e,t,r)=>{const i=Ut.parse(e),a=i[t],s=J.channel.clamp[t](a+r);return a!==s&&(i[t]=s),Ut.stringify(i)},W=(e,t)=>bo(e,"l",t),U=(e,t)=>bo(e,"l",-t),C=(e,t)=>{const r=Ut.parse(e),i={};for(const a in t)t[a]&&(i[a]=r[a]+t[a]);return xo(e,i)},vf=(e,t,r=50)=>{const{r:i,g:a,b:s,a:o}=Ut.parse(e),{r:n,g:l,b:c,a:h}=Ut.parse(t),u=r/100,f=u*2-1,d=o-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+n*y,b=a*m+l*y,k=s*m+c*y,v=o*u+h*(1-u);return yr(x,b,k,v)},R=(e,t=100)=>{const r=Ut.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vf(r,e,t)};var Co=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,xr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Sf=/\s*%%.*\n/gm,ko=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Le={},cs=p(function(e,t){e=e.replace(Co,"").replace(xr,"").replace(Sf,`
3
+ `);for(const[r,{detector:i}]of Object.entries(Le))if(i(e,t))return r;throw new ko(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xa=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)_o(t,r,i)},"registerLazyLoadedDiagrams"),_o=p((e,t,r)=>{Le[e]&&A.warn(`Detector with key ${e} already exists. Overwriting.`),Le[e]={detector:t,loader:r},A.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Tf=p(e=>Le[e].loader,"getDiagramLoader"),ba=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const a={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>ba(e,s,a)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=ba(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),gt=ba,Ii="#ffffff",Ri="#f2f2f2",Lt=p((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),Bf=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||R(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||R(this.tertiaryColor),this.lineColor=this.lineColor||R(this.background),this.arrowheadColor=this.arrowheadColor||R(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?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||R(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||W(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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=U(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||R(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||W(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||U(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]||C(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(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||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(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||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(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??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(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||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Lf=p(e=>{const t=new Bf;return t.calculate(e),t},"getThemeVariables"),$f=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=R(this.background),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(R("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=yr(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.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.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=yr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=yr(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||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=W(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=W(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=W(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=R(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||R(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||C(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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)]??W(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||C(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||C(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||C(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||C(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||C(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(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]=e[r]})}},Mf=p(e=>{const t=new $f;return t.calculate(e),t},"getThemeVariables"),Af=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",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.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.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=yr(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.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.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=U(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||C(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||C(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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||R(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||R(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.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||C(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||C(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||C(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??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(R(this.git0),25),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Ff=p(e=>{const t=new Af;return t.calculate(e),t},"getThemeVariables"),Ef=class{static{p(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=W("#cde498",10),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.primaryColor),this.lineColor=R(this.background),this.textColor=R(this.background),this.THEME_COLOR_LIMIT=12,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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=U(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||U(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||C(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]||C(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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.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||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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||C(this.primaryColor,{l:-30}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||C(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??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(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.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||R(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||R(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Df=p(e=>{const t=new Ef;return t.calculate(e),t},"getThemeVariables"),Of=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=R(this.primaryColor),this.secondaryTextColor=R(this.secondaryColor),this.tertiaryTextColor=R(this.tertiaryColor),this.lineColor=R(this.background),this.textColor=R(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.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.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||R(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||W(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||U(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]||C(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||C(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.sectionBkgColor=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=U(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=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(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=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Er(this.quadrant1Fill)?W(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#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.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=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||C(this.primaryColor,{h:-30}),this.git4=this.pie5||C(this.primaryColor,{h:-60}),this.git5=this.pie6||C(this.primaryColor,{h:-90}),this.git6=this.pie7||C(this.primaryColor,{h:60}),this.git7=this.pie8||C(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||R(this.git0),this.gitInv1=this.gitInv1||R(this.git1),this.gitInv2=this.gitInv2||R(this.git2),this.gitInv3=this.gitInv3||R(this.git3),this.gitInv4=this.gitInv4||R(this.git4),this.gitInv5=this.gitInv5||R(this.git5),this.gitInv6=this.gitInv6||R(this.git6),this.gitInv7=this.gitInv7||R(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ii,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ri}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]=e[r]})}},Pf=p(e=>{const t=new Of;return t.calculate(e),t},"getThemeVariables"),te={base:{getThemeVariables:Lf},dark:{getThemeVariables:Mf},default:{getThemeVariables:Ff},forest:{getThemeVariables:Df},neutral:{getThemeVariables:Pf}},It={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},wo={...It,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:te.default.getThemeVariables(),sequence:{...It.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...It.gantt,tickInterval:void 0,useWidth:void 0},c4:{...It.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...It.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...It.pie,useWidth:984},xyChart:{...It.xyChart,useWidth:void 0},requirement:{...It.requirement,useWidth:void 0},packet:{...It.packet},radar:{...It.radar},ishikawa:{...It.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...It.venn}},vo=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...vo(e[i],"")]:[...r,t+i],[]),"keyify"),If=new Set(vo(wo,"")),So=wo,oi=p(e=>{if(A.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>oi(t));return}for(const t of Object.keys(e)){if(A.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!If.has(t)||e[t]==null){A.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){A.debug("sanitizing object",t),oi(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(A.debug("sanitizing css option",t),e[t]=Rf(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]="")}A.debug("After sanitization",e)}},"sanitizeDirective"),Rf=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Ge=Object.freeze(So),xe=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Et=gt({},Ge),li,$e=[],br=gt({},Ge),Ni=p((e,t)=>{let r=gt({},e),i={};for(const a of t)Lo(a),i=gt(i,a);if(r=gt(r,i),i.theme&&i.theme in te){const a=gt({},li),s=gt(a.themeVariables||{},i.themeVariables);r.theme&&r.theme in te&&(r.themeVariables=te[r.theme].getThemeVariables(s))}return br=r,Mo(br),br},"updateCurrentConfig"),Nf=p(e=>(Et=gt({},Ge),Et=gt(Et,e),e.theme&&te[e.theme]&&(Et.themeVariables=te[e.theme].getThemeVariables(e.themeVariables)),Ni(Et,$e),Et),"setSiteConfig"),zf=p(e=>{li=gt({},e)},"saveConfigFromInitialize"),Wf=p(e=>(Et=gt(Et,e),Ni(Et,$e),Et),"updateSiteConfig"),To=p(()=>gt({},Et),"getSiteConfig"),Bo=p(e=>(Mo(e),gt(br,e),wt()),"setConfig"),wt=p(()=>gt({},br),"getConfig"),Lo=p(e=>{e&&(["secure",...Et.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(A.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"&&Lo(e[t])}))},"sanitize"),qf=p(e=>{oi(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),$e.push(e),Ni(Et,$e)},"addDirective"),ci=p((e=Et)=>{$e=[],Ni(e,$e)},"reset"),Hf={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."},sn={},$o=p(e=>{sn[e]||(A.warn(Hf[e]),sn[e]=!0)},"issueWarning"),Mo=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&$o("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ok=p(()=>{let e={};li&&(e=gt(e,li));for(const t of $e)e=gt(e,t);return e},"getUserDefinedConfig"),Tt=p(e=>(e.flowchart?.htmlLabels!=null&&$o("FLOWCHART_HTML_LABELS_DEPRECATED"),xe(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Dr=/<br\s*\/?>/gi,jf=p(e=>e?Eo(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Yf=(()=>{let e=!1;return()=>{e||(Ao(),e=!0)}})();function Ao(){const e="data-temp-href-target";Ye.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ye.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Ao,"setupDompurifyHooks");var Fo=p(e=>(Yf(),Ye.sanitize(e)),"removeScript"),nn=p((e,t)=>{if(Tt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Fo(e):r!=="loose"&&(e=Eo(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Xf(e))}return e},"sanitizeMore"),jt=p((e,t)=>e&&(t.dompurifyConfig?e=Ye.sanitize(nn(e,t),t.dompurifyConfig).toString():e=Ye.sanitize(nn(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Gf=p((e,t)=>typeof e=="string"?jt(e,t):e.flat().map(r=>jt(r,t)),"sanitizeTextOrArray"),Vf=p(e=>Dr.test(e),"hasBreaks"),Uf=p(e=>e.split(Dr),"splitBreaks"),Xf=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Eo=p(e=>e.replace(Dr,"#br#"),"breakToPlaceholder"),Zf=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Kf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Qf=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),on=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let a=t[i];if(a===","&&i>0&&i+1<t.length){const s=t[i-1],o=t[i+1];Jf(s,o)&&(a=s+","+o,i++,r.pop())}r.push(tp(a))}return r.join("")},"parseGenericTypes"),Ca=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Jf=p((e,t)=>{const r=Ca(e,"~"),i=Ca(t,"~");return r===1&&i===1},"shouldCombineSets"),tp=p(e=>{const t=Ca(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let a=i.indexOf("~"),s=i.lastIndexOf("~");for(;a!==-1&&s!==-1&&a!==s;)i[a]="<",i[s]=">",a=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ln=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ka=/\$\$(.*)\$\$/g,wr=p(e=>(e.match(ka)?.length??0)>0,"hasKatex"),Pk=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Do(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 a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a},"calculateMathMLDimensions"),ep=p(async(e,t)=>{if(!wr(e))return e;if(!(ln()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ka,"MathML is unsupported in this environment.");{const{default:r}=await st(async()=>{const{default:a}=await import("./index-DKwABhnu.js").then(s=>s.dl);return{default:a}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!ln()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Dr).map(a=>wr(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(ka,(a,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Do=p(async(e,t)=>jt(await ep(e,t),t),"renderKatexSanitized"),Or={getRows:jf,sanitizeText:jt,sanitizeTextOrArray:Gf,hasBreaks:Vf,splitBreaks:Uf,lineBreakRegex:Dr,removeScript:Fo,getUrl:Zf,evaluate:xe,getMax:Kf,getMin:Qf},rp=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),ip=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Oo=p(function(e,t,r,i){const a=ip(t,r,i);rp(e,a)},"configureSvgSize"),ap=p(function(e,t,r,i){const a=t.node().getBBox(),s=a.width,o=a.height;A.info(`SVG bounds: ${s}x${o}`,a);let n=0,l=0;A.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=o+r*2,A.info(`Calculated bounds: ${n}x${l}`),Oo(t,l,n,i);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Jr={},sp=p((e,t,r)=>{let i="";return e in Jr&&Jr[e]?i=Jr[e](r):A.warn(`No theme found for ${e}`),` & {
4
4
  font-family: ${r.fontFamily};
5
5
  font-size: ${r.fontSize};
6
6
  fill: ${r.textColor}
@@ -77,7 +77,7 @@ import{bF as df,_ as st}from"./index-bSvs-Qh3.js";import{p as Ye}from"./purify.e
77
77
 
78
78
  ${t}
79
79
  `},"getStyles"),np=p((e,t)=>{t!==void 0&&(Jr[e]=t)},"addStylesForDiagram"),op=sp,Po={};yf(Po,{clear:()=>lp,getAccDescription:()=>dp,getAccTitle:()=>hp,getDiagramTitle:()=>pp,setAccDescription:()=>up,setAccTitle:()=>cp,setDiagramTitle:()=>fp});var hs="",us="",ds="",fs=p(e=>jt(e,wt()),"sanitizeText"),lp=p(()=>{hs="",ds="",us=""},"clear"),cp=p(e=>{hs=fs(e).replace(/^\s+/g,"")},"setAccTitle"),hp=p(()=>hs,"getAccTitle"),up=p(e=>{ds=fs(e).replace(/\n\s+/g,`
80
- `)},"setAccDescription"),dp=p(()=>ds,"getAccDescription"),fp=p(e=>{us=fs(e)},"setDiagramTitle"),pp=p(()=>us,"getDiagramTitle"),cn=A,gp=ls,ot=wt,Rk=Bo,Nk=Ge,ps=p(e=>jt(e,ot()),"sanitizeText"),mp=ap,yp=p(()=>Po,"getCommonDb"),hi={},ui=p((e,t,r)=>{hi[e]&&cn.warn(`Diagram with id ${e} already registered. Overwriting.`),hi[e]=t,r&&_o(e,r),np(e,t.styles),t.injectUtils?.(cn,gp,ot,ps,mp,yp(),()=>{})},"registerDiagram"),_a=p(e=>{if(e in hi)return hi[e];throw new xp(e)},"getDiagram"),xp=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};const wa=Math.PI,va=2*wa,_e=1e-6,bp=va-_e;function Io(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Cp(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Io;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class kp{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Io:Cp(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,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-t,c=a-r,h=o-t,u=n-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>_e)if(!(Math.abs(u*l-c*h)>_e)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=a-n,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),k=s*Math.tan((wa-Math.acos((m+f-y)/(2*x*b)))/2),v=k/b,_=k/x;Math.abs(v-1)>_e&&this._append`L${t+v*h},${r+v*u}`,this._append`A${s},${s},0,0,${+(u*d>h*g)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),l=i*Math.sin(a),c=t+n,h=r+l,u=1^o,f=o?a-s:s-a;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>_e||Math.abs(this._y1-h)>_e)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%va+va),f>bp?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>_e&&this._append`A${i},${i},0,${+(f>=wa)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function Re(e){return function(){return e}}const zk=Math.abs,Wk=Math.atan2,qk=Math.cos,Hk=Math.max,jk=Math.min,Yk=Math.sin,Gk=Math.sqrt,hn=1e-12,gs=Math.PI,un=gs/2,Vk=2*gs;function Uk(e){return e>1?0:e<-1?gs:Math.acos(e)}function Xk(e){return e>=1?un:e<=-1?-un:Math.asin(e)}function _p(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 kp(t)}function wp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ro(e){this._context=e}Ro.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 Cr(e){return new Ro(e)}function vp(e){return e[0]}function Sp(e){return e[1]}function Tp(e,t){var r=Re(!0),i=null,a=Cr,s=null,o=_p(n);e=typeof e=="function"?e:e===void 0?vp:Re(e),t=typeof t=="function"?t:t===void 0?Sp:Re(t);function n(l){var c,h=(l=wp(l)).length,u,f=!1,d;for(i==null&&(s=a(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,c,l),+t(u,c,l));if(d)return s=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Re(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Re(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Re(!!l),n):r},n.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),n):a},n.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),n):i},n}class No{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 zo(e){return new No(e,!0)}function Wo(e){return new No(e,!1)}function pe(){}function di(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 zi(e){this._context=e}zi.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:di(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:di(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sa(e){return new zi(e)}function qo(e){this._context=e}qo.prototype={areaStart:pe,areaEnd:pe,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:di(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bp(e){return new qo(e)}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(){(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:di(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lp(e){return new Ho(e)}function jo(e,t){this._basis=new zi(e),this._beta=t}jo.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const $p=(function e(t){function r(i){return t===1?new zi(i):new jo(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function fi(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 ms(e,t){this._context=e,this._k=(1-t)/6}ms.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:fi(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:fi(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 Yo=(function e(t){function r(i){return new ms(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ys(e,t){this._context=e,this._k=(1-t)/6}ys.prototype={areaStart:pe,areaEnd:pe,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:fi(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 Mp=(function e(t){function r(i){return new ys(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xs(e,t){this._context=e,this._k=(1-t)/6}xs.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:fi(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 Ap=(function e(t){function r(i){return new xs(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bs(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>hn){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>hn){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function Go(e,t){this._context=e,this._alpha=t}Go.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:bs(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 Vo=(function e(t){function r(i){return t?new Go(i,t):new ms(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Uo(e,t){this._context=e,this._alpha=t}Uo.prototype={areaStart:pe,areaEnd:pe,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:bs(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 Fp=(function e(t){function r(i){return t?new Uo(i,t):new ys(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Xo(e,t){this._context=e,this._alpha=t}Xo.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:bs(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 Ep=(function e(t){function r(i){return t?new Xo(i,t):new xs(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Zo(e){this._context=e}Zo.prototype={areaStart:pe,areaEnd:pe,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 Dp(e){return new Zo(e)}function dn(e){return e<0?-1:1}function fn(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(dn(s)+dn(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function pn(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function sa(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function pi(e){this._context=e}pi.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:sa(this,this._t0,pn(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,sa(this,pn(this,r=fn(this,e,t)),r);break;default:sa(this,this._t0,r=fn(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ko(e){this._context=new Qo(e)}(Ko.prototype=Object.create(pi.prototype)).point=function(e,t){pi.prototype.point.call(this,t,e)};function Qo(e){this._context=e}Qo.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,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function Jo(e){return new pi(e)}function tl(e){return new Ko(e)}function el(e){this._context=e}el.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=gn(e),a=gn(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function gn(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function rl(e){return new el(e)}function Wi(e,t){this._context=e,this._t=t}Wi.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 il(e){return new Wi(e,.5)}function al(e){return new Wi(e,0)}function sl(e){return new Wi(e,1)}var Op=p(e=>{const{securityLevel:t}=ot();let r=rt("body");if(t==="sandbox"){const s=rt(`#i${e}`).node()?.contentDocument??document;r=rt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function Cs(e){return typeof e>"u"||e===null}p(Cs,"isNothing");function nl(e){return typeof e=="object"&&e!==null}p(nl,"isObject");function ol(e){return Array.isArray(e)?e:Cs(e)?[]:[e]}p(ol,"toArray");function ll(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}p(ll,"extend");function cl(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(cl,"repeat");function hl(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(hl,"isNegativeZero");var Pp=Cs,Ip=nl,Rp=ol,Np=cl,zp=hl,Wp=ll,mt={isNothing:Pp,isObject:Ip,toArray:Rp,repeat:Np,isNegativeZero:zp,extend:Wp};function ks(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
80
+ `)},"setAccDescription"),dp=p(()=>ds,"getAccDescription"),fp=p(e=>{us=fs(e)},"setDiagramTitle"),pp=p(()=>us,"getDiagramTitle"),cn=A,gp=ls,ot=wt,Ik=Bo,Rk=Ge,ps=p(e=>jt(e,ot()),"sanitizeText"),mp=ap,yp=p(()=>Po,"getCommonDb"),hi={},ui=p((e,t,r)=>{hi[e]&&cn.warn(`Diagram with id ${e} already registered. Overwriting.`),hi[e]=t,r&&_o(e,r),np(e,t.styles),t.injectUtils?.(cn,gp,ot,ps,mp,yp(),()=>{})},"registerDiagram"),_a=p(e=>{if(e in hi)return hi[e];throw new xp(e)},"getDiagram"),xp=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};const wa=Math.PI,va=2*wa,_e=1e-6,bp=va-_e;function Io(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Cp(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Io;const r=10**t;return function(i){this._+=i[0];for(let a=1,s=i.length;a<s;++a)this._+=Math.round(arguments[a]*r)/r+i[a]}}class kp{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Io:Cp(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,a){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,r,i,a,s,o){this._append`C${+t},${+r},${+i},${+a},${this._x1=+s},${this._y1=+o}`}arcTo(t,r,i,a,s){if(t=+t,r=+r,i=+i,a=+a,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,n=this._y1,l=i-t,c=a-r,h=o-t,u=n-r,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>_e)if(!(Math.abs(u*l-c*h)>_e)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-o,g=a-n,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),k=s*Math.tan((wa-Math.acos((m+f-y)/(2*x*b)))/2),v=k/b,_=k/x;Math.abs(v-1)>_e&&this._append`L${t+v*h},${r+v*u}`,this._append`A${s},${s},0,0,${+(u*d>h*g)},${this._x1=t+_*l},${this._y1=r+_*c}`}}arc(t,r,i,a,s,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(a),l=i*Math.sin(a),c=t+n,h=r+l,u=1^o,f=o?a-s:s-a;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>_e||Math.abs(this._y1-h)>_e)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%va+va),f>bp?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>_e&&this._append`A${i},${i},0,${+(f>=wa)},${u},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}function Re(e){return function(){return e}}const Nk=Math.abs,zk=Math.atan2,Wk=Math.cos,qk=Math.max,Hk=Math.min,jk=Math.sin,Yk=Math.sqrt,hn=1e-12,gs=Math.PI,un=gs/2,Gk=2*gs;function Vk(e){return e>1?0:e<-1?gs:Math.acos(e)}function Uk(e){return e>=1?un:e<=-1?-un:Math.asin(e)}function _p(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 kp(t)}function wp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ro(e){this._context=e}Ro.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 Cr(e){return new Ro(e)}function vp(e){return e[0]}function Sp(e){return e[1]}function Tp(e,t){var r=Re(!0),i=null,a=Cr,s=null,o=_p(n);e=typeof e=="function"?e:e===void 0?vp:Re(e),t=typeof t=="function"?t:t===void 0?Sp:Re(t);function n(l){var c,h=(l=wp(l)).length,u,f=!1,d;for(i==null&&(s=a(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,c,l),+t(u,c,l));if(d)return s=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Re(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Re(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Re(!!l),n):r},n.curve=function(l){return arguments.length?(a=l,i!=null&&(s=a(i)),n):a},n.context=function(l){return arguments.length?(l==null?i=s=null:s=a(i=l),n):i},n}class No{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 zo(e){return new No(e,!0)}function Wo(e){return new No(e,!1)}function pe(){}function di(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 zi(e){this._context=e}zi.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:di(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:di(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sa(e){return new zi(e)}function qo(e){this._context=e}qo.prototype={areaStart:pe,areaEnd:pe,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:di(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bp(e){return new qo(e)}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(){(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:di(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lp(e){return new Ho(e)}function jo(e,t){this._basis=new zi(e),this._beta=t}jo.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],a=t[0],s=e[r]-i,o=t[r]-a,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*s),this._beta*t[n]+(1-this._beta)*(a+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const $p=(function e(t){function r(i){return t===1?new zi(i):new jo(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function fi(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 ms(e,t){this._context=e,this._k=(1-t)/6}ms.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:fi(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:fi(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 Yo=(function e(t){function r(i){return new ms(i,t)}return r.tension=function(i){return e(+i)},r})(0);function ys(e,t){this._context=e,this._k=(1-t)/6}ys.prototype={areaStart:pe,areaEnd:pe,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:fi(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 Mp=(function e(t){function r(i){return new ys(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xs(e,t){this._context=e,this._k=(1-t)/6}xs.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:fi(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 Ap=(function e(t){function r(i){return new xs(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bs(e,t,r){var i=e._x1,a=e._y1,s=e._x2,o=e._y2;if(e._l01_a>hn){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>hn){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,a,s,o,e._x2,e._y2)}function Go(e,t){this._context=e,this._alpha=t}Go.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:bs(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 Vo=(function e(t){function r(i){return t?new Go(i,t):new ms(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Uo(e,t){this._context=e,this._alpha=t}Uo.prototype={areaStart:pe,areaEnd:pe,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:bs(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 Fp=(function e(t){function r(i){return t?new Uo(i,t):new ys(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Xo(e,t){this._context=e,this._alpha=t}Xo.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:bs(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 Ep=(function e(t){function r(i){return t?new Xo(i,t):new xs(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Zo(e){this._context=e}Zo.prototype={areaStart:pe,areaEnd:pe,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 Dp(e){return new Zo(e)}function dn(e){return e<0?-1:1}function fn(e,t,r){var i=e._x1-e._x0,a=t-e._x1,s=(e._y1-e._y0)/(i||a<0&&-0),o=(r-e._y1)/(a||i<0&&-0),n=(s*a+o*i)/(i+a);return(dn(s)+dn(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(n))||0}function pn(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function sa(e,t,r){var i=e._x0,a=e._y0,s=e._x1,o=e._y1,n=(s-i)/3;e._context.bezierCurveTo(i+n,a+n*t,s-n,o-n*r,s,o)}function pi(e){this._context=e}pi.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:sa(this,this._t0,pn(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,sa(this,pn(this,r=fn(this,e,t)),r);break;default:sa(this,this._t0,r=fn(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ko(e){this._context=new Qo(e)}(Ko.prototype=Object.create(pi.prototype)).point=function(e,t){pi.prototype.point.call(this,t,e)};function Qo(e){this._context=e}Qo.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,a,s){this._context.bezierCurveTo(t,e,i,r,s,a)}};function Jo(e){return new pi(e)}function tl(e){return new Ko(e)}function el(e){this._context=e}el.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=gn(e),a=gn(t),s=0,o=1;o<r;++s,++o)this._context.bezierCurveTo(i[0][s],a[0][s],i[1][s],a[1][s],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function gn(e){var t,r=e.length-1,i,a=new Array(r),s=new Array(r),o=new Array(r);for(a[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,s[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=a[t]/s[t-1],s[t]-=i,o[t]-=i*o[t-1];for(a[r-1]=o[r-1]/s[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/s[t];for(s[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-a[t+1];return[a,s]}function rl(e){return new el(e)}function Wi(e,t){this._context=e,this._t=t}Wi.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 il(e){return new Wi(e,.5)}function al(e){return new Wi(e,0)}function sl(e){return new Wi(e,1)}var Op=p(e=>{const{securityLevel:t}=ot();let r=rt("body");if(t==="sandbox"){const s=rt(`#i${e}`).node()?.contentDocument??document;r=rt(s.body)}return r.select(`#${e}`)},"selectSvgElement");function Cs(e){return typeof e>"u"||e===null}p(Cs,"isNothing");function nl(e){return typeof e=="object"&&e!==null}p(nl,"isObject");function ol(e){return Array.isArray(e)?e:Cs(e)?[]:[e]}p(ol,"toArray");function ll(e,t){var r,i,a,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)a=s[r],e[a]=t[a];return e}p(ll,"extend");function cl(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(cl,"repeat");function hl(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(hl,"isNegativeZero");var Pp=Cs,Ip=nl,Rp=ol,Np=cl,zp=hl,Wp=ll,mt={isNothing:Pp,isObject:Ip,toArray:Rp,repeat:Np,isNegativeZero:zp,extend:Wp};function ks(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
81
81
 
82
82
  `+e.mark.snippet),i+" "+r):i}p(ks,"formatError");function Ve(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ks(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Ve,"YAMLException$1");Ve.prototype=Object.create(Error.prototype);Ve.prototype.constructor=Ve;Ve.prototype.toString=p(function(t){return this.name+": "+ks(this,t)},"toString");var Dt=Ve;function ti(e,t,r,i,a){var s="",o="",n=Math.floor(a/2)-1;return i-t>n&&(s=" ... ",t=i-n+s.length),r-i>n&&(o=" ...",r=i+n-o.length),{str:s+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+s.length}}p(ti,"getLine");function ei(e,t){return mt.repeat(" ",t-e.length)+e}p(ei,"padStart");function ul(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],a=[],s,o=-1;s=r.exec(e.buffer);)a.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,a.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=ti(e.buffer,i[o-l],a[o-l],e.position-(i[o]-i[o-l]),u),n=mt.repeat(" ",t.indent)+ei((e.line-l+1).toString(),h)+" | "+c.str+`
83
83
  `+n;for(c=ti(e.buffer,i[o],a[o],e.position,u),n+=mt.repeat(" ",t.indent)+ei((e.line+1).toString(),h)+" | "+c.str+`
@@ -113,7 +113,7 @@ import{bF as df,_ as st}from"./index-bSvs-Qh3.js";import{p as Ye}from"./purify.e
113
113
  js-yaml/dist/js-yaml.mjs:
114
114
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
115
115
  */var ar=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),_t={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},xn={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function dr(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ut(e),t=ut(t);const[r,i]=[e.x,e.y],[a,s]=[t.x,t.y],o=a-r,n=s-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(dr,"calculateDeltaAndAngle");var ut=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Hg=p(e=>({x:p(function(t,r,i){let a=0;const s=ut(i[0]).x<ut(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(_t,e.arrowTypeStart)){const{angle:d,deltaX:g}=dr(i[0],i[1]);a=_t[e.arrowTypeStart]*Math.cos(d)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(_t,e.arrowTypeEnd)){const{angle:d,deltaX:g}=dr(i[i.length-1],i[i.length-2]);a=_t[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const o=Math.abs(ut(t).x-ut(i[i.length-1]).x),n=Math.abs(ut(t).y-ut(i[i.length-1]).y),l=Math.abs(ut(t).x-ut(i[0]).x),c=Math.abs(ut(t).y-ut(i[0]).y),h=_t[e.arrowTypeStart],u=_t[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=s==="right"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=s==="right"?-1:1,a+=d}return ut(t).x+a},"x"),y:p(function(t,r,i){let a=0;const s=ut(i[0]).y<ut(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(_t,e.arrowTypeStart)){const{angle:d,deltaY:g}=dr(i[0],i[1]);a=_t[e.arrowTypeStart]*Math.abs(Math.sin(d))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(_t,e.arrowTypeEnd)){const{angle:d,deltaY:g}=dr(i[i.length-1],i[i.length-2]);a=_t[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const o=Math.abs(ut(t).y-ut(i[i.length-1]).y),n=Math.abs(ut(t).x-ut(i[i.length-1]).x),l=Math.abs(ut(t).y-ut(i[0]).y),c=Math.abs(ut(t).x-ut(i[0]).x),h=_t[e.arrowTypeStart],u=_t[e.arrowTypeEnd],f=1;if(o<u&&o>0&&n<u){let d=u+f-o;d*=s==="up"?-1:1,a-=d}if(l<h&&l>0&&c<h){let d=h+f-l;d*=s==="up"?-1:1,a+=d}return ut(t).y+a},"y")}),"getLineFunctionsWithOffset"),jr={},pt={},bn;function jg(){return bn||(bn=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.BLANK_URL=pt.relativeFirstCharacters=pt.whitespaceEscapeCharsRegex=pt.urlSchemeRegex=pt.ctrlCharactersRegex=pt.htmlCtrlEntityRegex=pt.htmlEntitiesRegex=pt.invalidProtocolRegex=void 0,pt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,pt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,pt.htmlCtrlEntityRegex=/&(newline|tab);/gi,pt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,pt.urlSchemeRegex=/^.+(:|&colon;)/gim,pt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,pt.relativeFirstCharacters=[".","/"],pt.BLANK_URL="about:blank"),pt}var Cn;function Yg(){if(Cn)return jr;Cn=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.sanitizeUrl=s;var e=jg();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function a(o){try{return decodeURIComponent(o)}catch{return o}}function s(o){if(!o)return e.BLANK_URL;var n,l=a(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=a(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return jr}var Gg=Yg(),Wc=typeof global=="object"&&global&&global.Object===Object&&global,Vg=typeof self=="object"&&self&&self.Object===Object&&self,Zt=Wc||Vg||Function("return this")(),ki=Zt.Symbol,qc=Object.prototype,Ug=qc.hasOwnProperty,Xg=qc.toString,sr=ki?ki.toStringTag:void 0;function Zg(e){var t=Ug.call(e,sr),r=e[sr];try{e[sr]=void 0;var i=!0}catch{}var a=Xg.call(e);return i&&(t?e[sr]=r:delete e[sr]),a}var Kg=Object.prototype,Qg=Kg.toString;function Jg(e){return Qg.call(e)}var tm="[object Null]",em="[object Undefined]",kn=ki?ki.toStringTag:void 0;function Ke(e){return e==null?e===void 0?em:tm:kn&&kn in Object(e)?Zg(e):Jg(e)}function De(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var rm="[object AsyncFunction]",im="[object Function]",am="[object GeneratorFunction]",sm="[object Proxy]";function Ls(e){if(!De(e))return!1;var t=Ke(e);return t==im||t==am||t==rm||t==sm}var oa=Zt["__core-js_shared__"],_n=(function(){var e=/[^.]+$/.exec(oa&&oa.keys&&oa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function nm(e){return!!_n&&_n in e}var om=Function.prototype,lm=om.toString;function Oe(e){if(e!=null){try{return lm.call(e)}catch{}try{return e+""}catch{}}return""}var cm=/[\\^$.*+?()[\]{}|]/g,hm=/^\[object .+?Constructor\]$/,um=Function.prototype,dm=Object.prototype,fm=um.toString,pm=dm.hasOwnProperty,gm=RegExp("^"+fm.call(pm).replace(cm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mm(e){if(!De(e)||nm(e))return!1;var t=Ls(e)?gm:hm;return t.test(Oe(e))}function ym(e,t){return e?.[t]}function Pe(e,t){var r=ym(e,t);return mm(r)?r:void 0}var Lr=Pe(Object,"create");function xm(){this.__data__=Lr?Lr(null):{},this.size=0}function bm(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Cm="__lodash_hash_undefined__",km=Object.prototype,_m=km.hasOwnProperty;function wm(e){var t=this.__data__;if(Lr){var r=t[e];return r===Cm?void 0:r}return _m.call(t,e)?t[e]:void 0}var vm=Object.prototype,Sm=vm.hasOwnProperty;function Tm(e){var t=this.__data__;return Lr?t[e]!==void 0:Sm.call(t,e)}var Bm="__lodash_hash_undefined__";function Lm(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Lr&&t===void 0?Bm:t,this}function Ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Ae.prototype.clear=xm;Ae.prototype.delete=bm;Ae.prototype.get=wm;Ae.prototype.has=Tm;Ae.prototype.set=Lm;function $m(){this.__data__=[],this.size=0}function ji(e,t){return e===t||e!==e&&t!==t}function Yi(e,t){for(var r=e.length;r--;)if(ji(e[r][0],t))return r;return-1}var Mm=Array.prototype,Am=Mm.splice;function Fm(e){var t=this.__data__,r=Yi(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():Am.call(t,r,1),--this.size,!0}function Em(e){var t=this.__data__,r=Yi(t,e);return r<0?void 0:t[r][1]}function Dm(e){return Yi(this.__data__,e)>-1}function Om(e,t){var r=this.__data__,i=Yi(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}ae.prototype.clear=$m;ae.prototype.delete=Fm;ae.prototype.get=Em;ae.prototype.has=Dm;ae.prototype.set=Om;var $r=Pe(Zt,"Map");function Pm(){this.size=0,this.__data__={hash:new Ae,map:new($r||ae),string:new Ae}}function Im(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gi(e,t){var r=e.__data__;return Im(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Rm(e){var t=Gi(this,e).delete(e);return this.size-=t?1:0,t}function Nm(e){return Gi(this,e).get(e)}function zm(e){return Gi(this,e).has(e)}function Wm(e,t){var r=Gi(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function be(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}be.prototype.clear=Pm;be.prototype.delete=Rm;be.prototype.get=Nm;be.prototype.has=zm;be.prototype.set=Wm;var qm="Expected a function";function Ir(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(qm);var r=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,i);return r.cache=s.set(a,o)||s,o};return r.cache=new(Ir.Cache||be),r}Ir.Cache=be;function Hm(){this.__data__=new ae,this.size=0}function jm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Ym(e){return this.__data__.get(e)}function Gm(e){return this.__data__.has(e)}var Vm=200;function Um(e,t){var r=this.__data__;if(r instanceof ae){var i=r.__data__;if(!$r||i.length<Vm-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new be(i)}return r.set(e,t),this.size=r.size,this}function Qe(e){var t=this.__data__=new ae(e);this.size=t.size}Qe.prototype.clear=Hm;Qe.prototype.delete=jm;Qe.prototype.get=Ym;Qe.prototype.has=Gm;Qe.prototype.set=Um;var _i=(function(){try{var e=Pe(Object,"defineProperty");return e({},"",{}),e}catch{}})();function $s(e,t,r){t=="__proto__"&&_i?_i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Wa(e,t,r){(r!==void 0&&!ji(e[t],r)||r===void 0&&!(t in e))&&$s(e,t,r)}function Xm(e){return function(t,r,i){for(var a=-1,s=Object(t),o=i(t),n=o.length;n--;){var l=o[++a];if(r(s[l],l,s)===!1)break}return t}}var Zm=Xm(),Hc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wn=Hc&&typeof module=="object"&&module&&!module.nodeType&&module,Km=wn&&wn.exports===Hc,vn=Km?Zt.Buffer:void 0,Sn=vn?vn.allocUnsafe:void 0;function Qm(e,t){if(t)return e.slice();var r=e.length,i=Sn?Sn(r):new e.constructor(r);return e.copy(i),i}var Tn=Zt.Uint8Array;function Jm(e){var t=new e.constructor(e.byteLength);return new Tn(t).set(new Tn(e)),t}function t0(e,t){var r=t?Jm(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function e0(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Bn=Object.create,r0=(function(){function e(){}return function(t){if(!De(t))return{};if(Bn)return Bn(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function jc(e,t){return function(r){return e(t(r))}}var Yc=jc(Object.getPrototypeOf,Object),i0=Object.prototype;function Vi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||i0;return e===r}function a0(e){return typeof e.constructor=="function"&&!Vi(e)?r0(Yc(e)):{}}function Rr(e){return e!=null&&typeof e=="object"}var s0="[object Arguments]";function Ln(e){return Rr(e)&&Ke(e)==s0}var Gc=Object.prototype,n0=Gc.hasOwnProperty,o0=Gc.propertyIsEnumerable,wi=Ln((function(){return arguments})())?Ln:function(e){return Rr(e)&&n0.call(e,"callee")&&!o0.call(e,"callee")},vi=Array.isArray,l0=9007199254740991;function Vc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=l0}function Ui(e){return e!=null&&Vc(e.length)&&!Ls(e)}function c0(e){return Rr(e)&&Ui(e)}function h0(){return!1}var Uc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$n=Uc&&typeof module=="object"&&module&&!module.nodeType&&module,u0=$n&&$n.exports===Uc,Mn=u0?Zt.Buffer:void 0,d0=Mn?Mn.isBuffer:void 0,Ms=d0||h0,f0="[object Object]",p0=Function.prototype,g0=Object.prototype,Xc=p0.toString,m0=g0.hasOwnProperty,y0=Xc.call(Object);function x0(e){if(!Rr(e)||Ke(e)!=f0)return!1;var t=Yc(e);if(t===null)return!0;var r=m0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Xc.call(r)==y0}var b0="[object Arguments]",C0="[object Array]",k0="[object Boolean]",_0="[object Date]",w0="[object Error]",v0="[object Function]",S0="[object Map]",T0="[object Number]",B0="[object Object]",L0="[object RegExp]",$0="[object Set]",M0="[object String]",A0="[object WeakMap]",F0="[object ArrayBuffer]",E0="[object DataView]",D0="[object Float32Array]",O0="[object Float64Array]",P0="[object Int8Array]",I0="[object Int16Array]",R0="[object Int32Array]",N0="[object Uint8Array]",z0="[object Uint8ClampedArray]",W0="[object Uint16Array]",q0="[object Uint32Array]",ht={};ht[D0]=ht[O0]=ht[P0]=ht[I0]=ht[R0]=ht[N0]=ht[z0]=ht[W0]=ht[q0]=!0;ht[b0]=ht[C0]=ht[F0]=ht[k0]=ht[E0]=ht[_0]=ht[w0]=ht[v0]=ht[S0]=ht[T0]=ht[B0]=ht[L0]=ht[$0]=ht[M0]=ht[A0]=!1;function H0(e){return Rr(e)&&Vc(e.length)&&!!ht[Ke(e)]}function j0(e){return function(t){return e(t)}}var Zc=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kr=Zc&&typeof module=="object"&&module&&!module.nodeType&&module,Y0=kr&&kr.exports===Zc,la=Y0&&Wc.process,An=(function(){try{var e=kr&&kr.require&&kr.require("util").types;return e||la&&la.binding&&la.binding("util")}catch{}})(),Fn=An&&An.isTypedArray,As=Fn?j0(Fn):H0;function qa(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var G0=Object.prototype,V0=G0.hasOwnProperty;function U0(e,t,r){var i=e[t];(!(V0.call(e,t)&&ji(i,r))||r===void 0&&!(t in e))&&$s(e,t,r)}function X0(e,t,r,i){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var n=t[s],l=void 0;l===void 0&&(l=e[n]),a?$s(r,n,l):U0(r,n,l)}return r}function Z0(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var K0=9007199254740991,Q0=/^(?:0|[1-9]\d*)$/;function Kc(e,t){var r=typeof e;return t=t??K0,!!t&&(r=="number"||r!="symbol"&&Q0.test(e))&&e>-1&&e%1==0&&e<t}var J0=Object.prototype,ty=J0.hasOwnProperty;function ey(e,t){var r=vi(e),i=!r&&wi(e),a=!r&&!i&&Ms(e),s=!r&&!i&&!a&&As(e),o=r||i||a||s,n=o?Z0(e.length,String):[],l=n.length;for(var c in e)(t||ty.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Kc(c,l)))&&n.push(c);return n}function ry(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var iy=Object.prototype,ay=iy.hasOwnProperty;function sy(e){if(!De(e))return ry(e);var t=Vi(e),r=[];for(var i in e)i=="constructor"&&(t||!ay.call(e,i))||r.push(i);return r}function Qc(e){return Ui(e)?ey(e,!0):sy(e)}function ny(e){return X0(e,Qc(e))}function oy(e,t,r,i,a,s,o){var n=qa(e,r),l=qa(t,r),c=o.get(l);if(c){Wa(e,r,c);return}var h=s?s(n,l,r+"",e,t,o):void 0,u=h===void 0;if(u){var f=vi(l),d=!f&&Ms(l),g=!f&&!d&&As(l);h=l,f||d||g?vi(n)?h=n:c0(n)?h=e0(n):d?(u=!1,h=Qm(l,!0)):g?(u=!1,h=t0(l,!0)):h=[]:x0(l)||wi(l)?(h=n,wi(n)?h=ny(n):(!De(n)||Ls(n))&&(h=a0(l))):u=!1}u&&(o.set(l,h),a(h,l,i,s,o),o.delete(l)),Wa(e,r,h)}function Jc(e,t,r,i,a){e!==t&&Zm(t,function(s,o){if(a||(a=new Qe),De(s))oy(e,t,o,r,Jc,i,a);else{var n=i?i(qa(e,o),s,o+"",e,t,a):void 0;n===void 0&&(n=s),Wa(e,o,n)}},Qc)}function th(e){return e}function ly(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var En=Math.max;function cy(e,t,r){return t=En(t===void 0?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=En(i.length-t,0),o=Array(s);++a<s;)o[a]=i[t+a];a=-1;for(var n=Array(t+1);++a<t;)n[a]=i[a];return n[t]=r(o),ly(e,this,n)}}function hy(e){return function(){return e}}var uy=_i?function(e,t){return _i(e,"toString",{configurable:!0,enumerable:!1,value:hy(t),writable:!0})}:th,dy=800,fy=16,py=Date.now;function gy(e){var t=0,r=0;return function(){var i=py(),a=fy-(i-r);if(r=i,a>0){if(++t>=dy)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var my=gy(uy);function yy(e,t){return my(cy(e,t,th),e+"")}function xy(e,t,r){if(!De(r))return!1;var i=typeof t;return(i=="number"?Ui(r)&&Kc(t,r.length):i=="string"&&t in r)?ji(r[t],e):!1}function by(e){return yy(function(t,r){var i=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&xy(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++i<a;){var n=r[i];n&&e(t,n,i,s)}return t})}var Cy=by(function(e,t,r){Jc(e,t,r)}),ky="​",_y={curveBasis:Sa,curveBasisClosed:Bp,curveBasisOpen:Lp,curveBumpX:zo,curveBumpY:Wo,curveBundle:$p,curveCardinalClosed:Mp,curveCardinalOpen:Ap,curveCardinal:Yo,curveCatmullRomClosed:Fp,curveCatmullRomOpen:Ep,curveCatmullRom:Vo,curveLinear:Cr,curveLinearClosed:Dp,curveMonotoneX:Jo,curveMonotoneY:tl,curveNatural:rl,curveStep:il,curveStepAfter:sl,curveStepBefore:al},wy=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vy=p(function(e,t){const r=eh(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);oi(o),i=gt(i,[...o])}else i=r.args;if(!i)return;let a=cs(e,t);const s="config";return i[s]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),i[a]=i[s],delete i[s]),i},"detectInit"),eh=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${wy.source})(?=[}][%]{2}).*
116
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const a=[];for(;(i=xr.exec(e))!==null;)if(i.index===xr.lastIndex&&xr.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:s,args:o})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return A.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Sy=p(function(e){return e.replace(xr,"")},"removeDirectives"),Ty=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Fs(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return _y[r]??t}p(Fs,"interpolateToCurve");function rh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Gg.sanitizeUrl(r):r}p(rh,"formatUrl");var By=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){A.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Es(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Es,"distance");function ih(e){let t,r=0;e.forEach(a=>{r+=Es(a,t),t=a});const i=r/2;return Ds(e,i)}p(ih,"traverseEdge");function ah(e){return e.length===1?e[0]:ih(e)}p(ah,"calcLabelPosition");var Dn=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ds=p((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Es(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Dn((1-o)*r.x+o*a.x,5),y:Dn((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ly=p((e,t,r)=>{A.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Ds(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function sh(e,t,r){const i=structuredClone(r);A.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Ds(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}p(sh,"calcTerminalLabelPosition");function nh(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(nh,"getStylesFromArray");var On=0,$y=p(()=>(On++,"id-"+Math.random().toString(36).substr(2,12)+"-"+On),"generateId");function oh(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(oh,"makeRandomHex");var My=p(e=>oh(e.length),"random"),Ay=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Fy=p(function(e,t){const r=t.text.replace(Or.lineBreakRegex," "),[,i]=Xi(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),Ey=Ir((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Or.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=re(`${o} `,r),c=re(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=Dy(o,t,"-",r);a.push(s,...f),s=d}else c+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Dy=Ir((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const c=`${o}${n}`;if(re(c,i)>=t){const u=l+1,f=a.length===u,d=`${c}${r}`;s.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function lh(e,t){return Os(e,t).height}p(lh,"calculateTextHeight");function re(e,t){return Os(e,t).width}p(re,"calculateTextWidth");var Os=Ir((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Xi(r),o=["sans-serif",i],n=e.split(Or.lineBreakRegex),l=[],c=rt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=Ay();y.text=m||ky;const x=Fy(h,y).style("font-size",s).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Oy=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},Yr,Py=p(function(e){return Yr=Yr||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Yr.innerHTML=e,unescape(Yr.textContent)},"entityDecode");function Ps(e){return"str"in e}p(Ps,"isDetailedError");var Iy=p((e,t,r,i)=>{if(!i)return;const a=e.node()?.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Xi=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Is(e,t){return Cy({},e,t)}p(Is,"cleanAndMerge");var Wt={assignWithDepth:gt,wrapLabel:Ey,calculateTextHeight:lh,calculateTextWidth:re,calculateTextDimensions:Os,cleanAndMerge:Is,detectInit:vy,detectDirective:eh,isSubstringInArray:Ty,interpolateToCurve:Fs,calcLabelPosition:ah,calcCardinalityPosition:Ly,calcTerminalLabelPosition:sh,formatUrl:rh,getStylesFromArray:nh,generateId:$y,random:My,runFunc:By,entityDecode:Py,insertTitle:Iy,isLabelCoordinateInPath:ch,parseFontSize:Xi,InitIDGenerator:Oy},Ry=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Je=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Zk=p((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function St(e){return e??null}p(St,"handleUndefinedAttr");function ch(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(ch,"isLabelCoordinateInPath");var Rs=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function hh(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const n=ot().fontSize?ot().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=So.fontSize]=Xi(n),h=c*l+"px";a.style.minWidth=h,a.style.maxWidth=h}else a.style.width="100%";s(a)}p(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}p(hh,"configureLabelImages");var Ny=p(e=>{const{handDrawnSeed:t}=ot();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),tr=p(e=>{const t=zy([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),zy=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a?.trim())}),t},"styles2Map"),uh=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),j=p(e=>{const{stylesArray:t}=tr(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];uh(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),H=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ot(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=tr(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Wy(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Wy=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const qy=Object.freeze({left:0,top:0,width:16,height:16}),Si=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),dh=Object.freeze({...qy,...Si}),Hy=Object.freeze({...dh,body:"",hidden:!1}),jy=Object.freeze({width:null,height:null}),Yy=Object.freeze({...jy,...Si}),Gy=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:n};return ca(c)?c:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return ca(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return ca(n,r)?n:null}return null},ca=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Vy(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 Pn(e,t){const r=Vy(e,t);for(const i in Hy)i in Si?i in e&&!(i in r)&&(r[i]=Si[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Uy(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function In(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=Pn(i[n]||a[n],s)}return o(t),r.forEach(o),Pn(e,s)}function Xy(e,t){if(e.icons[t])return In(e,t,[]);const r=Uy(e,[t])[t];return r?In(e,t,r):null}const Zy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ky=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rn(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(Zy);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=Ky.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function Qy(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Jy(e,t){return e?"<defs>"+e+"</defs>"+t:t}function tx(e,t,r){const i=Qy(e);return Jy(i.defs,t+i.content+r)}const ex=e=>e==="unset"||e==="undefined"||e==="none";function rx(e,t){const r={...dh,...e},i={...Yy,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=a.height/2+a.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:v=a.width/2+a.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(a.left!==a.top&&(v=a.left,a.left=a.top,a.top=v),a.width!==a.height&&(v=a.width,a.width=a.height,a.height=v)),y.length&&(s=tx(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,c=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Rn(u,l/c)):(h=o==="auto"?l:o,u=n===null?Rn(h,c/l):n==="auto"?c:n);const f={},d=(m,y)=>{ex(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const ix=/\sid="(\S+)"/g,Nn=new Map;function ax(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Nn.get(e)||0;return Nn.set(e,t+1),t?`${e}${t}`:e}function sx(e){const t=[];let r;for(;r=ix.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=ax(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function nx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Ns(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ie=Ns();function fh(e){Ie=e}var _r={exec:()=>null};function nt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Mt.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var ox=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Mt={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")},lx=/^(?:[ \t]*(?:\n|$))+/,cx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Nr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ux=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zs=/(?:[*+-]|\d{1,9}[.)])/,ph=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gh=nt(ph).replace(/bull/g,zs).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(),dx=nt(ph).replace(/bull/g,zs).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(),Ws=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fx=/^[^\n]+/,qs=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,px=nt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gx=nt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zs).getRegex(),Zi="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",Hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mx=nt("^ {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",Hs).replace("tag",Zi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mh=nt(Ws).replace("hr",Nr).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",Zi).getRegex(),yx=nt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mh).getRegex(),js={blockquote:yx,code:cx,def:px,fences:hx,heading:ux,hr:Nr,html:mx,lheading:gh,list:gx,newline:lx,paragraph:mh,table:_r,text:fx},zn=nt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Nr).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",Zi).getRegex(),xx={...js,lheading:dx,table:zn,paragraph:nt(Ws).replace("hr",Nr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zn).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",Zi).getRegex()},bx={...js,html:nt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hs).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:_r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:nt(Ws).replace("hr",Nr).replace("heading",` *#{1,6} *[^
116
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),A.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const a=[];for(;(i=xr.exec(e))!==null;)if(i.index===xr.lastIndex&&xr.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const s=i[1]?i[1]:i[2],o=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:s,args:o})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return A.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Sy=p(function(e){return e.replace(xr,"")},"removeDirectives"),Ty=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Fs(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return _y[r]??t}p(Fs,"interpolateToCurve");function rh(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Gg.sanitizeUrl(r):r}p(rh,"formatUrl");var By=p((e,...t)=>{const r=e.split("."),i=r.length-1,a=r[i];let s=window;for(let o=0;o<i;o++)if(s=s[r[o]],!s){A.error(`Function name: ${e} not found in window`);return}s[a](...t)},"runFunc");function Es(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Es,"distance");function ih(e){let t,r=0;e.forEach(a=>{r+=Es(a,t),t=a});const i=r/2;return Ds(e,i)}p(ih,"traverseEdge");function ah(e){return e.length===1?e[0]:ih(e)}p(ah,"calcLabelPosition");var Dn=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Ds=p((e,t)=>{let r,i=t;for(const a of e){if(r){const s=Es(a,r);if(s===0)return r;if(s<i)i-=s;else{const o=i/s;if(o<=0)return r;if(o>=1)return{x:a.x,y:a.y};if(o>0&&o<1)return{x:Dn((1-o)*r.x+o*a.x,5),y:Dn((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Ly=p((e,t,r)=>{A.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const a=Ds(t,25),s=e?10:5,o=Math.atan2(t[0].y-a.y,t[0].x-a.x),n={x:0,y:0};return n.x=Math.sin(o)*s+(t[0].x+a.x)/2,n.y=-Math.cos(o)*s+(t[0].y+a.y)/2,n},"calcCardinalityPosition");function sh(e,t,r){const i=structuredClone(r);A.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const a=25+e,s=Ds(i,a),o=10+e*.5,n=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+s.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+s.x)/2,l.y=-Math.cos(n)*o+(i[0].y+s.y)/2),l}p(sh,"calcTerminalLabelPosition");function nh(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(nh,"getStylesFromArray");var On=0,$y=p(()=>(On++,"id-"+Math.random().toString(36).substr(2,12)+"-"+On),"generateId");function oh(e){let t="";const r="0123456789abcdef",i=r.length;for(let a=0;a<e;a++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(oh,"makeRandomHex");var My=p(e=>oh(e.length),"random"),Ay=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Fy=p(function(e,t){const r=t.text.replace(Or.lineBreakRegex," "),[,i]=Xi(t.fontSize),a=e.append("text");a.attr("x",t.x),a.attr("y",t.y),a.style("text-anchor",t.anchor),a.style("font-family",t.fontFamily),a.style("font-size",i),a.style("font-weight",t.fontWeight),a.attr("fill",t.fill),t.class!==void 0&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),a},"drawSimpleText"),Ey=Ir((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Or.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),a=[];let s="";return i.forEach((o,n)=>{const l=re(`${o} `,r),c=re(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=Dy(o,t,"-",r);a.push(s,...f),s=d}else c+l>=t?(a.push(s),s=o):s=[s,o].filter(Boolean).join(" ");n+1===i.length&&a.push(s)}),a.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Dy=Ir((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const a=[...e],s=[];let o="";return a.forEach((n,l)=>{const c=`${o}${n}`;if(re(c,i)>=t){const u=l+1,f=a.length===u,d=`${c}${r}`;s.push(f?c:d),o=""}else o=c}),{hyphenatedStrings:s,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function lh(e,t){return Os(e,t).height}p(lh,"calculateTextHeight");function re(e,t){return Os(e,t).width}p(re,"calculateTextWidth");var Os=Ir((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:a=400}=t;if(!e)return{width:0,height:0};const[,s]=Xi(r),o=["sans-serif",i],n=e.split(Or.lineBreakRegex),l=[],c=rt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of n){const y=Ay();y.text=m||ky;const x=Fy(h,y).style("font-size",s).style("font-weight",a).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Oy=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},Yr,Py=p(function(e){return Yr=Yr||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Yr.innerHTML=e,unescape(Yr.textContent)},"entityDecode");function Ps(e){return"str"in e}p(Ps,"isDetailedError");var Iy=p((e,t,r,i)=>{if(!i)return;const a=e.node()?.getBBox();a&&e.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Xi=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Is(e,t){return Cy({},e,t)}p(Is,"cleanAndMerge");var Wt={assignWithDepth:gt,wrapLabel:Ey,calculateTextHeight:lh,calculateTextWidth:re,calculateTextDimensions:Os,cleanAndMerge:Is,detectInit:vy,detectDirective:eh,isSubstringInArray:Ty,interpolateToCurve:Fs,calcLabelPosition:ah,calcCardinalityPosition:Ly,calcTerminalLabelPosition:sh,formatUrl:rh,getStylesFromArray:nh,generateId:$y,random:My,runFunc:By,entityDecode:Py,insertTitle:Iy,isLabelCoordinateInPath:ch,parseFontSize:Xi,InitIDGenerator:Oy},Ry=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Je=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Xk=p((e,t,{counter:r=0,prefix:i,suffix:a},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${a?`_${a}`:""}`,"getEdgeId");function St(e){return e??null}p(St,"handleUndefinedAttr");function ch(e,t){const r=Math.round(e.x),i=Math.round(e.y),a=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return a.includes(r.toString())||a.includes(i.toString())}p(ch,"isLabelCoordinateInPath");var Rs=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function hh(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(a=>new Promise(s=>{function o(){if(a.style.display="flex",a.style.flexDirection="column",i){const n=ot().fontSize?ot().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=So.fontSize]=Xi(n),h=c*l+"px";a.style.minWidth=h,a.style.maxWidth=h}else a.style.width="100%";s(a)}p(o,"setupImage"),setTimeout(()=>{a.complete&&o()}),a.addEventListener("error",o),a.addEventListener("load",o)})))}p(hh,"configureLabelImages");var Ny=p(e=>{const{handDrawnSeed:t}=ot();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),tr=p(e=>{const t=zy([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),zy=p(e=>{const t=new Map;return e.forEach(r=>{const[i,a]=r.split(":");t.set(i.trim(),a?.trim())}),t},"styles2Map"),uh=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),j=p(e=>{const{stylesArray:t}=tr(e),r=[],i=[],a=[],s=[];return t.forEach(o=>{const n=o[0];uh(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&a.push(o.join(":")+" !important"),n==="fill"&&s.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:a,backgroundStyles:s}},"styles2String"),H=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ot(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:o}=tr(e);return Object.assign({roughness:.7,fill:o.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||a,seed:i,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Wy(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),Wy=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const a=isNaN(t[0])?0:t[0];return[a,a]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const qy=Object.freeze({left:0,top:0,width:16,height:16}),Si=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),dh=Object.freeze({...qy,...Si}),Hy=Object.freeze({...dh,body:"",hidden:!1}),jy=Object.freeze({width:null,height:null}),Yy=Object.freeze({...jy,...Si}),Gy=(e,t,r,i="")=>{const a=e.split(":");if(e.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;i=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const n=a.pop(),l=a.pop(),c={provider:a.length>0?a[0]:i,prefix:l,name:n};return ca(c)?c:null}const s=a[0],o=s.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return ca(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:s};return ca(n,r)?n:null}return null},ca=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Vy(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 Pn(e,t){const r=Vy(e,t);for(const i in Hy)i in Si?i in e&&!(i in r)&&(r[i]=Si[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Uy(e,t){const r=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(o){if(r[o])return a[o]=[];if(!(o in a)){a[o]=null;const n=i[o]&&i[o].parent,l=n&&s(n);l&&(a[o]=[n].concat(l))}return a[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),a}function In(e,t,r){const i=e.icons,a=e.aliases||Object.create(null);let s={};function o(n){s=Pn(i[n]||a[n],s)}return o(t),r.forEach(o),Pn(e,s)}function Xy(e,t){if(e.icons[t])return In(e,t,[]);const r=Uy(e,[t])[t];return r?In(e,t,r):null}const Zy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ky=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rn(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(Zy);if(i===null||!i.length)return e;const a=[];let s=i.shift(),o=Ky.test(s);for(;;){if(o){const n=parseFloat(s);isNaN(n)?a.push(s):a.push(Math.ceil(n*t*r)/r)}else a.push(s);if(s=i.shift(),s===void 0)return a.join("");o=!o}}function Qy(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const a=e.indexOf(">",i),s=e.indexOf("</"+t);if(a===-1||s===-1)break;const o=e.indexOf(">",s);if(o===-1)break;r+=e.slice(a+1,s).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Jy(e,t){return e?"<defs>"+e+"</defs>"+t:t}function tx(e,t,r){const i=Qy(e);return Jy(i.defs,t+i.content+r)}const ex=e=>e==="unset"||e==="undefined"||e==="none";function rx(e,t){const r={...dh,...e},i={...Yy,...t},a={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),y.push("scale(-1 1)"),a.top=a.left=0):b&&(y.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),y.push("scale(1 -1)"),a.top=a.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=a.height/2+a.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:v=a.width/2+a.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(a.left!==a.top&&(v=a.left,a.left=a.top,a.top=v),a.width!==a.height&&(v=a.width,a.width=a.height,a.height=v)),y.length&&(s=tx(s,'<g transform="'+y.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=a.width,c=a.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Rn(u,l/c)):(h=o==="auto"?l:o,u=n===null?Rn(h,c/l):n==="auto"?c:n);const f={},d=(m,y)=>{ex(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[a.left,a.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:s}}const ix=/\sid="(\S+)"/g,Nn=new Map;function ax(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Nn.get(e)||0;return Nn.set(e,t+1),t?`${e}${t}`:e}function sx(e){const t=[];let r;for(;r=ix.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(a=>{const s=ax(a),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function nx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function Ns(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ie=Ns();function fh(e){Ie=e}var _r={exec:()=>null};function nt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(a,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Mt.caret,"$1"),r=r.replace(a,o),i},getRegex:()=>new RegExp(r,t)};return i}var ox=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Mt={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")},lx=/^(?:[ \t]*(?:\n|$))+/,cx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,hx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Nr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ux=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zs=/(?:[*+-]|\d{1,9}[.)])/,ph=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gh=nt(ph).replace(/bull/g,zs).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(),dx=nt(ph).replace(/bull/g,zs).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(),Ws=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fx=/^[^\n]+/,qs=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,px=nt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qs).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gx=nt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zs).getRegex(),Zi="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",Hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mx=nt("^ {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",Hs).replace("tag",Zi).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mh=nt(Ws).replace("hr",Nr).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",Zi).getRegex(),yx=nt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mh).getRegex(),js={blockquote:yx,code:cx,def:px,fences:hx,heading:ux,hr:Nr,html:mx,lheading:gh,list:gx,newline:lx,paragraph:mh,table:_r,text:fx},zn=nt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Nr).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",Zi).getRegex(),xx={...js,lheading:dx,table:zn,paragraph:nt(Ws).replace("hr",Nr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zn).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",Zi).getRegex()},bx={...js,html:nt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Hs).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:_r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:nt(Ws).replace("hr",Nr).replace("heading",` *#{1,6} *[^
117
117
  ]`).replace("lheading",gh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Cx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yh=/^( {2,}|\\)\n(?!\s*$)/,_x=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ki=/[\p{P}\p{S}]/u,Ys=/[\s\p{P}\p{S}]/u,xh=/[^\s\p{P}\p{S}]/u,wx=nt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ys).getRegex(),bh=/(?!~)[\p{P}\p{S}]/u,vx=/(?!~)[\s\p{P}\p{S}]/u,Sx=/(?:[^\s\p{P}\p{S}]|~)/u,Tx=nt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ox?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ch=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Bx=nt(Ch,"u").replace(/punct/g,Ki).getRegex(),Lx=nt(Ch,"u").replace(/punct/g,bh).getRegex(),kh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$x=nt(kh,"gu").replace(/notPunctSpace/g,xh).replace(/punctSpace/g,Ys).replace(/punct/g,Ki).getRegex(),Mx=nt(kh,"gu").replace(/notPunctSpace/g,Sx).replace(/punctSpace/g,vx).replace(/punct/g,bh).getRegex(),Ax=nt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xh).replace(/punctSpace/g,Ys).replace(/punct/g,Ki).getRegex(),Fx=nt(/\\(punct)/,"gu").replace(/punct/g,Ki).getRegex(),Ex=nt(/^<(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(),Dx=nt(Hs).replace("(?:-->|$)","-->").getRegex(),Ox=nt("^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",Dx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ti=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Px=nt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ti).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),_h=nt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ti).replace("ref",qs).getRegex(),wh=nt(/^!?\[(ref)\](?:\[\])?/).replace("ref",qs).getRegex(),Ix=nt("reflink|nolink(?!\\()","g").replace("reflink",_h).replace("nolink",wh).getRegex(),Wn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gs={_backpedal:_r,anyPunctuation:Fx,autolink:Ex,blockSkip:Tx,br:yh,code:kx,del:_r,emStrongLDelim:Bx,emStrongRDelimAst:$x,emStrongRDelimUnd:Ax,escape:Cx,link:Px,nolink:wh,punctuation:wx,reflink:_h,reflinkSearch:Ix,tag:Ox,text:_x,url:_r},Rx={...Gs,link:nt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ti).getRegex(),reflink:nt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ti).getRegex()},Ha={...Gs,emStrongRDelimAst:Mx,emStrongLDelim:Lx,url:nt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wn).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:nt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wn).getRegex()},Nx={...Ha,br:nt(yh).replace("{2,}","*").getRegex(),text:nt(Ha.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Gr={normal:js,gfm:xx,pedantic:bx},nr={normal:Gs,gfm:Ha,breaks:Nx,pedantic:Rx},zx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qn=e=>zx[e];function Yt(e,t){if(t){if(Mt.escapeTest.test(e))return e.replace(Mt.escapeReplace,qn)}else if(Mt.escapeTestNoEncode.test(e))return e.replace(Mt.escapeReplaceNoEncode,qn);return e}function Hn(e){try{e=encodeURI(e).replace(Mt.percentDecode,"%")}catch{return null}return e}function jn(e,t){let r=e.replace(Mt.findPipe,(s,o,n)=>{let l=!1,c=o;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Mt.splitPipe),a=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(;a<i.length;a++)i[a]=i[a].trim().replace(Mt.slashPipe,"|");return i}function or(e,t,r){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function Wx(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 Yn(e,t,r,i,a){let s=t.href,o=t.title||null,n=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function qx(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
118
118
  `).map(s=>{let o=s.match(r.other.beginningSpace);if(o===null)return s;let[n]=o;return n.length>=a.length?s.slice(a.length):s}).join(`
119
119
  `)}var Bi=class{options;rules;lexer;constructor(t){this.options=t||Ie}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:or(i,`
@@ -182,7 +182,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error
182
182
  `);return vh(i)}p(Bh,"preprocessMarkdown");function Lh(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(Lh,"nonMarkdownToLines");function $h(e,t={}){const r=Bh(e,t),i=lt.lexer(r),a=[[]];let s=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
183
183
  `).forEach((h,u)=>{u!==0&&(s++,a.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&a[s].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&a[s].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{o(l)}):n.type==="html"?a[s].push({content:n.text,type:"normal"}):a[s].push({content:n.raw,type:"normal"})}),a}p($h,"markdownToLines");function Mh(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Mh,"nonMarkdownToHTML");function Ah(e,{markdownAutoWrap:t}={}){const r=lt.lexer(e);function i(a){return a.type==="text"?t===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${a.tokens?.map(i).join("")}</strong>`:a.type==="em"?`<em>${a.tokens?.map(i).join("")}</em>`:a.type==="paragraph"?`<p>${a.tokens?.map(i).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(A.warn(`Unsupported markdown: ${a.type}`),a.raw)}return p(i,"output"),r.map(i).join("")}p(Ah,"markdownToHTML");function Fh(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Fh,"splitTextToChars");function Eh(e,t){const r=Fh(t.content);return Us(e,[],r,t.type)}p(Eh,"splitWordToFitWidth");function Us(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[a,...s]=r,o=[...t,a];return e([{content:o.join(""),type:i}])?Us(e,o,s,i):(t.length===0&&a&&(t.push(a),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(Us,"splitWordToFitWidthRecursion");function Dh(e,t){if(e.some(({content:r})=>r.includes(`
184
184
  `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return $i(e,t)}p(Dh,"splitLineToFitWidth");function $i(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let a="";e[0].content===" "&&(a=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},o=[...i];if(a!==""&&o.push({content:a,type:"normal"}),o.push(s),t(o))return $i(e,t,r,o);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[n,l]=Eh(t,s);r.push([n]),l.content&&e.unshift(l)}return $i(e,t,r)}p($i,"splitLineToFitWidthRecursion");function Va(e,t){t&&e.attr("style",t)}p(Va,"applyStyle");var Gn=16384;async function Oh(e,t,r,i,a=!1,s=wt()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Gn)}px`),o.attr("height",`${Math.min(10*r,Gn)}px`);const n=o.append("xhtml:div"),l=wr(t.label)?await Do(t.label.replace(Or.lineBreakRegex,`
185
- `),s):jt(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Va(h,t.labelStyle),h.attr("class",`${c} ${i}`),Va(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}p(Oh,"addHtmlSpan");function Qi(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}p(Qi,"createTspan");function Ph(e,t,r){const i=e.append("text"),a=Qi(i,1,t);Ji(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}p(Ph,"computeWidthOfText");function Vx(e,t,r){const i=e.append("text"),a=Qi(i,1,t);Ji(a,[{content:r,type:"normal"}]);const s=a.node()?.getBoundingClientRect();return s&&i.remove(),s}p(Vx,"computeDimensionOfText");function Ih(e,t,r,i=!1,a=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(d=>Ph(o,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:Dh(h,u);for(const d of f){const g=Qi(l,c,1.1,a);Ji(g,d),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}p(Ih,"createFormattedText");function Ji(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}p(Ji,"updateTextContentAndStyles");async function Rh(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await Gx(n)?await zr(n,void 0,{class:"label-icon"}):`<i class='${jt(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Rh,"replaceIconSubstring");var se=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(A.debug("XYZ createText",t,r,i,a,s,n,"addSvgBackground: ",c),s){const u=o?Ah(t,h):Mh(t),f=await Rh(Je(u),h),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:wr(t)?d:f,labelStyle:r.replace("fill:","color:")};return await Oh(e,g,l,a,c,h)}else{const u=t.replace(/<br\s*\/?>/g,"<br/>"),f=o?$h(u.replace("<br>","<br/>"),h):Lh(u),d=Ih(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");rt(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(d).select("text").attr("style",m)}return i?rt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):rt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ha(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*n+i,l[1]=(c-i)*n+(h-a)*o+a}}}function Ux(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xx(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const c of o)ha(c,n,a);const l=(function(c,h,u){const f=[];for(const b of c){const k=[...b];Ux(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const v=b[k],_=b[k+1];if(v[1]!==_[1]){const S=Math.min(v[1],_[1]);g.push({ymin:S,ymax:Math.max(v[1],_[1]),x:S===v[1]?v[0]:_[0],islope:(_[0]-v[0])/(_[1]-v[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>y);k++)b=k;g.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const v=m[b].edge,_=m[k].edge;d.push([[Math.round(v.x),y],[Math.round(_.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(o,s,i);if(a){for(const c of o)ha(c,n,-a);(function(c,h,u){const f=[];c.forEach((d=>f.push(...d))),ha(f,h,u)})(l,n,-a)}return l}function Wr(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),Xx(e,a,i,s||1)}class Xs{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Wr(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function ta(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 Zx extends Xs{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Wr(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of a)ta([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Kx extends Xs{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class Qx{constructor(t){this.helper=t}fillPolygons(t,r){const i=Wr(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=ta(n),c=l/a,h=Math.ceil(c)-1,u=l-h*a,f=(n[0][0]+n[1][0])/2-a/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Jx{constructor(t){this.helper=t}fillPolygons(t,r){const i=Wr(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const n=ta(o),l=Math.floor(n/(i+a)),c=(n+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),s}}class tb{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Wr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=ta(s),n=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),a}}const Ft={};class eb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const rb=0,ua=1,Vn=2,Vr={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 da(e,t){return e.type===t}function Zs(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:rb,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:ua,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Vn,text:""},n})(e);let i="BOD",a=0,s=r[a];for(;!da(s,Vn);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Zs("M0,0"+e);a++,o=Vr[s.text],i=s.text}else da(s,ua)?o=Vr[i]:(a++,o=Vr[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!da(c,ua))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Vr[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Nh(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function zh(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=a+(a-l)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),n=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=a+(a-l)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),n=d,l=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),n=u,l=f,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(Wh(i,a,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=c}return t}function lr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Wh(e,t,r,i,a,s,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=lr(e,t,-h),[r,i]=lr(r,i,-h);const O=(e-r)/2,L=(t-i)/2;let B=O*O/(a*a)+L*L/(s*s);B>1&&(B=Math.sqrt(B),a*=B,s*=B);const w=a*a,M=s*s,$=w*M-w*L*L-M*O*O,z=w*L*L+M*O*O,G=(n===l?-1:1)*Math.sqrt(Math.abs($/z));m=G*a*L/s+(e+r)/2,y=G*-s*O/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,L=r,B=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Wh(r=m+a*Math.cos(g),i=y+s*Math.sin(g),L,B,a,s,o,0,l,[g,O,m,y])}x=g-d;const b=Math.cos(d),k=Math.sin(d),v=Math.cos(g),_=Math.sin(g),S=Math.tan(x/4),T=4/3*a*S,F=4/3*s*S,P=[e,t],D=[e+T*k,t-F*b],E=[r+T*_,i-F*v],I=[r,i];if(D[0]=2*P[0]-D[0],D[1]=2*P[1]-D[1],c)return[D,E,I].concat(f);{f=[D,E,I].concat(f);const O=[];for(let L=0;L<f.length;L+=3){const B=lr(f[L][0],f[L][1],h),w=lr(f[L+1][0],f[L+1][1],h),M=lr(f[L+2][0],f[L+2][1],h);O.push([B[0],B[1],w[0],w[1],M[0],M[1]])}return O}}const ib={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,r){return Mi(e,t,r)},ellipse:function(e,t,r,i,a){const s=Hh(r,i,a);return Ua(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return me(e,t,r,i,a,!0)}};function qh(e,t,r,i,a){return{type:"path",ops:me(e,t,r,i,a)}}function ri(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...me(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?qh(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function ab(e,t,r,i,a){return(function(s,o){return ri(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Un(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ur(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Ur(r[0],1.5*(1+.22*t.roughness),Kn(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=Ur(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ur(o,1.5*(1+.22*t.roughness),Kn(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Hh(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=Q(o*l,r),n+=Q(n*l,r),{increment:s,rx:o,ry:n}}function Ua(e,t,r,i){const[a,s]=Qn(i.increment,e,t,i.rx,i.ry,1,i.increment*Mi(.1,Mi(.4,1,r),r),r);let o=Ai(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Qn(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ai(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Xn(e,t,r,i,a,s,o,n,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=Q(.01*u,l),f+=Q(.01*f,l);let d=a,g=s;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Jn(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Jn(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return o&&(n?x.push(...me(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...me(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Zn(e,t){const r=zh(Nh(Zs(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...me(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,u,f,d]=n;i.push(...sb(l,c,h,u,f,d,s,t)),s=[f,d];break}case"Z":i.push(...me(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function fa(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Q(a,t),i[0][1]+Q(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+Q(a,t),i[o][1]+Q(a,t)]})}}return{type:"fillPath",ops:r}}function Ne(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Ft[a])switch(a){case"zigzag":Ft[a]||(Ft[a]=new Zx(i));break;case"cross-hatch":Ft[a]||(Ft[a]=new Kx(i));break;case"dots":Ft[a]||(Ft[a]=new Qx(i));break;case"dashed":Ft[a]||(Ft[a]=new Jx(i));break;case"zigzag-line":Ft[a]||(Ft[a]=new tb(i));break;default:a="hachure",Ft[a]||(Ft[a]=new Xs(i))}return Ft[a]})(t,ib).fillPolygons(e,t)}function Kn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function jh(e){return e.randomizer||(e.randomizer=new eb(e.seed||0)),e.randomizer.next()}function Mi(e,t,r,i=1){return r.roughness*i*(jh(r)*(t-e)+e)}function Q(e,t,r=1){return Mi(-e,e,t,r)}function me(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=Xa(e,t,r,i,a,!0,!1);if(o)return n;const l=Xa(e,t,r,i,a,!0,!0);return n.concat(l)}function Xa(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,f=.2+.2*jh(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=Q(d,a,c),g=Q(g,a,c);const m=[],y=()=>Q(u,a,c),x=()=>Q(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:Q(h,a,c)),t+(b?0:Q(h,a,c))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Ur(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]),a===e.length-1&&i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]);return Ai(i,null,r)}function Ai(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Xa(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Qn(e,t,r,i,a,s,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=Q(.5,n)-Math.PI/2;c.push([Q(s,n)+t+.9*i*Math.cos(h-e),Q(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[Q(s,n)+t+i*Math.cos(f),Q(s,n)+r+a*Math.sin(f)];l.push(d),c.push(d)}c.push([Q(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),Q(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([Q(s,n)+t+.98*i*Math.cos(h+o),Q(s,n)+r+.98*a*Math.sin(h+o)]),c.push([Q(s,n)+t+.9*i*Math.cos(h+.5*o),Q(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function Jn(e,t,r,i,a,s,o,n,l){const c=s+Q(.1,l),h=[];h.push([Q(n,l)+t+.9*i*Math.cos(c-e),Q(n,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([Q(n,l)+t+i*Math.cos(u),Q(n,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Ai(h,null,l)}function sb(e,t,r,i,a,s,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:Q(c[0],n)),o[1]+(f?0:Q(c[0],n))]}),h=f?[a,s]:[a+Q(c[d],n),s+Q(c[d],n)],l.push({op:"bcurveTo",data:[e+Q(c[d],n),t+Q(c[d],n),r+Q(c[d],n),i+Q(c[d],n),h[0],h[1]]});return l}function cr(e){return[...e]}function to(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(cr(e[0]),cr(e[1]),cr(e[2]),cr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(cr(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function ii(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function nb(e,t,r){const i=ii(t,r);if(i===0)return ii(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),ii(e,we(t,r,a))}function we(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Za(e,t,r,i){const a=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],f=n[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(ii(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=we(l,c,.5),d=we(c,h,.5),g=we(h,u,.5),m=we(f,d,.5),y=we(d,g,.5),x=we(m,y,.5);Za([l,f,m,x],0,r,a),Za([x,y,g,u],0,r,a)}var s,o;return a}function ob(e,t){return Fi(e,0,e.length,t)}function Fi(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=nb(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Fi(e,t,c+1,i,s),Fi(e,c,r,i,s)):(s.length||s.push(o),s.push(n)),s}function pa(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Za(e,3*s,t,i);return r&&r>0?Fi(i,0,i.length,r):i}const Ot="none";class Ei{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[qh(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=ab(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(fa([c],o)):n.push(Ne([c],o))}return o.stroke!==Ot&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=Hh(i,a,o),c=Ua(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Ua(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Ne([c.estimatedPoints],o));return o.stroke!==Ot&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ri(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const c=this._o(l),h=[],u=Xn(t,r,i,a,s,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Xn(t,r,i,a,s,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const k=f,v=d;let _=Math.abs(g/2),S=Math.abs(m/2);_+=Q(.01*_,b),S+=Q(.01*S,b);let T=y,F=x;for(;T<0;)T+=2*Math.PI,F+=2*Math.PI;F-T>2*Math.PI&&(T=0,F=2*Math.PI);const P=(F-T)/b.curveStepCount,D=[];for(let E=T;E<=F;E+=P)D.push([k+_*Math.cos(E),v+S*Math.sin(E)]);return D.push([k+_*Math.cos(F),v+S*Math.sin(F)]),D.push([k,v]),Ne([D],b)})(t,r,i,a,s,o,c));return c.stroke!==Ot&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],s=Un(t,i);if(i.fill&&i.fill!==Ot)if(i.fillStyle==="solid"){const o=Un(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...pa(to([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...pa(to(c),10,(1+i.roughness)/2))}o.length&&a.push(Ne([o],i))}return i.stroke!==Ot&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=ri(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(fa([t],i)):a.push(Ne([t],i))),i.stroke!==Ot&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ot,o=i.stroke!==Ot,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const d=zh(Nh(Zs(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...pa(x,u)),x=[]},k=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:_,data:S}of d)switch(_){case"M":k(),y=[S[0],S[1]],m.push(y);break;case"L":b(),m.push([S[0],S[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([S[0],S[1]]),x.push([S[2],S[3]]),x.push([S[4],S[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return g;const v=[];for(const _ of g){const S=ob(_,f);S.length&&v.push(S)}return v})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Zn(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=Zn(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(fa(l,i));else a.push(Ne(l,i));return o&&(n?l.forEach((h=>{a.push(ri(h,!1,i))})):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ot};break;case"fillPath":o={d:this.opsToPath(s),stroke:Ot,strokeWidth:0,fill:i.fill||Ot};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ot,strokeWidth:i,fill:Ot}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class lb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ei(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Xr="http://www.w3.org/2000/svg";class cb{constructor(t,r){this.svg=t,this.gen=new Ei(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Xr,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(Xr,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(Xr,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Xr,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var q={canvas:(e,t)=>new lb(e,t),svg:(e,t)=>new cb(e,t),generator:e=>new Ei(e),newSeed:()=>Ei.newSeed()},K=p(async(e,t,r)=>{let i;const a=t.useHtmlLabels||xe(ot()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",St(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await se(o,jt(Je(n),ot()),{useHtmlLabels:a,width:t.width||ot().flowchart?.wrappingWidth,cssClasses:c?"markdown-node-label":void 0,style:t.labelStyle,addSvgBackground:l,markdown:c},ot());let u=h.getBBox();const f=(t?.padding??0)/2;if(a){const d=h.children[0],g=rt(h);await hh(d,n),u=d.getBoundingClientRect(),g.attr("width",u.width),g.attr("height",u.height)}return a?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:f,label:o}},"labelHelper"),ga=p(async(e,t,r)=>{const i=r.useHtmlLabels??Tt(ot()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await se(a,jt(Je(t),ot()),{useHtmlLabels:i,width:r.width||ot()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Tt(ot())){const l=s.children[0],c=rt(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),Y=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),X=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function at(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(at,"createPathFromPoints");function ye(e,t,r,i,a,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(ye,"generateFullSineWavePoints");function Mr(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Mr,"generateCirclePoints");var hb=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,c=n):(a<0&&(o=-o),l=o,c=a===0?0:o*s/a),{x:r+l,y:i+c}},"intersectRect"),er=hb,ub=p(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=ot(),n=Tt(o);return await se(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ue=ub,Ce=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Yh=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Tt(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await se(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await ue(d,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Tt(r)){const T=g.children[0],F=rt(g);m=T.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const T=q.svg(u),F=H(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),P=T.path(Ce(b,k,y,x,0),F);v=u.insert(()=>(A.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:_}=Rs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const T=d.select("span");T&&T.attr("style",n)}const S=v.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return er(t,T)},{cluster:u,labelBBox:m}},"rect"),db=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return er(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),fb=p(async(e,t)=>{const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=await ue(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Tt(r)){const P=d.children[0],D=rt(d);g=P.getBoundingClientRect(),D.attr("width",g.width),D.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,v=t.x-x/2,_=t.y-b/2;t.width=x;const S=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),D=q.svg(c),E=t.rx||t.ry?D.path(Ce(v,_,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):D.rectangle(v,_,x,b,{seed:a});T=c.insert(()=>E,":first-child");const I=D.rectangle(v,S,x,k,{fill:P?s:o,fillStyle:P?"hachure":"solid",stroke:l,seed:a});T=c.insert(()=>E,":first-child"),f=c.insert(()=>I)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",v).attr("y",_).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",S).attr("width",x).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${_+1-(Tt(r)?0:3)})`);const F=T.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return er(t,P)},{cluster:c,labelBBox:g}},"roundedWithTitle"),pb=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Tt(r),d=u.insert("g").attr("class","cluster-label "),g=await se(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Tt(r)){const T=g.children[0],F=rt(g);m=T.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const T=q.svg(u),F=H(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),P=T.path(Ce(b,k,y,x,t.rx),F);v=u.insert(()=>(A.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:_}=Rs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const T=d.select("span");T&&T.attr("style",n)}const S=v.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return er(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),gb=p((e,t)=>{const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=q.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=o.insert(()=>y,":first-child")}else d=n.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return er(t,m)},{cluster:o,labelBBox:{}}},"divider"),mb=Yh,yb={rect:Yh,squareRect:mb,roundedWithTitle:fb,noteGroup:db,divider:gb,kanbanSection:pb},Gh=new Map,xb=p(async(e,t)=>{const r=t.shape||"rect",i=await yb[r](e,t);return Gh.set(t.id,i),i},"insertCluster"),r_=p(()=>{Gh=new Map},"clear");function Vh(e,t){return e.intersect(t)}p(Vh,"intersectNode");var bb=Vh;function Uh(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:a+c,y:s+h}}p(Uh,"intersectEllipse");var Xh=Uh;function Zh(e,t,r){return Xh(e,t,t,r)}p(Zh,"intersectCircle");var Cb=Zh;function Kh(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,c=1e-6;if(n!==0&&l!==0&&Ka(n,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&Ka(d,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}p(Kh,"intersectLine");function Ka(e,t){return e*t>0}p(Ka,"sameSign");var kb=Kh;function Qh(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=kb(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),s[0]):e}p(Qh,"intersectPolygon");var _b=Qh,N={node:bb,circle:Cb,ellipse:Xh,polygon:_b,rect:er};function Jh(e,t){const{labelStyles:r}=j(t);t.labelStyle=r;const i=X(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=q.svg(s),c=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",St(n)),Y(t,u),t.intersect=function(f){return A.info("Circle intersect",t,o,f),N.circle(t,o,f)},s}p(Jh,"anchor");function Qa(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/s,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),k=Math.atan2((t-b)/s,(e-x)/a);let _=Math.atan2((i-b)/s,(r-x)/a)-k;o&&_<0&&(_+=2*Math.PI),!o&&_>0&&(_-=2*Math.PI);const S=[];for(let T=0;T<20;T++){const F=T/19,P=k+F*_,D=x+a*Math.cos(P),E=b+s*Math.sin(P);S.push({x:D,y:E})}return S}p(Qa,"generateArcPoints");async function tu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=s.width+t.padding+20,n=s.height+t.padding,l=n/2,c=l/(2.5+n/50),{cssStyles:h}=t,u=[{x:o/2,y:-n/2},{x:-o/2,y:-n/2},...Qa(-o/2,-n/2,-o/2,n/2,c,l,!1),{x:o/2,y:n/2},...Qa(o/2,n/2,o/2,-n/2,c,l,!0)],f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=at(u),m=f.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Y(t,y),t.intersect=function(x){return N.polygon(t,u,x)},a}p(tu,"bowTieRect");function ne(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(ne,"insertPolygonShape");async function eu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=s.height+t.padding,n=12,l=s.width+t.padding+n,c=0,h=l,u=-o,f=0,d=[{x:c+n,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+n},{x:c+n,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=q.svg(a),x=H(t,{}),b=at(d),k=y.path(b,x);g=a.insert(()=>k,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=ne(a,l,o,d);return i&&g.attr("style",i),Y(t,g),t.intersect=function(y){return N.polygon(t,d,y)},a}p(eu,"card");function ru(e,t){const{nodeStyles:r}=j(t);t.label="";const i=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=q.svg(i),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=at(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return N.polygon(t,o,f)},i}p(ru,"choice");async function Ks(e,t,r){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await K(e,t,X(t)),l=r?.padding??n,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=q.svg(s),d=H(t,{}),g=f.circle(0,0,c*2,d);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",St(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return Y(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return N.circle(f,g,d)},t.intersect=function(f){return A.info("Circle intersect",t,c,f),N.circle(t,c,f)},s}p(Ks,"circle");function iu(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
185
+ `),s):jt(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Va(h,t.labelStyle),h.attr("class",`${c} ${i}`),Va(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),o.node()}p(Oh,"addHtmlSpan");function Qi(e,t,r,i=!1){const a=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&a.attr("text-anchor","middle"),a}p(Qi,"createTspan");function Ph(e,t,r){const i=e.append("text"),a=Qi(i,1,t);Ji(a,r);const s=a.node().getComputedTextLength();return i.remove(),s}p(Ph,"computeWidthOfText");function Vx(e,t,r){const i=e.append("text"),a=Qi(i,1,t);Ji(a,[{content:r,type:"normal"}]);const s=a.node()?.getBoundingClientRect();return s&&i.remove(),s}p(Vx,"computeDimensionOfText");function Ih(e,t,r,i=!1,a=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");a&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(d=>Ph(o,1.1,d)<=e,"checkWidth"),f=u(h)?[h]:Dh(h,u);for(const d of f){const g=Qi(l,c,1.1,a);Ji(g,d),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}p(Ih,"createFormattedText");function Ji(e,t){e.text(""),t.forEach((r,i)=>{const a=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?a.text(r.content):a.text(" "+r.content)})}p(Ji,"updateTextContentAndStyles");async function Rh(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(a,s,o)=>(r.push((async()=>{const n=`${s}:${o}`;return await Gx(n)?await zr(n,void 0,{class:"label-icon"}):`<i class='${jt(a,t).replace(":"," ")}'></i>`})()),a));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Rh,"replaceIconSubstring");var se=p(async(e,t="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:s=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(A.debug("XYZ createText",t,r,i,a,s,n,"addSvgBackground: ",c),s){const u=o?Ah(t,h):Mh(t),f=await Rh(Je(u),h),d=t.replace(/\\\\/g,"\\"),g={isNode:n,label:wr(t)?d:f,labelStyle:r.replace("fill:","color:")};return await Oh(e,g,l,a,c,h)}else{const u=t.replace(/<br\s*\/?>/g,"<br/>"),f=o?$h(u.replace("<br>","<br/>"),h):Lh(u),d=Ih(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(d).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");rt(d).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");rt(d).select("text").attr("style",m)}return i?rt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):rt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ha(e,t,r){if(e&&e.length){const[i,a]=t,s=Math.PI/180*r,o=Math.cos(s),n=Math.sin(s);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-a)*n+i,l[1]=(c-i)*n+(h-a)*o+a}}}function Ux(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xx(e,t,r,i=1){const a=r,s=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(a)for(const c of o)ha(c,n,a);const l=(function(c,h,u){const f=[];for(const b of c){const k=[...b];Ux(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let k=0;k<b.length-1;k++){const v=b[k],_=b[k+1];if(v[1]!==_[1]){const S=Math.min(v[1],_[1]);g.push({ymin:S,ymax:Math.max(v[1],_[1]),x:S===v[1]?v[0]:_[0],islope:(_[0]-v[0])/(_[1]-v[1])})}}if(g.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let k=0;k<g.length&&!(g[k].ymin>y);k++)b=k;g.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const v=m[b].edge,_=m[k].edge;d.push([[Math.round(v.x),y],[Math.round(_.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(o,s,i);if(a){for(const c of o)ha(c,n,-a);(function(c,h,u){const f=[];c.forEach((d=>f.push(...d))),ha(f,h,u)})(l,n,-a)}return l}function Wr(e,t){var r;const i=t.hachureAngle+90;let a=t.hachureGap;a<0&&(a=4*t.strokeWidth),a=Math.round(Math.max(a,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=a),Xx(e,a,i,s||1)}class Xs{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Wr(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const a of t)i.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return i}}function ta(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 Zx extends Xs{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const a=Wr(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,h]of a)ta([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class Kx extends Xs{fillPolygons(t,r){const i=this._fillPolygons(t,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,a);return i.ops=i.ops.concat(s.ops),i}}class Qx{constructor(t){this.helper=t}fillPolygons(t,r){const i=Wr(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const o=a/4;for(const n of t){const l=ta(n),c=l/a,h=Math.ceil(c)-1,u=l-h*a,f=(n[0][0]+n[1][0])/2-a/4,d=Math.min(n[0][1],n[1][1]);for(let g=0;g<h;g++){const m=d+u+g*a,y=f-o+2*Math.random()*o,x=m-o+2*Math.random()*o,b=this.helper.ellipse(y,x,s,s,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Jx{constructor(t){this.helper=t}fillPolygons(t,r){const i=Wr(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((o=>{const n=ta(o),l=Math.floor(n/(i+a)),c=(n+a-l*(i+a))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const g=d*(i+a),m=g+i,y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),s}}class tb{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?i:r.zigzagOffset,s=Wr(t,r=Object.assign({},r,{hachureGap:i+a}));return{type:"fillSketch",ops:this.zigzagLines(s,a,r)}}zigzagLines(t,r,i){const a=[];return t.forEach((s=>{const o=ta(s),n=Math.round(o/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const f=2*u*r,d=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];a.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),a}}const Ft={};class eb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const rb=0,ua=1,Vn=2,Vr={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 da(e,t){return e.type===t}function Zs(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:rb,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:ua,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Vn,text:""},n})(e);let i="BOD",a=0,s=r[a];for(;!da(s,Vn);){let o=0;const n=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return Zs("M0,0"+e);a++,o=Vr[s.text],i=s.text}else da(s,ua)?o=Vr[i]:(a++,o=Vr[s.text],i=s.text);if(!(a+o<r.length))throw new Error("Path data ended short");for(let l=a;l<a+o;l++){const c=r[l];if(!da(c,ua))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Vr[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),a+=o,s=r[a],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Nh(e){let t=0,r=0,i=0,a=0;const s=[];for(const{key:o,data:n}of e)switch(o){case"M":s.push({key:"M",data:[...n]}),[t,r]=n,[i,a]=n;break;case"m":t+=n[0],r+=n[1],s.push({key:"M",data:[t,r]}),i=t,a=r;break;case"L":s.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],s.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":s.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=a}return s}function zh(e){const t=[];let r="",i=0,a=0,s=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,a]=h,[s,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],a=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,a]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,a]});break;case"V":a=h[0],t.push({key:"L",data:[i,a]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-n),f=a+(a-l)):(u=i,f=a),t.push({key:"C",data:[u,f,...h]}),n=h[0],l=h[1],i=h[2],a=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-n),g=a+(a-l)):(d=i,g=a);const m=i+2*(d-i)/3,y=a+2*(g-a)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),n=d,l=g,i=u,a=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=a+2*(f-a)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),n=u,l=f,i=d,a=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,a,y,x,y,x]}),i=y,a=x):(i!==y||a!==x)&&(Wh(i,a,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,a=x);break}case"Z":t.push({key:"Z",data:[]}),i=s,a=o}r=c}return t}function lr(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Wh(e,t,r,i,a,s,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=lr(e,t,-h),[r,i]=lr(r,i,-h);const O=(e-r)/2,L=(t-i)/2;let B=O*O/(a*a)+L*L/(s*s);B>1&&(B=Math.sqrt(B),a*=B,s*=B);const w=a*a,M=s*s,$=w*M-w*L*L-M*O*O,z=w*L*L+M*O*O,G=(n===l?-1:1)*Math.sqrt(Math.abs($/z));m=G*a*L/s+(e+r)/2,y=G*-s*O/a+(t+i)/2,d=Math.asin(parseFloat(((t-y)/s).toFixed(9))),g=Math.asin(parseFloat(((i-y)/s).toFixed(9))),e<m&&(d=Math.PI-d),r<m&&(g=Math.PI-g),d<0&&(d=2*Math.PI+d),g<0&&(g=2*Math.PI+g),l&&d>g&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const O=g,L=r,B=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=Wh(r=m+a*Math.cos(g),i=y+s*Math.sin(g),L,B,a,s,o,0,l,[g,O,m,y])}x=g-d;const b=Math.cos(d),k=Math.sin(d),v=Math.cos(g),_=Math.sin(g),S=Math.tan(x/4),T=4/3*a*S,F=4/3*s*S,P=[e,t],D=[e+T*k,t-F*b],E=[r+T*_,i-F*v],I=[r,i];if(D[0]=2*P[0]-D[0],D[1]=2*P[1]-D[1],c)return[D,E,I].concat(f);{f=[D,E,I].concat(f);const O=[];for(let L=0;L<f.length;L+=3){const B=lr(f[L][0],f[L][1],h),w=lr(f[L+1][0],f[L+1][1],h),M=lr(f[L+2][0],f[L+2][1],h);O.push([B[0],B[1],w[0],w[1],M[0],M[1]])}return O}}const ib={randOffset:function(e,t){return Q(e,t)},randOffsetWithRange:function(e,t,r){return Mi(e,t,r)},ellipse:function(e,t,r,i,a){const s=Hh(r,i,a);return Ua(e,t,a,s).opset},doubleLineOps:function(e,t,r,i,a){return me(e,t,r,i,a,!0)}};function qh(e,t,r,i,a){return{type:"path",ops:me(e,t,r,i,a)}}function ri(e,t,r){const i=(e||[]).length;if(i>2){const a=[];for(let s=0;s<i-1;s++)a.push(...me(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&a.push(...me(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:a}}return i===2?qh(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function ab(e,t,r,i,a){return(function(s,o){return ri(s,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],a)}function Un(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ur(r[0],1*(1+.2*t.roughness),t),a=t.disableMultiStroke?[]:Ur(r[0],1.5*(1+.22*t.roughness),Kn(t));for(let s=1;s<r.length;s++){const o=r[s];if(o.length){const n=Ur(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ur(o,1.5*(1+.22*t.roughness),Kn(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&a.push(c)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function Hh(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/a;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=Q(o*l,r),n+=Q(n*l,r),{increment:s,rx:o,ry:n}}function Ua(e,t,r,i){const[a,s]=Qn(i.increment,e,t,i.rx,i.ry,1,i.increment*Mi(.1,Mi(.4,1,r),r),r);let o=Ai(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Qn(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ai(n,null,r);o=o.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:o}}}function Xn(e,t,r,i,a,s,o,n,l){const c=e,h=t;let u=Math.abs(r/2),f=Math.abs(i/2);u+=Q(.01*u,l),f+=Q(.01*f,l);let d=a,g=s;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Jn(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Jn(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return o&&(n?x.push(...me(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...me(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Zn(e,t){const r=zh(Nh(Zs(e))),i=[];let a=[0,0],s=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":s=[n[0],n[1]],a=[n[0],n[1]];break;case"L":i.push(...me(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]];break;case"C":{const[l,c,h,u,f,d]=n;i.push(...sb(l,c,h,u,f,d,s,t)),s=[f,d];break}case"Z":i.push(...me(s[0],s[1],a[0],a[1],t)),s=[a[0],a[1]]}return{type:"path",ops:i}}function fa(e,t){const r=[];for(const i of e)if(i.length){const a=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Q(a,t),i[0][1]+Q(a,t)]});for(let o=1;o<s;o++)r.push({op:"lineTo",data:[i[o][0]+Q(a,t),i[o][1]+Q(a,t)]})}}return{type:"fillPath",ops:r}}function Ne(e,t){return(function(r,i){let a=r.fillStyle||"hachure";if(!Ft[a])switch(a){case"zigzag":Ft[a]||(Ft[a]=new Zx(i));break;case"cross-hatch":Ft[a]||(Ft[a]=new Kx(i));break;case"dots":Ft[a]||(Ft[a]=new Qx(i));break;case"dashed":Ft[a]||(Ft[a]=new Jx(i));break;case"zigzag-line":Ft[a]||(Ft[a]=new tb(i));break;default:a="hachure",Ft[a]||(Ft[a]=new Xs(i))}return Ft[a]})(t,ib).fillPolygons(e,t)}function Kn(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function jh(e){return e.randomizer||(e.randomizer=new eb(e.seed||0)),e.randomizer.next()}function Mi(e,t,r,i=1){return r.roughness*i*(jh(r)*(t-e)+e)}function Q(e,t,r=1){return Mi(-e,e,t,r)}function me(e,t,r,i,a,s=!1){const o=s?a.disableMultiStrokeFill:a.disableMultiStroke,n=Xa(e,t,r,i,a,!0,!1);if(o)return n;const l=Xa(e,t,r,i,a,!0,!0);return n.concat(l)}function Xa(e,t,r,i,a,s,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=a.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,f=.2+.2*jh(a);let d=a.bowing*a.maxRandomnessOffset*(i-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-r)/200;d=Q(d,a,c),g=Q(g,a,c);const m=[],y=()=>Q(u,a,c),x=()=>Q(h,a,c),b=a.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:Q(h,a,c)),t+(b?0:Q(h,a,c))]}),o?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Ur(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]),i.push([e[0][0]+Q(t,r),e[0][1]+Q(t,r)]);for(let a=1;a<e.length;a++)i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]),a===e.length-1&&i.push([e[a][0]+Q(t,r),e[a][1]+Q(t,r)]);return Ai(i,null,r)}function Ai(e,t,r){const i=e.length,a=[];if(i>3){const s=[],o=1-r.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],s[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],s[3]=[e[n+1][0],e[n+1][1]],a.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&a.push(...Xa(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return a}function Qn(e,t,r,i,a,s,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+a*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+a*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+a*Math.sin(0)]),c.push([t+i*Math.cos(e),r+a*Math.sin(e)])}else{const h=Q(.5,n)-Math.PI/2;c.push([Q(s,n)+t+.9*i*Math.cos(h-e),Q(s,n)+r+.9*a*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=e){const d=[Q(s,n)+t+i*Math.cos(f),Q(s,n)+r+a*Math.sin(f)];l.push(d),c.push(d)}c.push([Q(s,n)+t+i*Math.cos(h+2*Math.PI+.5*o),Q(s,n)+r+a*Math.sin(h+2*Math.PI+.5*o)]),c.push([Q(s,n)+t+.98*i*Math.cos(h+o),Q(s,n)+r+.98*a*Math.sin(h+o)]),c.push([Q(s,n)+t+.9*i*Math.cos(h+.5*o),Q(s,n)+r+.9*a*Math.sin(h+.5*o)])}return[c,l]}function Jn(e,t,r,i,a,s,o,n,l){const c=s+Q(.1,l),h=[];h.push([Q(n,l)+t+.9*i*Math.cos(c-e),Q(n,l)+r+.9*a*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([Q(n,l)+t+i*Math.cos(u),Q(n,l)+r+a*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),h.push([t+i*Math.cos(o),r+a*Math.sin(o)]),Ai(h,null,l)}function sb(e,t,r,i,a,s,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(f?0:Q(c[0],n)),o[1]+(f?0:Q(c[0],n))]}),h=f?[a,s]:[a+Q(c[d],n),s+Q(c[d],n)],l.push({op:"bcurveTo",data:[e+Q(c[d],n),t+Q(c[d],n),r+Q(c[d],n),i+Q(c[d],n),h[0],h[1]]});return l}function cr(e){return[...e]}function to(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(cr(e[0]),cr(e[1]),cr(e[2]),cr(e[2]));else{const a=[];a.push(e[0],e[0]);for(let n=1;n<e.length;n++)a.push(e[n]),n===e.length-1&&a.push(e[n]);const s=[],o=1-t;i.push(cr(a[0]));for(let n=1;n+2<a.length;n++){const l=a[n];s[0]=[l[0],l[1]],s[1]=[l[0]+(o*a[n+1][0]-o*a[n-1][0])/6,l[1]+(o*a[n+1][1]-o*a[n-1][1])/6],s[2]=[a[n+1][0]+(o*a[n][0]-o*a[n+2][0])/6,a[n+1][1]+(o*a[n][1]-o*a[n+2][1])/6],s[3]=[a[n+1][0],a[n+1][1]],i.push(s[1],s[2],s[3])}}return i}function ii(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function nb(e,t,r){const i=ii(t,r);if(i===0)return ii(e,t);let a=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return a=Math.max(0,Math.min(1,a)),ii(e,we(t,r,a))}function we(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Za(e,t,r,i){const a=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],f=n[l+3];let d=3*h[0]-2*c[0]-f[0];d*=d;let g=3*h[1]-2*c[1]-f[1];g*=g;let m=3*u[0]-2*f[0]-c[0];m*=m;let y=3*u[1]-2*f[1]-c[1];return y*=y,d<m&&(d=m),g<y&&(g=y),d+g})(e,t)<r){const n=e[t+0];a.length?(s=a[a.length-1],o=n,Math.sqrt(ii(s,o))>1&&a.push(n)):a.push(n),a.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=we(l,c,.5),d=we(c,h,.5),g=we(h,u,.5),m=we(f,d,.5),y=we(d,g,.5),x=we(m,y,.5);Za([l,f,m,x],0,r,a),Za([x,y,g,u],0,r,a)}var s,o;return a}function ob(e,t){return Fi(e,0,e.length,t)}function Fi(e,t,r,i,a){const s=a||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=nb(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(Fi(e,t,c+1,i,s),Fi(e,c,r,i,s)):(s.length||s.push(o),s.push(n)),s}function pa(e,t=.15,r){const i=[],a=(e.length-1)/3;for(let s=0;s<a;s++)Za(e,3*s,t,i);return r&&r>0?Fi(i,0,i.length,r):i}const Ot="none";class Ei{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,a,s){const o=this._o(s);return this._d("line",[qh(t,r,i,a,o)],o)}rectangle(t,r,i,a,s){const o=this._o(s),n=[],l=ab(t,r,i,a,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+a],[t,r+a]];o.fillStyle==="solid"?n.push(fa([c],o)):n.push(Ne([c],o))}return o.stroke!==Ot&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,a,s){const o=this._o(s),n=[],l=Hh(i,a,o),c=Ua(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Ua(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(Ne([c.estimatedPoints],o));return o.stroke!==Ot&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,a){const s=this.ellipse(t,r,i,i,a);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ri(t,!1,i)],i)}arc(t,r,i,a,s,o,n=!1,l){const c=this._o(l),h=[],u=Xn(t,r,i,a,s,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Xn(t,r,i,a,s,o,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const k=f,v=d;let _=Math.abs(g/2),S=Math.abs(m/2);_+=Q(.01*_,b),S+=Q(.01*S,b);let T=y,F=x;for(;T<0;)T+=2*Math.PI,F+=2*Math.PI;F-T>2*Math.PI&&(T=0,F=2*Math.PI);const P=(F-T)/b.curveStepCount,D=[];for(let E=T;E<=F;E+=P)D.push([k+_*Math.cos(E),v+S*Math.sin(E)]);return D.push([k+_*Math.cos(F),v+S*Math.sin(F)]),D.push([k,v]),Ne([D],b)})(t,r,i,a,s,o,c));return c.stroke!==Ot&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),a=[],s=Un(t,i);if(i.fill&&i.fill!==Ot)if(i.fillStyle==="solid"){const o=Un(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...pa(to([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...pa(to(c),10,(1+i.roughness)/2))}o.length&&a.push(Ne([o],i))}return i.stroke!==Ot&&a.push(s),this._d("curve",a,i)}polygon(t,r){const i=this._o(r),a=[],s=ri(t,!0,i);return i.fill&&(i.fillStyle==="solid"?a.push(fa([t],i)):a.push(Ne([t],i))),i.stroke!==Ot&&a.push(s),this._d("polygon",a,i)}path(t,r){const i=this._o(r),a=[];if(!t)return this._d("path",a,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Ot,o=i.stroke!==Ot,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const d=zh(Nh(Zs(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...pa(x,u)),x=[]},k=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:_,data:S}of d)switch(_){case"M":k(),y=[S[0],S[1]],m.push(y);break;case"L":b(),m.push([S[0],S[1]]);break;case"C":if(!x.length){const T=m.length?m[m.length-1]:y;x.push([T[0],T[1]])}x.push([S[0],S[1]]),x.push([S[2],S[3]]),x.push([S[4],S[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return g;const v=[];for(const _ of g){const S=ob(_,f);S.length&&v.push(S)}return v})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Zn(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const h=Zn(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else a.push(fa(l,i));else a.push(Ne(l,i));return o&&(n?l.forEach((h=>{a.push(ri(h,!1,i))})):a.push(c)),this._d("path",a,i)}opsToPath(t,r){let i="";for(const a of t.ops){const s=typeof r=="number"&&r>=0?a.data.map((o=>+o.toFixed(r))):a.data;switch(a.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,a=[];for(const s of r){let o=null;switch(s.type){case"path":o={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ot};break;case"fillPath":o={d:this.opsToPath(s),stroke:Ot,strokeWidth:0,fill:i.fill||Ot};break;case"fillSketch":o=this.fillSketch(s,i)}o&&a.push(o)}return a}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ot,strokeWidth:i,fill:Ot}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class lb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ei(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":a.save(),a.strokeStyle=i.stroke==="none"?"transparent":i.stroke,a.lineWidth=i.strokeWidth,i.strokeLineDash&&a.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(a.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(a,o,s),a.restore();break;case"fillPath":{a.save(),a.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,o,s,n),a.restore();break}case"fillSketch":this.fillSketch(a,o,i)}}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=a,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,a="nonzero"){t.beginPath();for(const s of r.ops){const o=typeof i=="number"&&i>=0?s.data.map((n=>+n.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(a):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o),o}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o),o}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o),o}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Xr="http://www.w3.org/2000/svg";class cb{constructor(t,r){this.svg=t,this.gen=new Ei(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,s=a.createElementNS(Xr,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=a.createElementNS(Xr,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=a.createElementNS(Xr,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(a,n,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let a=i.fillWeight;a<0&&(a=i.strokeWidth/2);const s=t.createElementNS(Xr,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",a+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,a,s){const o=this.gen.line(t,r,i,a,s);return this.draw(o)}rectangle(t,r,i,a,s){const o=this.gen.rectangle(t,r,i,a,s);return this.draw(o)}ellipse(t,r,i,a,s){const o=this.gen.ellipse(t,r,i,a,s);return this.draw(o)}circle(t,r,i,a){const s=this.gen.circle(t,r,i,a);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,a,s,o,n=!1,l){const c=this.gen.arc(t,r,i,a,s,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var q={canvas:(e,t)=>new lb(e,t),svg:(e,t)=>new cb(e,t),generator:e=>new Ei(e),newSeed:()=>Ei.newSeed()},K=p(async(e,t,r)=>{let i;const a=t.useHtmlLabels||xe(ot()?.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",St(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await se(o,jt(Je(n),ot()),{useHtmlLabels:a,width:t.width||ot().flowchart?.wrappingWidth,cssClasses:c?"markdown-node-label":void 0,style:t.labelStyle,addSvgBackground:l,markdown:c},ot());let u=h.getBBox();const f=(t?.padding??0)/2;if(a){const d=h.children[0],g=rt(h);await hh(d,n),u=d.getBoundingClientRect(),g.attr("width",u.width),g.attr("height",u.height)}return a?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:u,halfPadding:f,label:o}},"labelHelper"),ga=p(async(e,t,r)=>{const i=r.useHtmlLabels??Tt(ot()),a=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await se(a,jt(Je(t),ot()),{useHtmlLabels:i,width:r.width||ot()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=s.getBBox();const n=r.padding/2;if(Tt(ot())){const l=s.children[0],c=rt(s);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}return i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:a}},"insertLabel"),Y=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),X=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function at(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(at,"createPathFromPoints");function ye(e,t,r,i,a,s){const o=[],l=r-e,c=i-t,h=l/s,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+a*Math.sin(u*(m-e));o.push({x:m,y})}return o}p(ye,"generateFullSineWavePoints");function Mr(e,t,r,i,a,s){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Mr,"generateCirclePoints");var hb=p((e,t)=>{var r=e.x,i=e.y,a=t.x-r,s=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(s)*o>Math.abs(a)*n?(s<0&&(n=-n),l=s===0?0:n*a/s,c=n):(a<0&&(o=-o),l=o,c=a===0?0:o*s/a),{x:r+l,y:i+c}},"intersectRect"),er=hb,ub=p(async(e,t,r,i=!1,a=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const o=ot(),n=Tt(o);return await se(e,s,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ue=ub,Ce=p((e,t,r,i,a)=>["M",e+a,t,"H",e+r-a,"A",a,a,0,0,1,e+r,t+a,"V",t+i-a,"A",a,a,0,0,1,e+r-a,t+i,"H",e+a,"A",a,a,0,0,1,e,t+i-a,"V",t+a,"A",a,a,0,0,1,e+a,t,"Z"].join(" "),"createRoundedRectPathD"),Yh=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Tt(r),d=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await se(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):g=await ue(d,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Tt(r)){const T=g.children[0],F=rt(g);m=T.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const T=q.svg(u),F=H(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),P=T.path(Ce(b,k,y,x,0),F);v=u.insert(()=>(A.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:_}=Rs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const T=d.select("span");T&&T.attr("style",n)}const S=v.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return er(t,T)},{cluster:u,labelBBox:m}},"rect"),db=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),a=0*t.padding,s=a/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+a).attr("height",t.height+a).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return er(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),fb=p(async(e,t)=>{const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=await ue(u,t.label,t.labelStyle,void 0,!0);let g=d.getBBox();if(Tt(r)){const P=d.children[0],D=rt(d);g=P.getBoundingClientRect(),D.attr("width",g.width),D.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-g.height-6,v=t.x-x/2,_=t.y-b/2;t.width=x;const S=t.y-t.height/2-y+g.height+2;let T;if(t.look==="handDrawn"){const P=t.cssClasses.includes("statediagram-cluster-alt"),D=q.svg(c),E=t.rx||t.ry?D.path(Ce(v,_,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:a}):D.rectangle(v,_,x,b,{seed:a});T=c.insert(()=>E,":first-child");const I=D.rectangle(v,S,x,k,{fill:P?s:o,fillStyle:P?"hachure":"solid",stroke:l,seed:a});T=c.insert(()=>E,":first-child"),f=c.insert(()=>I)}else T=h.insert("rect",":first-child"),T.attr("class","outer").attr("x",v).attr("y",_).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",S).attr("width",x).attr("height",k);u.attr("transform",`translate(${t.x-g.width/2}, ${_+1-(Tt(r)?0:3)})`);const F=T.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(P){return er(t,P)},{cluster:c,labelBBox:g}},"roundedWithTitle"),pb=p(async(e,t)=>{A.info("Creating subgraph rect for ",t.id,t);const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:s,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=j(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Tt(r),d=u.insert("g").attr("class","cluster-label "),g=await se(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Tt(r)){const T=g.children[0],F=rt(g);m=T.getBoundingClientRect(),F.attr("width",m.width),F.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;A.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const T=q.svg(u),F=H(t,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),P=T.path(Ce(b,k,y,x,t.rx),F);v=u.insert(()=>(A.debug("Rough node insert CXC",P),P),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:_}=Rs(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+_})`),n){const T=d.select("span");T&&T.attr("style",n)}const S=v.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=m.height-t.padding/2,t.intersect=function(T){return er(t,T)},{cluster:u,labelBBox:m}},"kanbanSection"),gb=p((e,t)=>{const r=ot(),{themeVariables:i,handDrawnSeed:a}=r,{nodeBorder:s}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=q.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:a});d=o.insert(()=>y,":first-child")}else d=n.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return er(t,m)},{cluster:o,labelBBox:{}}},"divider"),mb=Yh,yb={rect:Yh,squareRect:mb,roundedWithTitle:fb,noteGroup:db,divider:gb,kanbanSection:pb},Gh=new Map,xb=p(async(e,t)=>{const r=t.shape||"rect",i=await yb[r](e,t);return Gh.set(t.id,i),i},"insertCluster"),e_=p(()=>{Gh=new Map},"clear");function Vh(e,t){return e.intersect(t)}p(Vh,"intersectNode");var bb=Vh;function Uh(e,t,r,i){var a=e.x,s=e.y,o=a-i.x,n=s-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<a&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<s&&(h=-h),{x:a+c,y:s+h}}p(Uh,"intersectEllipse");var Xh=Uh;function Zh(e,t,r){return Xh(e,t,t,r)}p(Zh,"intersectCircle");var Cb=Zh;function Kh(e,t,r,i){{const a=t.y-e.y,s=e.x-t.x,o=t.x*e.y-e.x*t.y,n=a*r.x+s*r.y+o,l=a*i.x+s*i.y+o,c=1e-6;if(n!==0&&l!==0&&Ka(n,l))return;const h=i.y-r.y,u=r.x-i.x,f=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+f,g=h*t.x+u*t.y+f;if(Math.abs(d)<c&&Math.abs(g)<c&&Ka(d,g))return;const m=a*u-h*s;if(m===0)return;const y=Math.abs(m/2);let x=s*f-u*o;const b=x<0?(x-y)/m:(x+y)/m;x=h*o-a*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}p(Kh,"intersectLine");function Ka(e,t){return e*t>0}p(Ka,"sameSign");var kb=Kh;function Qh(e,t,r){let i=e.x,a=e.y,s=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=a-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],f=t[h<t.length-1?h+1:0],d=kb(e,r,{x:l+u.x,y:c+u.y},{x:l+f.x,y:c+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),s[0]):e}p(Qh,"intersectPolygon");var _b=Qh,N={node:bb,circle:Cb,ellipse:Xh,polygon:_b,rect:er};function Jh(e,t){const{labelStyles:r}=j(t);t.labelStyle=r;const i=X(t);let a=i;i||(a="anchor");const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=q.svg(s),c=H(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=s.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",St(n)),Y(t,u),t.intersect=function(f){return A.info("Circle intersect",t,o,f),N.circle(t,o,f)},s}p(Jh,"anchor");function Qa(e,t,r,i,a,s,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/a,g=f/s,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*s*Math.sin(h)*(o?-1:1),b=c-y*a*Math.cos(h)*(o?-1:1),k=Math.atan2((t-b)/s,(e-x)/a);let _=Math.atan2((i-b)/s,(r-x)/a)-k;o&&_<0&&(_+=2*Math.PI),!o&&_>0&&(_-=2*Math.PI);const S=[];for(let T=0;T<20;T++){const F=T/19,P=k+F*_,D=x+a*Math.cos(P),E=b+s*Math.sin(P);S.push({x:D,y:E})}return S}p(Qa,"generateArcPoints");async function tu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=s.width+t.padding+20,n=s.height+t.padding,l=n/2,c=l/(2.5+n/50),{cssStyles:h}=t,u=[{x:o/2,y:-n/2},{x:-o/2,y:-n/2},...Qa(-o/2,-n/2,-o/2,n/2,c,l,!1),{x:o/2,y:n/2},...Qa(o/2,n/2,o/2,-n/2,c,l,!0)],f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=at(u),m=f.path(g,d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),Y(t,y),t.intersect=function(x){return N.polygon(t,u,x)},a}p(tu,"bowTieRect");function ne(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(ne,"insertPolygonShape");async function eu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=s.height+t.padding,n=12,l=s.width+t.padding+n,c=0,h=l,u=-o,f=0,d=[{x:c+n,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+n},{x:c+n,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=q.svg(a),x=H(t,{}),b=at(d),k=y.path(b,x);g=a.insert(()=>k,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=ne(a,l,o,d);return i&&g.attr("style",i),Y(t,g),t.intersect=function(y){return N.polygon(t,d,y)},a}p(eu,"card");function ru(e,t){const{nodeStyles:r}=j(t);t.label="";const i=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(28,t.width??0),o=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=q.svg(i),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=at(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return N.polygon(t,o,f)},i}p(ru,"choice");async function Ks(e,t,r){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{shapeSvg:s,bbox:o,halfPadding:n}=await K(e,t,X(t)),l=r?.padding??n,c=o.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=q.svg(s),d=H(t,{}),g=f.circle(0,0,c*2,d);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",St(u))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",c).attr("cx",0).attr("cy",0);return Y(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return N.circle(f,g,d)},t.intersect=function(f){return A.info("Circle intersect",t,c,f),N.circle(t,c,f)},s}p(Ks,"circle");function iu(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,a={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${n.x},${n.y}
186
186
  M ${a.x},${a.y} L ${o.x},${o.y}`}p(iu,"createLine");function au(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r,t.label="";const a=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),s=Math.max(30,t?.width??0),{cssStyles:o}=t,n=q.svg(a),l=H(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,s*2,l),h=iu(s),u=n.path(h,l),f=a.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Y(t,f),t.intersect=function(d){return A.info("crossedCircle intersect",t,{radius:s,point:d}),N.circle(t,s,d)},a}p(au,"crossedCircle");function Qt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(Qt,"generateCirclePoints");async function su(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Qt(n/2,-l/2,c,30,-90,0),{x:-n/2-c,y:c},...Qt(n/2+c*2,-c,c,20,-180,-270),...Qt(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:-l/2},...Qt(n/2,l/2,c,20,0,90)],f=[{x:n/2,y:-l/2-c},{x:-n/2,y:-l/2-c},...Qt(n/2,-l/2,c,20,-90,0),{x:-n/2-c,y:-c},...Qt(n/2+n*.1,-c,c,20,-180,-270),...Qt(n/2+n*.1,c,c,20,-90,-180),{x:-n/2-c,y:l/2},...Qt(n/2,l/2,c,20,0,90),{x:-n/2,y:l/2+c},{x:n/2,y:l/2+c}],d=q.svg(a),g=H(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=at(u).replace("Z",""),x=d.path(y,g),b=at(f),k=d.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>k,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-n/2+c-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,v),t.intersect=function(_){return N.polygon(t,f,_)},a}p(su,"curlyBraceLeft");function Jt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:d,y:g})}return o}p(Jt,"generateCirclePoints");async function nu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Jt(n/2,-l/2,c,20,-90,0),{x:n/2+c,y:-c},...Jt(n/2+c*2,-c,c,20,-180,-270),...Jt(n/2+c*2,c,c,20,-90,-180),{x:n/2+c,y:l/2},...Jt(n/2,l/2,c,20,0,90)],f=[{x:-n/2,y:-l/2-c},{x:n/2,y:-l/2-c},...Jt(n/2,-l/2,c,20,-90,0),{x:n/2+c,y:-c},...Jt(n/2+c*2,-c,c,20,-180,-270),...Jt(n/2+c*2,c,c,20,-90,-180),{x:n/2+c,y:l/2},...Jt(n/2,l/2,c,20,0,90),{x:n/2,y:l/2+c},{x:-n/2,y:l/2+c}],d=q.svg(a),g=H(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=at(u).replace("Z",""),x=d.path(y,g),b=at(f),k=d.path(b,{...g}),v=a.insert("g",":first-child");return v.insert(()=>k,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,v),t.intersect=function(_){return N.polygon(t,f,_)},a}p(nu,"curlyBraceRight");function xt(e,t,r,i=100,a=0,s=180){const o=[],n=a*Math.PI/180,h=(s*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const f=n+u*h,d=e+r*Math.cos(f),g=t+r*Math.sin(f);o.push({x:-d,y:-g})}return o}p(xt,"generateCirclePoints");async function ou(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=s.width+(t.padding??0),l=s.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...xt(n/2,-l/2,c,30,-90,0),{x:-n/2-c,y:c},...xt(n/2+c*2,-c,c,20,-180,-270),...xt(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:-l/2},...xt(n/2,l/2,c,20,0,90)],f=[...xt(-n/2+c+c/2,-l/2,c,20,-90,-180),{x:n/2-c/2,y:c},...xt(-n/2-c/2,-c,c,20,0,90),...xt(-n/2-c/2,c,c,20,-90,0),{x:n/2-c/2,y:-c},...xt(-n/2+c+c/2,l/2,c,30,-180,-270)],d=[{x:n/2,y:-l/2-c},{x:-n/2,y:-l/2-c},...xt(n/2,-l/2,c,20,-90,0),{x:-n/2-c,y:-c},...xt(n/2+c*2,-c,c,20,-180,-270),...xt(n/2+c*2,c,c,20,-90,-180),{x:-n/2-c,y:l/2},...xt(n/2,l/2,c,20,0,90),{x:-n/2,y:l/2+c},{x:n/2-c-c/2,y:l/2+c},...xt(-n/2+c+c/2,-l/2,c,20,-90,-180),{x:n/2-c/2,y:c},...xt(-n/2-c/2,-c,c,20,0,90),...xt(-n/2-c/2,c,c,20,-90,0),{x:n/2-c/2,y:-c},...xt(-n/2+c+c/2,l/2,c,30,-180,-270)],g=q.svg(a),m=H(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=at(u).replace("Z",""),b=g.path(x,m),v=at(f).replace("Z",""),_=g.path(v,m),S=at(d),T=g.path(S,{...m}),F=a.insert("g",":first-child");return F.insert(()=>T,":first-child").attr("stroke-opacity",0),F.insert(()=>b,":first-child"),F.insert(()=>_,":first-child"),F.attr("class","text"),h&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-n/2+(t.padding??0)/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,F),t.intersect=function(P){return N.polygon(t,d,P)},a}p(ou,"curlyBraces");async function lu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=80,n=20,l=Math.max(o,(s.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(n,s.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Mr(-y,-m/2,h,50,270,90)],k=at(b),v=f.path(k,d),_=a.insert(()=>v,":first-child");return _.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(${-l/2}, ${-c/2})`),Y(t,_),t.intersect=function(S){return N.polygon(t,b,S)},a}p(lu,"curvedTrapezoid");var wb=p((e,t,r,i,a,s)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),vb=p((e,t,r,i,a,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Sb=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function cu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+t.padding,t.width??0),l=n/2,c=l/(2.5+n/50),h=Math.max(s.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=q.svg(a),g=vb(0,0,n,h,l,c),m=Sb(0,c,n,h,l,c),y=d.path(g,H(t,{})),x=d.path(m,H(t,{fill:"none"}));u=a.insert(()=>x,":first-child"),u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=wb(0,0,n,h,l,c);u=a.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",St(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-n/2}, ${-(h/2+c)})`),Y(t,u),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(t.padding??0)/1.5-(s.y-(s.top??0))})`),t.intersect=function(d){const g=N.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},a}p(cu,"cylinder");async function hu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=s.width+t.padding,l=s.height+t.padding,c=l*.2,h=-n/2,u=-l/2-c/2,{cssStyles:f}=t,d=q.svg(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(s.x-(s.left??0))}, ${u+c+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(b){return N.rect(t,b)},a}p(hu,"dividedRectangle");async function uu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:o}=await K(e,t,X(t)),l=s.width/2+o+5,c=s.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=q.svg(a),d=H(t,{roughness:.2,strokeWidth:2.5}),g=H(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,g);h=a.insert("g",":first-child"),h.attr("class",St(t.cssClasses)).attr("style",St(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=a.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Y(t,h),t.intersect=function(f){return A.info("DoubleCircle intersect",t,l,f),N.circle(t,l,f)},a}p(uu,"doublecircle");function du(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=j(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=q.svg(s),{nodeBorder:c}=r,h=H(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),Y(t,f),t.intersect=function(d){return A.info("filledCircle intersect",t,{radius:o,point:d}),N.circle(t,o,d)},s}p(du,"filledCircle");async function fu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=s.width+(t.padding??0),l=n+s.height,c=n+s.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=at(h),m=f.path(g,d),y=a.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=n,t.height=l,Y(t,y),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(x){return A.info("Triangle intersect",t,h,x),N.polygon(t,h,x)},a}p(fu,"flippedTriangle");function pu(e,t,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=j(t);t.label="";const o=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=q.svg(o),d=H(t,{stroke:a.lineColor,fill:a.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=o.insert(()=>g,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),Y(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return N.rect(t,x)},o}p(pu,"forkJoin");async function gu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const a=80,s=50,{shapeSvg:o,bbox:n}=await K(e,t,X(t)),l=Math.max(a,n.width+(t.padding??0)*2,t?.width??0),c=Math.max(s,n.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=q.svg(o),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Mr(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=at(g),y=f.path(m,d),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Y(t,x),t.intersect=function(b){return A.info("Pill intersect",t,{radius:h,point:b}),N.polygon(t,g,b)},o}p(gu,"halfRoundedRectangle");var Tb=p((e,t,r,i,a)=>[`M${e+a},${t}`,`L${e+r-a},${t}`,`L${e+r},${t-i/2}`,`L${e+r-a},${t-i}`,`L${e+a},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function mu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=4,n=s.height+t.padding,l=n/o,c=s.width+2*l+t.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-n/2},{x:c-l,y:-n},{x:l,y:-n},{x:0,y:-n/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=q.svg(a),g=H(t,{}),m=Tb(0,0,c,n,l),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${n/2})`),f&&u.attr("style",f)}else u=ne(a,c,n,h);return i&&u.attr("style",i),t.width=c,t.height=n,Y(t,u),t.intersect=function(d){return N.polygon(t,h,d)},a}p(mu,"hexagon");async function yu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.label="",t.labelStyle=r;const{shapeSvg:a}=await K(e,t,X(t)),s=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:n}=t,l=q.svg(a),c=H(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:o},{x:s,y:o}],u=at(h),f=l.path(u,c),d=a.insert(()=>f,":first-child");return d.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-o/2})`),Y(t,d),t.intersect=function(g){return A.info("Pill intersect",t,{points:h}),N.polygon(t,h,g)},a}p(yu,"hourglass");async function xu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await K(e,t,"icon-shape default"),f=t.pos==="t",d=n,g=n,{nodeBorder:m}=r,{stylesMap:y}=tr(t),x=-g/2,b=-d/2,k=t.label?8:0,v=q.svg(c),_=H(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const S=v.rectangle(x,b,g,d,_),T=Math.max(g,h.width),F=d+h.height+k,P=v.rectangle(-T/2,-F/2,T,F,{..._,fill:"transparent",stroke:"none"}),D=c.insert(()=>S,":first-child"),E=c.insert(()=>P);if(t.icon){const I=c.append("g");I.html(`<g>${await zr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const O=I.node().getBBox(),L=O.width,B=O.height,w=O.x,M=O.y;I.attr("transform",`translate(${-L/2-w},${f?h.height/2+k/2-B/2-M:-h.height/2-k/2-B/2-M})`),I.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-F/2:F/2-h.height})`),D.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),Y(t,E),t.intersect=function(I){if(A.info("iconSquare intersect",t,I),!t.label)return N.rect(t,I);const O=t.x??0,L=t.y??0,B=t.height??0;let w=[];return f?w=[{x:O-h.width/2,y:L-B/2},{x:O+h.width/2,y:L-B/2},{x:O+h.width/2,y:L-B/2+h.height+k},{x:O+g/2,y:L-B/2+h.height+k},{x:O+g/2,y:L+B/2},{x:O-g/2,y:L+B/2},{x:O-g/2,y:L-B/2+h.height+k},{x:O-h.width/2,y:L-B/2+h.height+k}]:w=[{x:O-g/2,y:L-B/2},{x:O+g/2,y:L-B/2},{x:O+g/2,y:L-B/2+d},{x:O+h.width/2,y:L-B/2+d},{x:O+h.width/2/2,y:L+B/2},{x:O-h.width/2,y:L+B/2},{x:O-h.width/2,y:L-B/2+d},{x:O-g/2,y:L-B/2+d}],N.polygon(t,w,I)},c}p(xu,"icon");async function bu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await K(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=tr(t),b=q.svg(c),k=H(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=x.get("fill");k.stroke=v??y;const _=c.append("g");t.icon&&_.html(`<g>${await zr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const S=_.node().getBBox(),T=S.width,F=S.height,P=S.x,D=S.y,E=Math.max(T,F)*Math.SQRT2+f*2,I=b.circle(0,0,E,k),O=Math.max(E,h.width),L=E+h.height+d,B=b.rectangle(-O/2,-L/2,O,L,{...k,fill:"transparent",stroke:"none"}),w=c.insert(()=>I,":first-child"),M=c.insert(()=>B);return _.attr("transform",`translate(${-T/2-P},${g?h.height/2+d/2-F/2-D:-h.height/2-d/2-F/2-D})`),_.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-L/2:L/2-h.height})`),w.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),Y(t,M),t.intersect=function($){return A.info("iconSquare intersect",t,$),N.rect(t,$)},c}p(bu,"iconCircle");async function Cu(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await K(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=tr(t),k=-m/2,v=-g/2,_=t.label?8:0,S=q.svg(c),T=H(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const F=b.get("fill");T.stroke=F??x;const P=S.path(Ce(k,v,m,g,5),T),D=Math.max(m,h.width),E=g+h.height+_,I=S.rectangle(-D/2,-E/2,D,E,{...T,fill:"transparent",stroke:"none"}),O=c.insert(()=>P,":first-child").attr("class","icon-shape2"),L=c.insert(()=>I);if(t.icon){const B=c.append("g");B.html(`<g>${await zr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const w=B.node().getBBox(),M=w.width,$=w.height,z=w.x,G=w.y;B.attr("transform",`translate(${-M/2-z},${d?h.height/2+_/2-$/2-G:-h.height/2-_/2-$/2-G})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+_/2:-h.height/2-_/2})`),Y(t,L),t.intersect=function(B){if(A.info("iconSquare intersect",t,B),!t.label)return N.rect(t,B);const w=t.x??0,M=t.y??0,$=t.height??0;let z=[];return d?z=[{x:w-h.width/2,y:M-$/2},{x:w+h.width/2,y:M-$/2},{x:w+h.width/2,y:M-$/2+h.height+_},{x:w+m/2,y:M-$/2+h.height+_},{x:w+m/2,y:M+$/2},{x:w-m/2,y:M+$/2},{x:w-m/2,y:M-$/2+h.height+_},{x:w-h.width/2,y:M-$/2+h.height+_}]:z=[{x:w-m/2,y:M-$/2},{x:w+m/2,y:M-$/2},{x:w+m/2,y:M-$/2+g},{x:w+h.width/2,y:M-$/2+g},{x:w+h.width/2/2,y:M+$/2},{x:w-h.width/2,y:M+$/2},{x:w-h.width/2,y:M-$/2+g},{x:w-m/2,y:M-$/2+g}],N.polygon(t,z,B)},c}p(Cu,"iconRounded");async function ku(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:a}=j(t);t.labelStyle=a;const s=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(s,o),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await K(e,t,"icon-shape default"),d=t.pos==="t",g=n+u*2,m=n+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=tr(t),k=-m/2,v=-g/2,_=t.label?8:0,S=q.svg(c),T=H(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const F=b.get("fill");T.stroke=F??x;const P=S.path(Ce(k,v,m,g,.1),T),D=Math.max(m,h.width),E=g+h.height+_,I=S.rectangle(-D/2,-E/2,D,E,{...T,fill:"transparent",stroke:"none"}),O=c.insert(()=>P,":first-child"),L=c.insert(()=>I);if(t.icon){const B=c.append("g");B.html(`<g>${await zr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const w=B.node().getBBox(),M=w.width,$=w.height,z=w.x,G=w.y;B.attr("transform",`translate(${-M/2-z},${d?h.height/2+_/2-$/2-G:-h.height/2-_/2-$/2-G})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+_/2:-h.height/2-_/2})`),Y(t,L),t.intersect=function(B){if(A.info("iconSquare intersect",t,B),!t.label)return N.rect(t,B);const w=t.x??0,M=t.y??0,$=t.height??0;let z=[];return d?z=[{x:w-h.width/2,y:M-$/2},{x:w+h.width/2,y:M-$/2},{x:w+h.width/2,y:M-$/2+h.height+_},{x:w+m/2,y:M-$/2+h.height+_},{x:w+m/2,y:M+$/2},{x:w-m/2,y:M+$/2},{x:w-m/2,y:M-$/2+h.height+_},{x:w-h.width/2,y:M-$/2+h.height+_}]:z=[{x:w-m/2,y:M-$/2},{x:w+m/2,y:M-$/2},{x:w+m/2,y:M-$/2+g},{x:w+h.width/2,y:M-$/2+g},{x:w+h.width/2/2,y:M+$/2},{x:w-h.width/2,y:M+$/2},{x:w-h.width/2,y:M-$/2+g},{x:w-m/2,y:M-$/2+g}],N.polygon(t,z,B)},c}p(ku,"iconSquare");async function _u(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/s;const{labelStyles:o}=j(t);t.labelStyle=o;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??a),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??s;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:f,label:d}=await K(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=q.svg(u),k=H(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=b.rectangle(m,y,c,h,k),_=Math.max(c,f.width),S=h+f.height+x,T=b.rectangle(-_/2,-S/2,_,S,{...k,fill:"none",stroke:"none"}),F=u.insert(()=>v,":first-child"),P=u.insert(()=>T);if(t.img){const D=u.append("image");D.attr("href",t.img),D.attr("width",c),D.attr("height",h),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-c/2},${g?S/2-h:-S/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),F.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),Y(t,P),t.intersect=function(D){if(A.info("iconSquare intersect",t,D),!t.label)return N.rect(t,D);const E=t.x??0,I=t.y??0,O=t.height??0;let L=[];return g?L=[{x:E-f.width/2,y:I-O/2},{x:E+f.width/2,y:I-O/2},{x:E+f.width/2,y:I-O/2+f.height+x},{x:E+c/2,y:I-O/2+f.height+x},{x:E+c/2,y:I+O/2},{x:E-c/2,y:I+O/2},{x:E-c/2,y:I-O/2+f.height+x},{x:E-f.width/2,y:I-O/2+f.height+x}]:L=[{x:E-c/2,y:I-O/2},{x:E+c/2,y:I-O/2},{x:E+c/2,y:I-O/2+h},{x:E+f.width/2,y:I-O/2+h},{x:E+f.width/2/2,y:I+O/2},{x:E-f.width/2,y:I+O/2},{x:E-f.width/2,y:I-O/2+h},{x:E-c/2,y:I-O/2+h}],N.polygon(t,L,D)},u}p(_u,"imageSquare");async function wu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),n=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:-3*n/6,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=at(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=ne(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,Y(t,c),t.intersect=function(u){return N.polygon(t,l,u)},a}p(wu,"inv_trapezoid");async function qr(e,t,r){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{shapeSvg:s,bbox:o}=await K(e,t,X(t)),n=Math.max(o.width+r.labelPaddingX*2,t?.width||0),l=Math.max(o.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=q.svg(s),y=H(t,{}),x=f||d?m.path(Ce(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",St(g))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",St(f)).attr("ry",St(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Y(t,u),t.calcIntersect=function(m,y){return N.rect(m,y)},t.intersect=function(m){return N.rect(t,m)},s}p(qr,"drawRect");async function vu(e,t){const{shapeSvg:r,bbox:i,label:a}=await K(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Y(t,s),t.intersect=function(l){return N.rect(t,l)},r}p(vu,"labelRect");async function Su(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),n=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:o+3*n/6,y:0},{x:o,y:-n},{x:-(3*n)/6,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=at(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=ne(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,Y(t,c),t.intersect=function(u){return N.polygon(t,l,u)},a}p(Su,"lean_left");async function Tu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=Math.max(s.width+(t.padding??0),t?.width??0),n=Math.max(s.height+(t.padding??0),t?.height??0),l=[{x:-3*n/6,y:0},{x:o,y:0},{x:o+3*n/6,y:-n},{x:0,y:-n}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=q.svg(a),f=H(t,{}),d=at(l),g=u.path(d,f);c=a.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${n/2})`),h&&c.attr("style",h)}else c=ne(a,o,n,l);return i&&c.attr("style",i),t.width=o,t.height=n,Y(t,c),t.intersect=function(u){return N.polygon(t,l,u)},a}p(Tu,"lean_right");function Bu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.label="",t.labelStyle=r;const a=e.insert("g").attr("class",X(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=q.svg(a),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=at(c),d=h.path(f,u),g=a.insert(()=>d,":first-child");return s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-n})`),Y(t,g),t.intersect=function(m){return A.info("lightningBolt intersect",t,m),N.polygon(t,c,m)},a}p(Bu,"lightningBolt");var Bb=p((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`a${a},${s} 0,0,0 ${r},0`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Lb=p((e,t,r,i,a,s,o)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${a},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${a},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+o}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),$b=p((e,t,r,i,a,s)=>[`M${e-r/2},${-i/2}`,`a${a},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Lu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0),t.width??0),l=n/2,c=l/(2.5+n/50),h=Math.max(s.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=q.svg(a),m=Lb(0,0,n,h,l,c,u),y=$b(0,c,n,h,l,c),x=H(t,{}),b=g.path(m,x),k=g.path(y,x);a.insert(()=>k,":first-child").attr("class","line"),f=a.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=Bb(0,0,n,h,l,c,u);f=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",St(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-n/2}, ${-(h/2+c)})`),Y(t,f),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),t.intersect=function(g){const m=N.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},a}p(Lu,"linedCylinder");async function $u(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-n/2-n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:h/2},...ye(-n/2-n/2*.1,h/2,n/2+n/2*.1,h/2,c,.8),{x:n/2+n/2*.1,y:-h/2},{x:-n/2-n/2*.1,y:-h/2},{x:-n/2,y:-h/2},{x:-n/2,y:h/2*1.1},{x:-n/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=a.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)+n/2*.1/2-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Y(t,y),t.intersect=function(x){return N.polygon(t,g,x)},a}p($u,"linedWaveEdgedRect");async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=5,h=-n/2,u=-l/2,{cssStyles:f}=t,d=q.svg(a),g=H(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+n-c,y:u+l+c},{x:h+n-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u+l-c},{x:h+n+c,y:u+l-c},{x:h+n+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+n-c,y:u+c},{x:h+n-c,y:u+l},{x:h+n,y:u+l},{x:h+n,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=at(m),b=d.path(x,g),k=at(y),v=d.path(k,{...g,fill:"none"}),_=a.insert(()=>v,":first-child");return _.insert(()=>b,":first-child"),_.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),Y(t,_),t.intersect=function(S){return N.polygon(t,m,S)},a}p(Mu,"multiRect");async function Au(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-n/2,f=-h/2,d=5,{cssStyles:g}=t,m=ye(u-d,f+h+d,u+n-d,f+h+d,c,.8),y=m?.[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+n-d,y:y.y-d},{x:u+n,y:y.y-d},{x:u+n,y:y.y-2*d},{x:u+n+d,y:y.y-2*d},{x:u+n+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+n-d,y:f+d},{x:u+n-d,y:y.y-d},{x:u+n,y:y.y-d},{x:u+n,y:f},{x:u,y:f}],k=q.svg(a),v=H(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=at(x),S=k.path(_,v),T=at(b),F=k.path(T,v),P=a.insert(()=>S,":first-child");return P.insert(()=>F),P.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)+d-c/2-(s.y-(s.top??0))})`),Y(t,P),t.intersect=function(D){return N.polygon(t,x,D)},a}p(Au,"multiWaveEdgedRectangle");async function Fu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i,t.useHtmlLabels||Tt(wt())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await K(e,t,X(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:d}=t,g=q.svg(o),m=H(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),a&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",a),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Y(t,x),t.intersect=function(b){return N.rect(t,b)},o}p(Fu,"note");var Mb=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Eu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=s.width+t.padding,n=s.height+t.padding,l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=q.svg(a),g=H(t,{}),m=Mb(0,0,l),y=d.path(m,g);u=a.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=ne(a,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Y(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=N.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},a}p(Eu,"question");async function Du(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0),t?.width??0),l=Math.max(s.height+(t.padding??0),t?.height??0),c=-n/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=q.svg(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=at(f),x=g.path(y,m),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container"),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/2},0)`),o.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,b),t.intersect=function(k){return N.polygon(t,f,k)},a}p(Du,"rect_left_inv_arrow");async function Ou(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;let a;t.cssClasses?a="node "+t.cssClasses:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=s.insert("g"),n=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await ue(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(Tt(ot())){const F=h.children[0],P=rt(h);u=F.getBoundingClientRect(),P.attr("width",u.width),P.attr("height",u.height)}A.info("Text 2",l);const f=l||[],d=h.getBBox(),g=await ue(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=g.children[0],y=rt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;rt(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),rt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),v=-u.width/2-x,_=-u.height/2-x;let S,T;if(t.look==="handDrawn"){const F=q.svg(s),P=H(t,{}),D=F.path(Ce(v,_,b,k,t.rx||0),P),E=F.line(-u.width/2-x,-u.height/2-x+d.height+x,u.width/2+x,-u.height/2-x+d.height+x,P);T=s.insert(()=>(A.debug("Rough node insert CXC",D),E),":first-child"),S=s.insert(()=>(A.debug("Rough node insert CXC",D),D),":first-child")}else S=o.insert("rect",":first-child"),T=o.insert("line"),S.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),T.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return Y(t,S),t.intersect=function(F){return N.rect(t,F)},s}p(Ou,"rectWithTitle");async function Pu(e,t){const r={rx:5,ry:5,labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return qr(e,t,r)}p(Pu,"roundedRect");async function Iu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=t?.padding??0,l=Math.max(s.width+(t.padding??0)*2,t?.width??0),c=Math.max(s.height+(t.padding??0)*2,t?.height??0),h=-s.width/2-n,u=-s.height/2-n,{cssStyles:f}=t,d=q.svg(a),g=H(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",St(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(s.x-(s.left??0))},${-c/2+(t.padding??0)-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(b){return N.rect(t,b)},a}p(Iu,"shadedProcess");async function Ru(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=-n/2,h=-l/2,{cssStyles:u}=t,f=q.svg(a),d=H(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+n,y:h+l},{x:c+n,y:h-l/2}],m=at(g),y=f.path(m,d),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))}, ${-l/4+(t.padding??0)-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(b){return N.polygon(t,g,b)},a}p(Ru,"slopedRect");async function Nu(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return qr(e,t,r)}p(Nu,"squareRect");async function zu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=s.height+t.padding,n=s.width+o/4+t.padding,l=o/2,{cssStyles:c}=t,h=q.svg(a),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-n/2+l,y:-o/2},{x:n/2-l,y:-o/2},...Mr(-n/2+l,0,l,50,90,270),{x:n/2-l,y:o/2},...Mr(n/2-l,0,l,50,270,450)],d=at(f),g=h.path(d,u),m=a.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),Y(t,m),t.intersect=function(y){return N.polygon(t,f,y)},a}p(zu,"stadium");async function Wu(e,t){return qr(e,t,{rx:5,ry:5})}p(Wu,"state");function qu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=j(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:o,stateBorder:n,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=q.svg(c),u=H(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),d=n??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),s&&m.selectAll("path").attr("style",s),a&&m.selectAll("path").attr("style",a),Y(t,m),t.intersect=function(y){return N.circle(t,7,y)},c}p(qu,"stateEnd");function Hu(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let s;if(t.look==="handDrawn"){const n=q.svg(a).circle(0,0,14,Ny(i));s=a.insert(()=>n),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Y(t,s),t.intersect=function(o){return N.circle(t,7,o)},a}p(Hu,"stateStart");async function ju(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=(t?.padding||0)/2,n=s.width+t.padding,l=s.height+t.padding,c=-s.width/2-o,h=-s.height/2-o,u=[{x:0,y:0},{x:n,y:0},{x:n,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=q.svg(a),d=H(t,{}),g=f.rectangle(c-8,h,n+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+n,h,c+n,h+l,d);a.insert(()=>m,":first-child"),a.insert(()=>y,":first-child");const x=a.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",St(b)),Y(t,x)}else{const f=ne(a,n,l,u);i&&f.attr("style",i),Y(t,f)}return t.intersect=function(f){return N.polygon(t,u,f)},a}p(ju,"subroutine");async function Yu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=Math.max(s.width+(t.padding??0)*2,t?.width??0),n=Math.max(s.height+(t.padding??0)*2,t?.height??0),l=-o/2,c=-n/2,h=.2*n,u=.2*n,{cssStyles:f}=t,d=q.svg(a),g=H(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+n},{x:l-h/2,y:c+n}],y=[{x:l+o-h/2,y:c+n},{x:l+o+h/2,y:c+n},{x:l+o+h/2,y:c+n-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=at(m),b=d.path(x,g),k=at(y),v=d.path(k,{...g,fillStyle:"solid"}),_=a.insert(()=>v,":first-child");return _.insert(()=>b,":first-child"),_.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),Y(t,_),t.intersect=function(S){return N.polygon(t,m,S)},a}p(Yu,"taggedRect");async function Gu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s,label:o}=await K(e,t,X(t)),n=Math.max(s.width+(t.padding??0)*2,t?.width??0),l=Math.max(s.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*n,u=.2*l,f=l+c,{cssStyles:d}=t,g=q.svg(a),m=H(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...ye(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-u*.4,k=[{x:x+n-h,y:(b+l)*1.4},{x:x+n,y:b+l-u},{x:x+n,y:(b+l)*.9},...ye(x+n,(b+l)*1.3,x+n-h,(b+l)*1.5,-l*.03,.5)],v=at(y),_=g.path(v,m),S=at(k),T=g.path(S,{...m,fillStyle:"solid"}),F=a.insert(()=>T,":first-child");return F.insert(()=>_,":first-child"),F.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Y(t,F),t.intersect=function(P){return N.polygon(t,y,P)},a}p(Gu,"taggedWaveEdgedRectangle");async function Vu(e,t){const{labelStyles:r,nodeStyles:i}=j(t);t.labelStyle=r;const{shapeSvg:a,bbox:s}=await K(e,t,X(t)),o=Math.max(s.width+t.padding,t?.width||0),n=Math.max(s.height+t.padding,t?.height||0),l=-o/2,c=-n/2,h=a.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),Y(t,h),t.intersect=function(u){return N.rect(t,u)},a}p(Vu,"text");var Ab=p((e,t,r,i,a,s)=>`M${e},${t}
187
187
  a${a},${s} 0,0,1 0,${-i}
188
188
  l${r},0
@@ -234,14 +234,14 @@ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error
234
234
  h${-l+2*h}
235
235
  q-${h},0 -${h},-${h}
236
236
  Z
237
- `,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),Y(t,f),t.calcIntersect=function(d,g){return N.rect(d,g)},t.intersect=function(d){return N.rect(t,d)},a}p(od,"defaultMindmapNode");async function ld(e,t){const r={padding:t.padding??0};return Ks(e,t,r)}p(ld,"mindmapCircle");var Ob=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Nu},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:zu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ju},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:cu},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ks},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:sd},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:nd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Eu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:mu},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Tu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Su},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Xu},{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:wu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:uu},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Vu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:eu},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Iu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Hu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:qu},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:pu},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:yu},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:su},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:nu},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ou},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Bu},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Qu},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:gu},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Uu},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:lu},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:hu},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ku},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:td},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:du},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Zu},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:fu},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ru},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Au},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Mu},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tu},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:au},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gu},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Yu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ju},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Du},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:$u}],Pb=p(()=>{const t=[...Object.entries({state:Wu,choice:ru,note:Fu,rectWithTitle:Ou,labelRect:vu,iconSquare:ku,iconCircle:bu,icon:xu,iconRounded:Cu,imageSquare:_u,anchor:Jh,kanbanItem:ad,mindmapCircle:ld,defaultMindmapNode:od,classBox:rd,erBox:Qs,requirementBox:id}),...Ob.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),cd=Pb();function Ib(e){return e in cd}p(Ib,"isValidShape");var ea=new Map;async function hd(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?cd[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),ea.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(hd,"insertNode");var i_=p((e,t)=>{ea.set(t.id,e)},"setNodeElem"),a_=p(()=>{ea.clear()},"clear"),s_=p(e=>{const t=ea.get(e.id);A.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"),Rb=p((e,t,r,i,a,s)=>{t.arrowTypeStart&&eo(e,"start",t.arrowTypeStart,r,i,a,s),t.arrowTypeEnd&&eo(e,"end",t.arrowTypeEnd,r,i,a,s)},"addEdgeMarkers"),Nb={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},eo=p((e,t,r,i,a,s,o)=>{const n=Nb[r];if(!n){A.warn(`Unknown arrow type: ${r}`);return}const l=n.type,h=`${a}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),n.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),zb=p(e=>typeof e=="string"?e:ot()?.flowchart?.curve,"resolveEdgeCurveType"),Di=new Map,bt=new Map,n_=p(()=>{Di.clear(),bt.clear()},"clear"),hr=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Wb=p(async(e,t)=>{const r=ot();let i=Tt(r);const{labelStyles:a}=j(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await se(e,t.label,{style:hr(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),A.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],g=rt(c);h=d.getBoundingClientRect(),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const d=rt(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",ar(u,i)),Di.set(t.id,s),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.startLabelLeft,hr(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).startLeft=d,gr(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.startLabelRight,hr(t.labelStyle)||"",!1,!1);f=m,g.node().appendChild(m);let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).startRight=d,gr(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.endLabelLeft,hr(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),d.node().appendChild(m),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).endLeft=d,gr(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.endLabelRight,hr(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),d.node().appendChild(m),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).endRight=d,gr(f,t.endLabelRight)}return c},"insertEdgeLabel");function gr(e,t){Tt(ot())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(gr,"setTerminalWidth");var qb=p((e,t)=>{A.debug("Moving label abc88 ",e.id,e.label,Di.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ot(),{subGraphTitleTotalMargin:a}=Rs(i);if(e.label){const s=Di.get(e.id);let o=e.x,n=e.y;if(r){const l=Wt.calcLabelPosition(r);A.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=bt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=bt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=bt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=bt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Hb=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),jb=p((e,t,r)=>{A.debug(`intersection calc abc89:
237
+ `,f=a.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),Y(t,f),t.calcIntersect=function(d,g){return N.rect(d,g)},t.intersect=function(d){return N.rect(t,d)},a}p(od,"defaultMindmapNode");async function ld(e,t){const r={padding:t.padding??0};return Ks(e,t,r)}p(ld,"mindmapCircle");var Ob=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Nu},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pu},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:zu},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ju},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:cu},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ks},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:sd},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:nd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Eu},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:mu},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Tu},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Su},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Xu},{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:wu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:uu},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Vu},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:eu},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Iu},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Hu},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:qu},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:pu},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:yu},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:su},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:nu},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ou},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Bu},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Qu},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:gu},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Uu},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lu},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:lu},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:hu},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ku},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:td},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:du},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Zu},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:fu},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ru},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Au},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Mu},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tu},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:au},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gu},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Yu},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ju},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Du},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:$u}],Pb=p(()=>{const t=[...Object.entries({state:Wu,choice:ru,note:Fu,rectWithTitle:Ou,labelRect:vu,iconSquare:ku,iconCircle:bu,icon:xu,iconRounded:Cu,imageSquare:_u,anchor:Jh,kanbanItem:ad,mindmapCircle:ld,defaultMindmapNode:od,classBox:rd,erBox:Qs,requirementBox:id}),...Ob.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),cd=Pb();function Ib(e){return e in cd}p(Ib,"isValidShape");var ea=new Map;async function hd(e,t,r){let i,a;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?cd[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),a=await s(i,t,r)}else a=await s(e,t,r),i=a;return t.tooltip&&a.attr("title",t.tooltip),ea.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(hd,"insertNode");var r_=p((e,t)=>{ea.set(t.id,e)},"setNodeElem"),i_=p(()=>{ea.clear()},"clear"),a_=p(e=>{const t=ea.get(e.id);A.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"),Rb=p((e,t,r,i,a,s)=>{t.arrowTypeStart&&eo(e,"start",t.arrowTypeStart,r,i,a,s),t.arrowTypeEnd&&eo(e,"end",t.arrowTypeEnd,r,i,a,s)},"addEdgeMarkers"),Nb={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},eo=p((e,t,r,i,a,s,o)=>{const n=Nb[r];if(!n){A.warn(`Unknown arrow type: ${r}`);return}const l=n.type,h=`${a}_${s}-${l}${t==="start"?"Start":"End"}`;if(o&&o.trim()!==""){const u=o.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",o),n.fill&&y.setAttribute("fill",o)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),zb=p(e=>typeof e=="string"?e:ot()?.flowchart?.curve,"resolveEdgeCurveType"),Di=new Map,bt=new Map,s_=p(()=>{Di.clear(),bt.clear()},"clear"),hr=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Wb=p(async(e,t)=>{const r=ot();let i=Tt(r);const{labelStyles:a}=j(t);t.labelStyle=a;const s=e.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await se(e,t.label,{style:hr(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),A.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const d=c.children[0],g=rt(c);h=d.getBoundingClientRect(),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const d=rt(c).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}o.attr("transform",ar(u,i)),Di.set(t.id,s),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.startLabelLeft,hr(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).startLeft=d,gr(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.startLabelRight,hr(t.labelStyle)||"",!1,!1);f=m,g.node().appendChild(m);let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).startRight=d,gr(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.endLabelLeft,hr(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),d.node().appendChild(m),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).endLeft=d,gr(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),g=d.insert("g").attr("class","inner"),m=await ue(g,t.endLabelRight,hr(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=rt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",ar(y,i)),d.node().appendChild(m),bt.get(t.id)||bt.set(t.id,{}),bt.get(t.id).endRight=d,gr(f,t.endLabelRight)}return c},"insertEdgeLabel");function gr(e,t){Tt(ot())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(gr,"setTerminalWidth");var qb=p((e,t)=>{A.debug("Moving label abc88 ",e.id,e.label,Di.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ot(),{subGraphTitleTotalMargin:a}=Rs(i);if(e.label){const s=Di.get(e.id);let o=e.x,n=e.y;if(r){const l=Wt.calcLabelPosition(r);A.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}s.attr("transform",`translate(${o}, ${n+a/2})`)}if(e.startLabelLeft){const s=bt.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const s=bt.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const s=bt.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const s=bt.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}s.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),Hb=p((e,t)=>{const r=e.x,i=e.y,a=Math.abs(t.x-r),s=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return a>=o||s>=n},"outsideNode"),jb=p((e,t,r)=>{A.debug(`intersection calc abc89:
238
238
  outsidePoint: ${JSON.stringify(t)}
239
239
  insidePoint : ${JSON.stringify(r)}
240
240
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,a=e.y,s=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-s:o+s;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(a-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-a:a-l-t.y;n=h*u/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),A.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return A.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:f,_y:d}),n===0&&(f=t.x,d=t.y),h===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),ro=p((e,t)=>{A.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],a=!1;return e.forEach(s=>{if(A.info("abc88 checking point",s,t),!Hb(t,s)&&!a){const o=jb(t,i,s);A.debug("abc88 inside",s,i,o),A.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?A.warn("abc88 no intersect",o,r):r.push(o),a=!0}else A.warn("abc88 outside",s,i),i=s,a||r.push(s)}),A.debug("returning points",r),r},"cutPathAtIntersect");function ud(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const a=e[i-1],s=e[i],o=e[i+1];(a.x===s.x&&s.y===o.y&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-a.y)>5||a.y===s.y&&s.x===o.x&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-o.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(ud,"extractCornerPoints");var io=p(function(e,t,r){const i=t.x-e.x,a=t.y-e.y,s=Math.sqrt(i*i+a*a),o=r/s;return{x:t.x-o*i,y:t.y-o*a}},"findAdjacentPoint"),Yb=p(function(e){const{cornerPointPositions:t}=ud(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const a=e[i-1],s=e[i+1],o=e[i],n=io(a,o,5),l=io(s,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let f={x:o.x,y:o.y};if(Math.abs(s.x-a.x)>10&&Math.abs(s.y-a.y)>=10){A.debug("Corner point fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));const d=5;o.x===n.x?f={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:f={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else A.debug("Corner point skipping fixing",Math.abs(s.x-a.x),Math.abs(s.y-a.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),Gb=p((e,t,r)=>{const i=e-t-r,a=2,s=2,o=a+s,n=Math.floor(i/o),l=Array(n).fill(`${a} ${s}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Vb=p(function(e,t,r,i,a,s,o,n=!1){const{handDrawnSeed:l}=ot();let c=t.points,h=!1;const u=a;var f=s;const d=[];for(const w in t.cssCompiledStyles)uh(w)||d.push(t.cssCompiledStyles[w]);A.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!n&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),A.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(A.info("to cluster abc88",r.get(t.toCluster)),c=ro(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(A.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=ro(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(w=>!Number.isNaN(w.y));const y=zb(t.curve);y!=="rounded"&&(m=Yb(m));let x=Cr;switch(y){case"linear":x=Cr;break;case"basis":x=Sa;break;case"cardinal":x=Yo;break;case"bumpX":x=zo;break;case"bumpY":x=Wo;break;case"catmullRom":x=Vo;break;case"monotoneX":x=Jo;break;case"monotoneY":x=tl;break;case"natural":x=rl;break;case"step":x=il;break;case"stepAfter":x=sl;break;case"stepBefore":x=al;break;case"rounded":x=Cr;break;default:x=Sa}const{x:b,y:k}=Hg(t),v=Tp().x(b).y(k).curve(x);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let S,T=y==="rounded"?dd(fd(m,t),5):v(m);const F=Array.isArray(t.style)?t.style:[t.style];let P=F.find(w=>w?.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let E=!1;if(t.look==="handDrawn"){const w=q.svg(e);Object.assign([],m);const M=w.path(T,{roughness:.3,seed:l});_+=" transition",S=rt(M).select("path").attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",F?F.reduce((z,G)=>z+";"+G,""):"");let $=S.attr("d");S.attr("d",$),e.node().appendChild(S.node())}else{const w=d.join(";"),M=F?F.reduce((tt,it)=>tt+it+";",""):"",$=(w?w+";"+M+";":M)+";"+(F?F.reduce((tt,it)=>tt+";"+it,""):"");S=e.append("path").attr("d",T).attr("id",t.id).attr("class"," "+_+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",$),P=$.match(/stroke:([^;]+)/)?.[1],E=t.animate===!0||!!t.animation||w.includes("animation");const z=S.node(),G=typeof z.getTotalLength=="function"?z.getTotalLength():0,et=xn[t.arrowTypeStart]||0,Z=xn[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const it=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Gb(G,et,Z):`0 ${et} ${G-et-Z} ${Z}`}; stroke-dashoffset: 0;`;S.attr("style",it+S.attr("style"))}}S.attr("data-edge",!0),S.attr("data-et","edge"),S.attr("data-id",t.id),S.attr("data-points",g),t.showPoints&&m.forEach(w=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",w.x).attr("cy",w.y)});let I="";(ot().flowchart.arrowMarkerAbsolute||ot().state.arrowMarkerAbsolute)&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),A.info("arrowTypeStart",t.arrowTypeStart),A.info("arrowTypeEnd",t.arrowTypeEnd),Rb(S,t,I,o,i,P);const O=Math.floor(c.length/2),L=c[O];Wt.isLabelCoordinateInPath(L,S.attr("d"))||(h=!0);let B={};return h&&(B.updatedPath=c),B.originalPath=t.points,B},"insertEdge");function dd(e,t){if(e.length<2)return"";let r="";const i=e.length,a=1e-5;for(let s=0;s<i;s++){const o=e[s],n=e[s-1],l=e[s+1];if(s===0)r+=`M${o.x},${o.y}`;else if(s===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,f=l.y-o.y,d=Math.hypot(c,h),g=Math.hypot(u,f);if(d<a||g<a){r+=`L${o.x},${o.y}`;continue}const m=c/d,y=h/d,x=u/g,b=f/g,k=m*x+y*b,v=Math.max(-1,Math.min(1,k)),_=Math.acos(v);if(_<a||Math.abs(Math.PI-_)<a){r+=`L${o.x},${o.y}`;continue}const S=Math.min(t/Math.sin(_/2),d/2,g/2),T=o.x-m*S,F=o.y-y*S,P=o.x+x*S,D=o.y+b*S;r+=`L${T},${F}`,r+=`Q${o.x},${o.y} ${P},${D}`}}return r}p(dd,"generateRoundedPath");function Ja(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(Ja,"calculateDeltaAndAngle");function fd(e,t){const r=e.map(a=>({...a}));if(e.length>=2&&_t[t.arrowTypeStart]){const a=_t[t.arrowTypeStart],s=e[0],o=e[1],{angle:n}=Ja(s,o),l=a*Math.cos(n),c=a*Math.sin(n);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&_t[t.arrowTypeEnd]){const a=_t[t.arrowTypeEnd],s=e[i-1],o=e[i-2],{angle:n}=Ja(o,s),l=a*Math.cos(n),c=a*Math.sin(n);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}p(fd,"applyMarkerOffsetsToPoints");var Ub=p((e,t,r,i)=>{t.forEach(a=>{h1[a](e,r,i)})},"insertMarkers"),Xb=p((e,t,r)=>{A.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Zb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Kb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Qb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Jb=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),t1=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),e1=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),r1=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),i1=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),a1=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),s1=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),n1=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),o1=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),l1=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
241
241
  L20,10
242
242
  M20,10
243
- L0,20`)},"requirement_arrow"),c1=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),h1={extension:Xb,composition:Zb,aggregation:Kb,dependency:Qb,lollipop:Jb,point:t1,circle:e1,cross:r1,barb:i1,only_one:a1,zero_or_one:s1,one_or_more:n1,zero_or_more:o1,requirement_arrow:l1,requirement_contains:c1},u1=Ub,d1={common:Or,getConfig:wt,insertCluster:xb,insertEdge:Vb,insertEdgeLabel:Wb,insertMarkers:u1,insertNode:hd,interpolateToCurve:Fs,labelHelper:K,log:A,positionEdgeLabel:qb},Ar={},pd=p(e=>{for(const t of e)Ar[t.name]=t},"registerLayoutLoaders"),f1=p(()=>{pd([{name:"dagre",loader:p(async()=>await st(()=>import("./dagre-KLK3FWXG-m-9cmD-w.js"),__vite__mapDeps([2,3,4,5,6,7,0,1,8,9,10,11,12,13])),"loader")},{name:"cose-bilkent",loader:p(async()=>await st(()=>import("./cose-bilkent-S5V4N54A-C5LXU9pd.js"),__vite__mapDeps([14,15,0,1,9,10,11,12,13,8])),"loader")}])},"registerDefaultLayoutLoaders");f1();var o_=p(async(e,t)=>{if(!(e.layoutAlgorithm in Ar))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Ar[e.layoutAlgorithm];return(await r.loader()).render(e,t,d1,{algorithm:r.algorithm})},"render"),l_=p((e="",{fallback:t="dagre"}={})=>{if(e in Ar)return e;if(t in Ar)return A.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),gd="comm",md="rule",yd="decl",p1="@import",g1="@namespace",m1="@keyframes",y1="@layer",xd=Math.abs,Js=String.fromCharCode;function bd(e){return e.trim()}function ai(e,t,r){return e.replace(t,r)}function x1(e,t,r){return e.indexOf(t,r)}function je(e,t){return e.charCodeAt(t)|0}function Xe(e,t,r){return e.slice(t,r)}function Vt(e){return e.length}function b1(e){return e.length}function Zr(e,t){return t.push(e),e}var ra=1,Ze=1,Cd=0,Rt=0,ft=0,rr="";function tn(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:ra,column:Ze,length:o,return:"",siblings:n}}function C1(){return ft}function k1(){return ft=Rt>0?je(rr,--Rt):0,Ze--,ft===10&&(Ze=1,ra--),ft}function Ht(){return ft=Rt<Cd?je(rr,Rt++):0,Ze++,ft===10&&(Ze=1,ra++),ft}function de(){return je(rr,Rt)}function si(){return Rt}function ia(e,t){return Xe(rr,e,t)}function Fr(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 _1(e){return ra=Ze=1,Cd=Vt(rr=e),Rt=0,[]}function w1(e){return rr="",e}function ma(e){return bd(ia(Rt-1,ts(e===91?e+2:e===40?e+1:e)))}function v1(e){for(;(ft=de())&&ft<33;)Ht();return Fr(e)>2||Fr(ft)>3?"":" "}function S1(e,t){for(;--t&&Ht()&&!(ft<48||ft>102||ft>57&&ft<65||ft>70&&ft<97););return ia(e,si()+(t<6&&de()==32&&Ht()==32))}function ts(e){for(;Ht();)switch(ft){case e:return Rt;case 34:case 39:e!==34&&e!==39&&ts(ft);break;case 40:e===41&&ts(e);break;case 92:Ht();break}return Rt}function T1(e,t){for(;Ht()&&e+ft!==57;)if(e+ft===84&&de()===47)break;return"/*"+ia(t,Rt-1)+"*"+Js(e===47?e:Ht())}function B1(e){for(;!Fr(de());)Ht();return ia(e,Rt)}function L1(e){return w1(ni("",null,null,null,[""],e=_1(e),0,[0],e))}function ni(e,t,r,i,a,s,o,n,l){for(var c=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,k="",v=a,_=s,S=i,T=k;y;)switch(g=b,b=Ht()){case 40:if(g!=108&&je(T,u-1)==58){x1(T+=ai(ma(b),"&","&\f"),"&\f",xd(c?n[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=ma(b);break;case 9:case 10:case 13:case 32:T+=v1(g);break;case 92:T+=S1(si()-1,7);continue;case 47:switch(de()){case 42:case 47:Zr($1(T1(Ht(),si()),t,r,l),l),(Fr(g||1)==5||Fr(de()||1)==5)&&Vt(T)&&Xe(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[c++]=Vt(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=ai(T,/\f/g,"")),d>0&&(Vt(T)-u||m===0&&g===47)&&Zr(d>32?so(T+";",i,r,u-1,l):so(ai(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Zr(S=ao(T,t,r,c,h,a,n,k,v=[],_=[],u,s),s),b===123)if(h===0)ni(T,t,S,S,v,s,u,n,_);else{switch(f){case 99:if(je(T,3)===110)break;case 108:if(je(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ni(e,S,S,i&&Zr(ao(e,S,S,0,0,a,n,k,a,v=[],u,_),_),a,_,u,n,i?v:_):ni(T,S,S,S,[""],_,0,n,_)}}c=h=d=0,m=x=1,k=T="",u=o;break;case 58:u=1+Vt(T),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&k1()==125)continue}switch(T+=Js(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:n[c++]=(Vt(T)-1)*x,x=1;break;case 64:de()===45&&(T+=ma(Ht())),f=de(),h=u=Vt(k=T+=B1(si())),b++;break;case 45:g===45&&Vt(T)==2&&(m=0)}}return s}function ao(e,t,r,i,a,s,o,n,l,c,h,u){for(var f=a-1,d=a===0?s:[""],g=b1(d),m=0,y=0,x=0;m<i;++m)for(var b=0,k=Xe(e,f+1,f=xd(y=o[m])),v=e;b<g;++b)(v=bd(y>0?d[b]+" "+k:ai(k,/&\f/g,d[b])))&&(l[x++]=v);return tn(e,t,r,a===0?md:n,l,c,h,u)}function $1(e,t,r,i){return tn(e,t,r,gd,Js(C1()),Xe(e,2,-2),0,i)}function so(e,t,r,i,a){return tn(e,t,r,yd,Xe(e,0,i),Xe(e,i+1,-1),i,a)}function es(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function M1(e,t,r,i){switch(e.type){case y1:if(e.children.length)break;case p1:case g1:case yd:return e.return=e.return||e.value;case gd:return"";case m1:return e.return=e.value+"{"+es(e.children,i)+"}";case md:if(!Vt(e.value=e.props.join(",")))return""}return Vt(r=es(e.children,i))?e.return=e.value+"{"+r+"}":""}var A1=jc(Object.keys,Object),F1=Object.prototype,E1=F1.hasOwnProperty;function D1(e){if(!Vi(e))return A1(e);var t=[];for(var r in Object(e))E1.call(e,r)&&r!="constructor"&&t.push(r);return t}var rs=Pe(Zt,"DataView"),is=Pe(Zt,"Promise"),as=Pe(Zt,"Set"),ss=Pe(Zt,"WeakMap"),no="[object Map]",O1="[object Object]",oo="[object Promise]",lo="[object Set]",co="[object WeakMap]",ho="[object DataView]",P1=Oe(rs),I1=Oe($r),R1=Oe(is),N1=Oe(as),z1=Oe(ss),ve=Ke;(rs&&ve(new rs(new ArrayBuffer(1)))!=ho||$r&&ve(new $r)!=no||is&&ve(is.resolve())!=oo||as&&ve(new as)!=lo||ss&&ve(new ss)!=co)&&(ve=function(e){var t=Ke(e),r=t==O1?e.constructor:void 0,i=r?Oe(r):"";if(i)switch(i){case P1:return ho;case I1:return no;case R1:return oo;case N1:return lo;case z1:return co}return t});var W1="[object Map]",q1="[object Set]",H1=Object.prototype,j1=H1.hasOwnProperty;function uo(e){if(e==null)return!0;if(Ui(e)&&(vi(e)||typeof e=="string"||typeof e.splice=="function"||Ms(e)||As(e)||wi(e)))return!e.length;var t=ve(e);if(t==W1||t==q1)return!e.size;if(Vi(e))return!D1(e).length;for(var r in e)if(j1.call(e,r))return!1;return!0}var kd="c4",Y1=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),G1=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./c4Diagram-IC4MRINW-g8EmnUUA.js");return{diagram:t}},__vite__mapDeps([16,17,9,0,1,10,11,12,13,8]));return{id:kd,diagram:e}},"loader"),V1={id:kd,detector:Y1,loader:G1},U1=V1,_d="flowchart",X1=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Z1=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-aJT2T3cx.js");return{diagram:t}},__vite__mapDeps([18,19,17,9,0,1,10,11,12,13,20,21,8,22]));return{id:_d,diagram:e}},"loader"),K1={id:_d,detector:X1,loader:Z1},Q1=K1,wd="flowchart-v2",J1=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),t2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-aJT2T3cx.js");return{diagram:t}},__vite__mapDeps([18,19,17,9,0,1,10,11,12,13,20,21,8,22]));return{id:wd,diagram:e}},"loader"),e2={id:wd,detector:J1,loader:t2},r2=e2,vd="er",i2=p(e=>/^\s*erDiagram/.test(e),"detector"),a2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./erDiagram-INFDFZHY-7L6v8ikj.js");return{diagram:t}},__vite__mapDeps([23,20,9,0,1,10,11,12,13,21,22,8]));return{id:vd,diagram:e}},"loader"),s2={id:vd,detector:i2,loader:a2},n2=s2,Sd="gitGraph",o2=p(e=>/^\s*gitGraph/.test(e),"detector"),l2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./gitGraphDiagram-K3NZZRJ6-CI0SeLE3.js");return{diagram:t}},__vite__mapDeps([24,25,26,27,0,1,4,6,7,9,10,11,12,13,8]));return{id:Sd,diagram:e}},"loader"),c2={id:Sd,detector:o2,loader:l2},h2=c2,Td="gantt",u2=p(e=>/^\s*gantt/.test(e),"detector"),d2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./ganttDiagram-A5KZAMGK-C5vwClxA.js");return{diagram:t}},__vite__mapDeps([28,0,1,9,10,11,12,13,29,30,31,8]));return{id:Td,diagram:e}},"loader"),f2={id:Td,detector:u2,loader:d2},p2=f2,Bd="info",g2=p(e=>/^\s*info/.test(e),"detector"),m2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./infoDiagram-LFFYTUFH-H6835-cD.js");return{diagram:t}},__vite__mapDeps([32,27,0,1,4,6,7,8,9,10,11,12,13]));return{id:Bd,diagram:e}},"loader"),y2={id:Bd,detector:g2,loader:m2},Ld="pie",x2=p(e=>/^\s*pie/.test(e),"detector"),b2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./pieDiagram-SKSYHLDU-DxK57epR.js");return{diagram:t}},__vite__mapDeps([33,25,27,0,1,4,6,7,9,10,11,12,13,34,35,30,8]));return{id:Ld,diagram:e}},"loader"),C2={id:Ld,detector:x2,loader:b2},$d="quadrantChart",k2=p(e=>/^\s*quadrantChart/.test(e),"detector"),_2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./quadrantDiagram-337W2JSQ-CZMB9UKV.js");return{diagram:t}},__vite__mapDeps([36,9,0,1,10,11,12,13,29,30,31,8]));return{id:$d,diagram:e}},"loader"),w2={id:$d,detector:k2,loader:_2},v2=w2,Md="xychart",S2=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),T2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./xychartDiagram-JWTSCODW-Ckcyhr_q.js");return{diagram:t}},__vite__mapDeps([37,9,0,1,10,11,12,13,30,35,29,31,8]));return{id:Md,diagram:e}},"loader"),B2={id:Md,detector:S2,loader:T2},L2=B2,Ad="requirement",$2=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),M2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./requirementDiagram-Z7DCOOCP-BlyteLn_.js");return{diagram:t}},__vite__mapDeps([38,20,9,0,1,10,11,12,13,21,8]));return{id:Ad,diagram:e}},"loader"),A2={id:Ad,detector:$2,loader:M2},F2=A2,Fd="sequence",E2=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),D2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./sequenceDiagram-2WXFIKYE-B2cOVhRx.js");return{diagram:t}},__vite__mapDeps([39,17,9,0,1,10,11,12,13,26,8]));return{id:Fd,diagram:e}},"loader"),O2={id:Fd,detector:E2,loader:D2},P2=O2,Ed="class",I2=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),R2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./classDiagram-VBA2DB6C-BAnp4Zaa.js");return{diagram:t}},__vite__mapDeps([40,41,19,17,9,0,1,10,11,12,13,20,21,8]));return{id:Ed,diagram:e}},"loader"),N2={id:Ed,detector:I2,loader:R2},z2=N2,Dd="classDiagram",W2=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),q2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./classDiagram-v2-RAHNMMFH-BAnp4Zaa.js");return{diagram:t}},__vite__mapDeps([42,41,19,17,9,0,1,10,11,12,13,20,21,8]));return{id:Dd,diagram:e}},"loader"),H2={id:Dd,detector:W2,loader:q2},j2=H2,Od="state",Y2=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),G2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./stateDiagram-RAJIS63D-C4udRYnl.js");return{diagram:t}},__vite__mapDeps([43,44,20,9,0,1,10,11,12,13,21,3,4,5,6,8]));return{id:Od,diagram:e}},"loader"),V2={id:Od,detector:Y2,loader:G2},U2=V2,Pd="stateDiagram",X2=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Z2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./stateDiagram-v2-FVOUBMTO-CECUON5A.js");return{diagram:t}},__vite__mapDeps([45,44,20,9,0,1,10,11,12,13,21,8]));return{id:Pd,diagram:e}},"loader"),K2={id:Pd,detector:X2,loader:Z2},Q2=K2,Id="journey",J2=p(e=>/^\s*journey/.test(e),"detector"),tC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./journeyDiagram-4ABVD52K-Bi9XcKs5.js");return{diagram:t}},__vite__mapDeps([46,19,17,9,0,1,10,11,12,13,34,8]));return{id:Id,diagram:e}},"loader"),eC={id:Id,detector:J2,loader:tC},rC=eC,iC=p((e,t,r)=>{A.debug(`rendering svg for syntax error
244
- `);const i=Op(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Oo(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Rd={draw:iC},aC=Rd,sC={db:{},renderer:Rd,parser:{parse:p(()=>{},"parse")}},nC=sC,Nd="flowchart-elk",oC=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),lC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-aJT2T3cx.js");return{diagram:t}},__vite__mapDeps([18,19,17,9,0,1,10,11,12,13,20,21,8,22]));return{id:Nd,diagram:e}},"loader"),cC={id:Nd,detector:oC,loader:lC},hC=cC,zd="timeline",uC=p(e=>/^\s*timeline/.test(e),"detector"),dC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./timeline-definition-YZTLITO2-C18tfizI.js");return{diagram:t}},__vite__mapDeps([47,9,0,1,10,11,12,13,34,8]));return{id:zd,diagram:e}},"loader"),fC={id:zd,detector:uC,loader:dC},pC=fC,Wd="mindmap",gC=p(e=>/^\s*mindmap/.test(e),"detector"),mC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./mindmap-definition-YRQLILUH-BajbwusW.js");return{diagram:t}},__vite__mapDeps([48,20,9,0,1,10,11,12,13,21,8]));return{id:Wd,diagram:e}},"loader"),yC={id:Wd,detector:gC,loader:mC},xC=yC,qd="kanban",bC=p(e=>/^\s*kanban/.test(e),"detector"),CC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./kanban-definition-K7BYSVSG-DE01LQ5I.js");return{diagram:t}},__vite__mapDeps([49,19,0,1,8,9,10,11,12,13]));return{id:qd,diagram:e}},"loader"),kC={id:qd,detector:bC,loader:CC},_C=kC,Hd="sankey",wC=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),vC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./sankeyDiagram-WA2Y5GQK-DrdtRBZz.js");return{diagram:t}},__vite__mapDeps([50,9,0,1,10,11,12,13,35,30,8]));return{id:Hd,diagram:e}},"loader"),SC={id:Hd,detector:wC,loader:vC},TC=SC,jd="packet",BC=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),LC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./diagram-P4PSJMXO-JVUlmg7w.js");return{diagram:t}},__vite__mapDeps([51,25,27,0,1,4,6,7,8,9,10,11,12,13]));return{id:jd,diagram:e}},"loader"),$C={id:jd,detector:BC,loader:LC},Yd="radar",MC=p(e=>/^\s*radar-beta/.test(e),"detector"),AC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./diagram-IFDJBPK2-CD8BK0Gp.js");return{diagram:t}},__vite__mapDeps([52,25,27,0,1,4,6,7,8,9,10,11,12,13]));return{id:Yd,diagram:e}},"loader"),FC={id:Yd,detector:MC,loader:AC},Gd="block",EC=p(e=>/^\s*block(-beta)?/.test(e),"detector"),DC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./blockDiagram-WCTKOSBZ-C1Ni5oSK.js");return{diagram:t}},__vite__mapDeps([53,19,7,4,9,0,1,10,11,12,13,3,22,8]));return{id:Gd,diagram:e}},"loader"),OC={id:Gd,detector:EC,loader:DC},PC=OC,Vd="architecture",IC=p(e=>/^\s*architecture/.test(e),"detector"),RC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./architectureDiagram-2XIMDMQ5-DVePwAIo.js");return{diagram:t}},__vite__mapDeps([54,25,27,0,1,4,6,7,15,9,10,11,12,13,8]));return{id:Vd,diagram:e}},"loader"),NC={id:Vd,detector:IC,loader:RC},zC=NC,Ud="ishikawa",WC=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),qC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./ishikawaDiagram-PHBUUO56-y62OJXdI.js");return{diagram:t}},__vite__mapDeps([55,0,1,8,9,10,11,12,13]));return{id:Ud,diagram:e}},"loader"),HC={id:Ud,detector:WC,loader:qC},Xd="venn",jC=p(e=>/^\s*venn-beta/.test(e),"detector"),YC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./vennDiagram-LZ73GAT5-DWmAgqdE.js");return{diagram:t}},__vite__mapDeps([56,9,0,1,10,11,12,13,8]));return{id:Xd,diagram:e}},"loader"),GC={id:Xd,detector:jC,loader:YC},VC=GC,Zd="treemap",UC=p(e=>/^\s*treemap/.test(e),"detector"),XC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./diagram-E7M64L7V-Cn-5LVpt.js");return{diagram:t}},__vite__mapDeps([57,21,25,27,0,1,4,6,7,9,10,11,12,13,31,35,30,8]));return{id:Zd,diagram:e}},"loader"),ZC={id:Zd,detector:UC,loader:XC},fo=!1,aa=p(()=>{fo||(fo=!0,ui("error",nC,e=>e.toLowerCase().trim()==="error"),ui("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xa(hC,xC,zC),xa(U1,_C,j2,z2,n2,p2,y2,C2,F2,P2,r2,Q1,pC,h2,Q2,U2,rC,v2,TC,$C,L2,PC,FC,HC,ZC,VC))},"addDiagrams"),KC=p(async()=>{A.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Le).map(async([r,{detector:i,loader:a}])=>{if(a)try{_a(r)}catch{try{const{diagram:s,id:o}=await a();ui(o,s,i)}catch(s){throw A.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Le[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){A.error(`Failed to load ${t.length} external diagrams`);for(const r of t)A.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),QC="graphics-document document";function Kd(e,t){e.attr("role",QC),t!==""&&e.attr("aria-roledescription",t)}p(Kd,"setA11yDiagramInfo");function Qd(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Qd,"addSVGa11yTitleDescription");var ns=class Jd{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=wt(),a=cs(t,i);t=Ry(t)+`
243
+ L0,20`)},"requirement_arrow"),c1=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),h1={extension:Xb,composition:Zb,aggregation:Kb,dependency:Qb,lollipop:Jb,point:t1,circle:e1,cross:r1,barb:i1,only_one:a1,zero_or_one:s1,one_or_more:n1,zero_or_more:o1,requirement_arrow:l1,requirement_contains:c1},u1=Ub,d1={common:Or,getConfig:wt,insertCluster:xb,insertEdge:Vb,insertEdgeLabel:Wb,insertMarkers:u1,insertNode:hd,interpolateToCurve:Fs,labelHelper:K,log:A,positionEdgeLabel:qb},Ar={},pd=p(e=>{for(const t of e)Ar[t.name]=t},"registerLayoutLoaders"),f1=p(()=>{pd([{name:"dagre",loader:p(async()=>await st(()=>import("./dagre-KLK3FWXG-CN4ule0l.js"),__vite__mapDeps([2,3,4,5,6,7,0,1,8])),"loader")},{name:"cose-bilkent",loader:p(async()=>await st(()=>import("./cose-bilkent-S5V4N54A-DRWnwV5H.js"),__vite__mapDeps([9,10,0,1,8])),"loader")}])},"registerDefaultLayoutLoaders");f1();var n_=p(async(e,t)=>{if(!(e.layoutAlgorithm in Ar))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Ar[e.layoutAlgorithm];return(await r.loader()).render(e,t,d1,{algorithm:r.algorithm})},"render"),o_=p((e="",{fallback:t="dagre"}={})=>{if(e in Ar)return e;if(t in Ar)return A.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),gd="comm",md="rule",yd="decl",p1="@import",g1="@namespace",m1="@keyframes",y1="@layer",xd=Math.abs,Js=String.fromCharCode;function bd(e){return e.trim()}function ai(e,t,r){return e.replace(t,r)}function x1(e,t,r){return e.indexOf(t,r)}function je(e,t){return e.charCodeAt(t)|0}function Xe(e,t,r){return e.slice(t,r)}function Vt(e){return e.length}function b1(e){return e.length}function Zr(e,t){return t.push(e),e}var ra=1,Ze=1,Cd=0,Rt=0,ft=0,rr="";function tn(e,t,r,i,a,s,o,n){return{value:e,root:t,parent:r,type:i,props:a,children:s,line:ra,column:Ze,length:o,return:"",siblings:n}}function C1(){return ft}function k1(){return ft=Rt>0?je(rr,--Rt):0,Ze--,ft===10&&(Ze=1,ra--),ft}function Ht(){return ft=Rt<Cd?je(rr,Rt++):0,Ze++,ft===10&&(Ze=1,ra++),ft}function de(){return je(rr,Rt)}function si(){return Rt}function ia(e,t){return Xe(rr,e,t)}function Fr(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 _1(e){return ra=Ze=1,Cd=Vt(rr=e),Rt=0,[]}function w1(e){return rr="",e}function ma(e){return bd(ia(Rt-1,ts(e===91?e+2:e===40?e+1:e)))}function v1(e){for(;(ft=de())&&ft<33;)Ht();return Fr(e)>2||Fr(ft)>3?"":" "}function S1(e,t){for(;--t&&Ht()&&!(ft<48||ft>102||ft>57&&ft<65||ft>70&&ft<97););return ia(e,si()+(t<6&&de()==32&&Ht()==32))}function ts(e){for(;Ht();)switch(ft){case e:return Rt;case 34:case 39:e!==34&&e!==39&&ts(ft);break;case 40:e===41&&ts(e);break;case 92:Ht();break}return Rt}function T1(e,t){for(;Ht()&&e+ft!==57;)if(e+ft===84&&de()===47)break;return"/*"+ia(t,Rt-1)+"*"+Js(e===47?e:Ht())}function B1(e){for(;!Fr(de());)Ht();return ia(e,Rt)}function L1(e){return w1(ni("",null,null,null,[""],e=_1(e),0,[0],e))}function ni(e,t,r,i,a,s,o,n,l){for(var c=0,h=0,u=o,f=0,d=0,g=0,m=1,y=1,x=1,b=0,k="",v=a,_=s,S=i,T=k;y;)switch(g=b,b=Ht()){case 40:if(g!=108&&je(T,u-1)==58){x1(T+=ai(ma(b),"&","&\f"),"&\f",xd(c?n[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:T+=ma(b);break;case 9:case 10:case 13:case 32:T+=v1(g);break;case 92:T+=S1(si()-1,7);continue;case 47:switch(de()){case 42:case 47:Zr($1(T1(Ht(),si()),t,r,l),l),(Fr(g||1)==5||Fr(de()||1)==5)&&Vt(T)&&Xe(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[c++]=Vt(T)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(T=ai(T,/\f/g,"")),d>0&&(Vt(T)-u||m===0&&g===47)&&Zr(d>32?so(T+";",i,r,u-1,l):so(ai(T," ","")+";",i,r,u-2,l),l);break;case 59:T+=";";default:if(Zr(S=ao(T,t,r,c,h,a,n,k,v=[],_=[],u,s),s),b===123)if(h===0)ni(T,t,S,S,v,s,u,n,_);else{switch(f){case 99:if(je(T,3)===110)break;case 108:if(je(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?ni(e,S,S,i&&Zr(ao(e,S,S,0,0,a,n,k,a,v=[],u,_),_),a,_,u,n,i?v:_):ni(T,S,S,S,[""],_,0,n,_)}}c=h=d=0,m=x=1,k=T="",u=o;break;case 58:u=1+Vt(T),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&k1()==125)continue}switch(T+=Js(b),b*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:n[c++]=(Vt(T)-1)*x,x=1;break;case 64:de()===45&&(T+=ma(Ht())),f=de(),h=u=Vt(k=T+=B1(si())),b++;break;case 45:g===45&&Vt(T)==2&&(m=0)}}return s}function ao(e,t,r,i,a,s,o,n,l,c,h,u){for(var f=a-1,d=a===0?s:[""],g=b1(d),m=0,y=0,x=0;m<i;++m)for(var b=0,k=Xe(e,f+1,f=xd(y=o[m])),v=e;b<g;++b)(v=bd(y>0?d[b]+" "+k:ai(k,/&\f/g,d[b])))&&(l[x++]=v);return tn(e,t,r,a===0?md:n,l,c,h,u)}function $1(e,t,r,i){return tn(e,t,r,gd,Js(C1()),Xe(e,2,-2),0,i)}function so(e,t,r,i,a){return tn(e,t,r,yd,Xe(e,0,i),Xe(e,i+1,-1),i,a)}function es(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function M1(e,t,r,i){switch(e.type){case y1:if(e.children.length)break;case p1:case g1:case yd:return e.return=e.return||e.value;case gd:return"";case m1:return e.return=e.value+"{"+es(e.children,i)+"}";case md:if(!Vt(e.value=e.props.join(",")))return""}return Vt(r=es(e.children,i))?e.return=e.value+"{"+r+"}":""}var A1=jc(Object.keys,Object),F1=Object.prototype,E1=F1.hasOwnProperty;function D1(e){if(!Vi(e))return A1(e);var t=[];for(var r in Object(e))E1.call(e,r)&&r!="constructor"&&t.push(r);return t}var rs=Pe(Zt,"DataView"),is=Pe(Zt,"Promise"),as=Pe(Zt,"Set"),ss=Pe(Zt,"WeakMap"),no="[object Map]",O1="[object Object]",oo="[object Promise]",lo="[object Set]",co="[object WeakMap]",ho="[object DataView]",P1=Oe(rs),I1=Oe($r),R1=Oe(is),N1=Oe(as),z1=Oe(ss),ve=Ke;(rs&&ve(new rs(new ArrayBuffer(1)))!=ho||$r&&ve(new $r)!=no||is&&ve(is.resolve())!=oo||as&&ve(new as)!=lo||ss&&ve(new ss)!=co)&&(ve=function(e){var t=Ke(e),r=t==O1?e.constructor:void 0,i=r?Oe(r):"";if(i)switch(i){case P1:return ho;case I1:return no;case R1:return oo;case N1:return lo;case z1:return co}return t});var W1="[object Map]",q1="[object Set]",H1=Object.prototype,j1=H1.hasOwnProperty;function uo(e){if(e==null)return!0;if(Ui(e)&&(vi(e)||typeof e=="string"||typeof e.splice=="function"||Ms(e)||As(e)||wi(e)))return!e.length;var t=ve(e);if(t==W1||t==q1)return!e.size;if(Vi(e))return!D1(e).length;for(var r in e)if(j1.call(e,r))return!1;return!0}var kd="c4",Y1=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),G1=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./c4Diagram-IC4MRINW-AFG5p1yt.js");return{diagram:t}},__vite__mapDeps([11,12,8,0,1]));return{id:kd,diagram:e}},"loader"),V1={id:kd,detector:Y1,loader:G1},U1=V1,_d="flowchart",X1=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),Z1=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-CsQeJUub.js");return{diagram:t}},__vite__mapDeps([13,14,12,8,15,16,0,1,17]));return{id:_d,diagram:e}},"loader"),K1={id:_d,detector:X1,loader:Z1},Q1=K1,wd="flowchart-v2",J1=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),t2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-CsQeJUub.js");return{diagram:t}},__vite__mapDeps([13,14,12,8,15,16,0,1,17]));return{id:wd,diagram:e}},"loader"),e2={id:wd,detector:J1,loader:t2},r2=e2,vd="er",i2=p(e=>/^\s*erDiagram/.test(e),"detector"),a2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./erDiagram-INFDFZHY-kDj6gvOH.js");return{diagram:t}},__vite__mapDeps([18,15,8,16,17,0,1]));return{id:vd,diagram:e}},"loader"),s2={id:vd,detector:i2,loader:a2},n2=s2,Sd="gitGraph",o2=p(e=>/^\s*gitGraph/.test(e),"detector"),l2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./gitGraphDiagram-K3NZZRJ6-D4eeLV-l.js");return{diagram:t}},__vite__mapDeps([19,20,21,22,0,1,4,6,7,8]));return{id:Sd,diagram:e}},"loader"),c2={id:Sd,detector:o2,loader:l2},h2=c2,Td="gantt",u2=p(e=>/^\s*gantt/.test(e),"detector"),d2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./ganttDiagram-A5KZAMGK-D1W7NciY.js");return{diagram:t}},__vite__mapDeps([23,0,1,8,24,25,26]));return{id:Td,diagram:e}},"loader"),f2={id:Td,detector:u2,loader:d2},p2=f2,Bd="info",g2=p(e=>/^\s*info/.test(e),"detector"),m2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./infoDiagram-LFFYTUFH-DsQ9EVx0.js");return{diagram:t}},__vite__mapDeps([27,22,0,1,4,6,7,8]));return{id:Bd,diagram:e}},"loader"),y2={id:Bd,detector:g2,loader:m2},Ld="pie",x2=p(e=>/^\s*pie/.test(e),"detector"),b2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./pieDiagram-SKSYHLDU-2ekrtn6z.js");return{diagram:t}},__vite__mapDeps([28,20,22,0,1,4,6,7,8,29,30,25]));return{id:Ld,diagram:e}},"loader"),C2={id:Ld,detector:x2,loader:b2},$d="quadrantChart",k2=p(e=>/^\s*quadrantChart/.test(e),"detector"),_2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./quadrantDiagram-337W2JSQ-BoTofVsV.js");return{diagram:t}},__vite__mapDeps([31,8,24,25,26,0,1]));return{id:$d,diagram:e}},"loader"),w2={id:$d,detector:k2,loader:_2},v2=w2,Md="xychart",S2=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),T2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./xychartDiagram-JWTSCODW-Be2x0vdX.js");return{diagram:t}},__vite__mapDeps([32,8,25,30,24,26,0,1]));return{id:Md,diagram:e}},"loader"),B2={id:Md,detector:S2,loader:T2},L2=B2,Ad="requirement",$2=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),M2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./requirementDiagram-Z7DCOOCP-LSodooxy.js");return{diagram:t}},__vite__mapDeps([33,15,8,16,0,1]));return{id:Ad,diagram:e}},"loader"),A2={id:Ad,detector:$2,loader:M2},F2=A2,Fd="sequence",E2=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),D2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./sequenceDiagram-2WXFIKYE-C01qZdHR.js");return{diagram:t}},__vite__mapDeps([34,12,8,21,0,1]));return{id:Fd,diagram:e}},"loader"),O2={id:Fd,detector:E2,loader:D2},P2=O2,Ed="class",I2=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),R2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./classDiagram-VBA2DB6C-gcpKg8SN.js");return{diagram:t}},__vite__mapDeps([35,36,14,12,8,15,16,0,1]));return{id:Ed,diagram:e}},"loader"),N2={id:Ed,detector:I2,loader:R2},z2=N2,Dd="classDiagram",W2=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),q2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./classDiagram-v2-RAHNMMFH-gcpKg8SN.js");return{diagram:t}},__vite__mapDeps([37,36,14,12,8,15,16,0,1]));return{id:Dd,diagram:e}},"loader"),H2={id:Dd,detector:W2,loader:q2},j2=H2,Od="state",Y2=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),G2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./stateDiagram-RAJIS63D-BuPj1Py4.js");return{diagram:t}},__vite__mapDeps([38,39,15,8,16,3,4,5,6,0,1]));return{id:Od,diagram:e}},"loader"),V2={id:Od,detector:Y2,loader:G2},U2=V2,Pd="stateDiagram",X2=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Z2=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./stateDiagram-v2-FVOUBMTO-CjYACBI3.js");return{diagram:t}},__vite__mapDeps([40,39,15,8,16,0,1]));return{id:Pd,diagram:e}},"loader"),K2={id:Pd,detector:X2,loader:Z2},Q2=K2,Id="journey",J2=p(e=>/^\s*journey/.test(e),"detector"),tC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./journeyDiagram-4ABVD52K-BkKgSN_9.js");return{diagram:t}},__vite__mapDeps([41,14,12,8,29,0,1]));return{id:Id,diagram:e}},"loader"),eC={id:Id,detector:J2,loader:tC},rC=eC,iC=p((e,t,r)=>{A.debug(`rendering svg for syntax error
244
+ `);const i=Op(t),a=i.append("g");i.attr("viewBox","0 0 2412 512"),Oo(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Rd={draw:iC},aC=Rd,sC={db:{},renderer:Rd,parser:{parse:p(()=>{},"parse")}},nC=sC,Nd="flowchart-elk",oC=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),lC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-CsQeJUub.js");return{diagram:t}},__vite__mapDeps([13,14,12,8,15,16,0,1,17]));return{id:Nd,diagram:e}},"loader"),cC={id:Nd,detector:oC,loader:lC},hC=cC,zd="timeline",uC=p(e=>/^\s*timeline/.test(e),"detector"),dC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./timeline-definition-YZTLITO2-CPcDqVYw.js");return{diagram:t}},__vite__mapDeps([42,8,29,0,1]));return{id:zd,diagram:e}},"loader"),fC={id:zd,detector:uC,loader:dC},pC=fC,Wd="mindmap",gC=p(e=>/^\s*mindmap/.test(e),"detector"),mC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./mindmap-definition-YRQLILUH-CVv44i-B.js");return{diagram:t}},__vite__mapDeps([43,15,8,16,0,1]));return{id:Wd,diagram:e}},"loader"),yC={id:Wd,detector:gC,loader:mC},xC=yC,qd="kanban",bC=p(e=>/^\s*kanban/.test(e),"detector"),CC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./kanban-definition-K7BYSVSG-DIJz6AsI.js");return{diagram:t}},__vite__mapDeps([44,14,0,1,8]));return{id:qd,diagram:e}},"loader"),kC={id:qd,detector:bC,loader:CC},_C=kC,Hd="sankey",wC=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),vC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./sankeyDiagram-WA2Y5GQK-DUXSSMar.js");return{diagram:t}},__vite__mapDeps([45,8,30,25,0,1]));return{id:Hd,diagram:e}},"loader"),SC={id:Hd,detector:wC,loader:vC},TC=SC,jd="packet",BC=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),LC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./diagram-P4PSJMXO-Bf1-kRnd.js");return{diagram:t}},__vite__mapDeps([46,20,22,0,1,4,6,7,8]));return{id:jd,diagram:e}},"loader"),$C={id:jd,detector:BC,loader:LC},Yd="radar",MC=p(e=>/^\s*radar-beta/.test(e),"detector"),AC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./diagram-IFDJBPK2-ChVpZldk.js");return{diagram:t}},__vite__mapDeps([47,20,22,0,1,4,6,7,8]));return{id:Yd,diagram:e}},"loader"),FC={id:Yd,detector:MC,loader:AC},Gd="block",EC=p(e=>/^\s*block(-beta)?/.test(e),"detector"),DC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./blockDiagram-WCTKOSBZ-CL-sI8NU.js");return{diagram:t}},__vite__mapDeps([48,14,7,4,8,3,17,0,1]));return{id:Gd,diagram:e}},"loader"),OC={id:Gd,detector:EC,loader:DC},PC=OC,Vd="architecture",IC=p(e=>/^\s*architecture/.test(e),"detector"),RC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./architectureDiagram-2XIMDMQ5-CRV28Qi0.js");return{diagram:t}},__vite__mapDeps([49,20,22,0,1,4,6,7,10,8]));return{id:Vd,diagram:e}},"loader"),NC={id:Vd,detector:IC,loader:RC},zC=NC,Ud="ishikawa",WC=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),qC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./ishikawaDiagram-PHBUUO56-MzetUfFK.js");return{diagram:t}},__vite__mapDeps([50,0,1,8]));return{id:Ud,diagram:e}},"loader"),HC={id:Ud,detector:WC,loader:qC},Xd="venn",jC=p(e=>/^\s*venn-beta/.test(e),"detector"),YC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./vennDiagram-LZ73GAT5-BDAdfrV5.js");return{diagram:t}},__vite__mapDeps([51,8,0,1]));return{id:Xd,diagram:e}},"loader"),GC={id:Xd,detector:jC,loader:YC},VC=GC,Zd="treemap",UC=p(e=>/^\s*treemap/.test(e),"detector"),XC=p(async()=>{const{diagram:e}=await st(async()=>{const{diagram:t}=await import("./diagram-E7M64L7V-docJyJu4.js");return{diagram:t}},__vite__mapDeps([52,16,20,22,0,1,4,6,7,8,26,30,25]));return{id:Zd,diagram:e}},"loader"),ZC={id:Zd,detector:UC,loader:XC},fo=!1,aa=p(()=>{fo||(fo=!0,ui("error",nC,e=>e.toLowerCase().trim()==="error"),ui("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xa(hC,xC,zC),xa(U1,_C,j2,z2,n2,p2,y2,C2,F2,P2,r2,Q1,pC,h2,Q2,U2,rC,v2,TC,$C,L2,PC,FC,HC,ZC,VC))},"addDiagrams"),KC=p(async()=>{A.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Le).map(async([r,{detector:i,loader:a}])=>{if(a)try{_a(r)}catch{try{const{diagram:s,id:o}=await a();ui(o,s,i)}catch(s){throw A.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Le[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){A.error(`Failed to load ${t.length} external diagrams`);for(const r of t)A.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),QC="graphics-document document";function Kd(e,t){e.attr("role",QC),t!==""&&e.attr("aria-roledescription",t)}p(Kd,"setA11yDiagramInfo");function Qd(e,t,r,i){if(e.insert!==void 0){if(r){const a=`chart-desc-${i}`;e.attr("aria-describedby",a),e.insert("desc",":first-child").attr("id",a).text(r)}if(t){const a=`chart-title-${i}`;e.attr("aria-labelledby",a),e.insert("title",":first-child").attr("id",a).text(t)}}}p(Qd,"addSVGa11yTitleDescription");var ns=class Jd{constructor(t,r,i,a,s){this.type=t,this.text=r,this.db=i,this.parser=a,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=wt(),a=cs(t,i);t=Ry(t)+`
245
245
  `;try{_a(a)}catch{const c=Tf(a);if(!c)throw new ko(`Diagram ${a} not found.`);const{id:h,diagram:u}=await c();ui(h,u)}const{db:s,parser:o,renderer:n,init:l}=_a(a);return o.parser&&(o.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await o.parse(t),new Jd(a,t,s,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},po=[],JC=p(()=>{po.forEach(e=>{e()}),po=[]},"attachFunctions"),tk=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function tf(e){const t=e.match(Co);if(!t)return{text:e,metadata:{}};let r=qg(t[1],{schema:Wg})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(tf,"extractFrontMatter");var ek=p(e=>e.replace(/\r\n?/g,`
246
246
  `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),rk=p(e=>{const{text:t,metadata:r}=tf(e),{displayMode:i,title:a,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:a,config:s,text:t}},"processFrontmatter"),ik=p(e=>{const t=Wt.detectInit(e)??{},r=Wt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:Sy(e),directive:t}},"processDirectives");function en(e){const t=ek(e),r=rk(t),i=ik(r.text),a=Is(r.config,i.directive);return e=tk(i.text),{code:e,title:r.title,config:a}}p(en,"preprocessDiagram");function ef(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(ef,"toBase64");var ak=5e4,sk="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",nk="sandbox",ok="loose",lk="http://www.w3.org/2000/svg",ck="http://www.w3.org/1999/xlink",hk="http://www.w3.org/1999/xhtml",uk="100%",dk="100%",fk="border:0;margin:0;",pk="margin:0",gk="allow-top-navigation-by-user-activation allow-popups",mk='The "iframe" tag is not supported by your browser.',yk=["foreignobject"],xk=["dominant-baseline"];function rn(e){const t=en(e);return ci(),qf(t.config??{}),t}p(rn,"processAndSetConfigs");async function rf(e,t){aa();try{const{code:r,config:i}=rn(e);return{diagramType:(await sf(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(rf,"parse");var go=p((e,t,r=[])=>`
247
247
  .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),bk=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
@@ -251,4 +251,4 @@ ${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
251
251
  ${mk}
252
252
  </iframe>`},"putIntoIFrame"),mo=p((e,t,r,i,a)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const o=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",lk);return a&&o.attr("xmlns:xlink",a),o.append("g"),e},"appendDivSvgG");function os(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(os,"sandboxedIframe");var wk=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),vk=p(async function(e,t,r){aa();const i=rn(t);t=i.code;const a=wt();A.debug(a),t.length>(a?.maxTextSize??ak)&&(t=sk);const s="#"+e,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=p(()=>{const O=rt(f?n:c).node();O&&"remove"in O&&O.remove()},"removeTempElements");let u=rt("body");const f=a.securityLevel===nk,d=a.securityLevel===ok,g=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const I=os(rt(r),o);u=rt(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=rt(r);mo(u,e,l,`font-family: ${g}`,ck)}else{if(wk(document,e,l,o),f){const I=os(rt("body"),o);u=rt(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=rt("body");mo(u,e,l)}let m,y;try{m=await ns.fromText(t,{title:i.title})}catch(I){if(a.suppressErrorRendering)throw h(),I;m=await ns.fromText("error"),y=I}const x=u.select(c).node(),b=m.type,k=x.firstChild,v=k.firstChild,_=m.renderer.getClasses?.(t,m),S=Ck(a,b,_,s),T=document.createElement("style");T.innerHTML=S,k.insertBefore(T,v);try{await m.renderer.draw(t,e,"11.13.0",m)}catch(I){throw a.suppressErrorRendering?h():aC.draw(t,e,"11.13.0"),I}const F=u.select(`${c} svg`),P=m.db.getAccTitle?.(),D=m.db.getAccDescription?.();nf(b,F,P,D),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",hk);let E=u.select(c).node().innerHTML;if(A.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),E=kk(E,f,xe(a.arrowMarkerAbsolute)),f){const I=u.select(c+" svg").node();E=_k(E,I)}else d||(E=Ye.sanitize(E,{ADD_TAGS:yk,ADD_ATTR:xk,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(JC(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function af(e={}){const t=gt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),zf(t),t?.theme&&t.theme in te?t.themeVariables=te[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=te.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Nf(t):To();ls(r.logLevel),aa()}p(af,"initialize");var sf=p((e,t={})=>{const{code:r}=en(e);return ns.fromText(r,t)},"getDiagramFromText");function nf(e,t,r,i){Kd(t,e),Qd(t,r,i,t.attr("id"))}p(nf,"addA11yInfo");var Ee=Object.freeze({render:vk,parse:rf,getDiagramFromText:sf,initialize:af,getConfig:wt,setConfig:Bo,getSiteConfig:To,updateSiteConfig:Wf,reset:p(()=>{ci()},"reset"),globalReset:p(()=>{ci(Ge)},"globalReset"),defaultConfig:Ge});ls(wt().logLevel);ci(wt());var Sk=p((e,t,r)=>{A.warn(e),Ps(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"),of=p(async function(e={querySelector:".mermaid"}){try{await Tk(e)}catch(t){if(Ps(t)&&A.error(t.str),ie.parseError&&ie.parseError(t),!e.suppressErrors)throw A.error("Use the suppressErrors option to suppress these errors"),t}},"run"),Tk=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ee.getConfig();A.debug(`${e?"":"No "}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");A.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(A.debug("Start On Load: "+i?.startOnLoad),Ee.updateSiteConfig({startOnLoad:i?.startOnLoad}));const s=new Wt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(a)){if(A.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;o=l.innerHTML,o=vh(Wt.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Wt.detectInit(o);h&&A.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await uf(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){Sk(u,n,ie.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),lf=p(function(e){Ee.initialize(e)},"initialize"),Bk=p(async function(e,t,r){A.warn("mermaid.init is deprecated. Please use run instead."),e&&lf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await of(i)},"init"),Lk=p(async(e,{lazyLoad:t=!0}={})=>{aa(),xa(...e),t===!1&&await KC()},"registerExternalDiagrams"),cf=p(function(){if(ie.startOnLoad){const{startOnLoad:e}=Ee.getConfig();e&&ie.run().catch(t=>A.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",cf,!1);var $k=p(function(e){ie.parseError=e},"setParseErrorHandler"),Oi=[],ya=!1,hf=p(async()=>{if(!ya){for(ya=!0;Oi.length>0;){const e=Oi.shift();if(e)try{await e()}catch(t){A.error("Error executing queue",t)}}ya=!1}},"executeQueue"),Mk=p(async(e,t)=>new Promise((r,i)=>{const a=p(()=>new Promise((s,o)=>{Ee.parse(e,t).then(n=>{s(n),r(n)},n=>{A.error("Error parsing",n),ie.parseError?.(n),o(n),i(n)})}),"performCall");Oi.push(a),hf().catch(i)}),"parse"),uf=p((e,t,r)=>new Promise((i,a)=>{const s=p(()=>new Promise((o,n)=>{Ee.render(e,t,r).then(l=>{o(l),i(l)},l=>{A.error("Error parsing",l),ie.parseError?.(l),n(l),a(l)})}),"performCall");Oi.push(s),hf().catch(a)}),"render"),Ak=p(()=>Object.keys(Le).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ie={startOnLoad:!0,mermaidAPI:Ee,parse:Mk,render:uf,init:Bk,run:of,registerExternalDiagrams:Lk,registerLayoutLoaders:pd,initialize:lf,parseError:void 0,contentLoaded:cf,setParseErrorHandler:$k,detectType:cs,registerIconPacks:Yx,getRegisteredDiagramsMetadata:Ak},Fk=ie;/*! Check if previously processed *//*!
253
253
  * Wait for document loaded before starting the execution
254
- */const c_=Object.freeze(Object.defineProperty({__proto__:null,default:Fk},Symbol.toStringTag,{value:"Module"}));export{Ff as $,yr as A,yf as B,Ut as C,mp as D,Is as E,So as F,wt as G,My as H,Op as I,Wg as J,_p as K,gs as L,qk as M,Yk as N,Re as O,un as P,hn as Q,Vk as R,Gk as S,jk as T,J as U,zk as V,Wk as W,Hk as X,Xk as Y,Uk as Z,p as _,hp as a,$s as a$,wr as a0,Ik as a1,Xi as a2,ky as a3,Zf as a4,Do as a5,on as a6,Tp as a7,Sa as a8,$y as a9,Y as aA,i_ as aB,Vb as aC,qb as aD,Wb as aE,Vx as aF,bo as aG,wp as aH,Pk as aI,zr as aJ,Yx as aK,jx as aL,De as aM,xy as aN,Qc as aO,ji as aP,Ui as aQ,vi as aR,th as aS,Kc as aT,U0 as aU,j as aV,uh as aW,mf as aX,my as aY,cy as aZ,Zm as a_,ap as aa,Er as ab,W as ac,U as ad,Po as ae,xb as af,hd as ag,s_ as ah,Hg as ai,Tt as aj,se as ak,ar as al,Rs as am,nh as an,Je as ao,hh as ap,q as aq,yy as ar,c0 as as,hy as at,Ls as au,uo as av,u1 as aw,a_ as ax,n_ as ay,r_ as az,cp as b,j0 as b0,Cy as b1,Rr as b2,Ke as b3,ki as b4,ey as b5,D1 as b6,Ir as b7,wi as b8,X0 as b9,Yc as ba,Jm as bb,t0 as bc,ve as bd,An as be,e0 as bf,Ms as bg,Qm as bh,a0 as bi,Qe as bj,be as bk,Tn as bl,As as bm,Vc as bn,as as bo,by as bp,Vi as bq,c_ as br,ot as c,Oo as d,gt as e,re as f,dp as g,jt as h,Gg as i,Or as j,lh as k,A as l,Dr as m,Rk as n,l_ as o,fp as p,pp as q,o_ as r,up as s,qg as t,Wt as u,Ib as v,Ey as w,Zk as x,lp as y,Nk as z};
254
+ */const l_=Object.freeze(Object.defineProperty({__proto__:null,default:Fk},Symbol.toStringTag,{value:"Module"}));export{Ff as $,yr as A,yf as B,Ut as C,mp as D,Is as E,So as F,wt as G,My as H,Op as I,Wg as J,_p as K,gs as L,Wk as M,jk as N,Re as O,un as P,hn as Q,Gk as R,Yk as S,Hk as T,J as U,Nk as V,zk as W,qk as X,Uk as Y,Vk as Z,p as _,hp as a,$s as a$,wr as a0,Pk as a1,Xi as a2,ky as a3,Zf as a4,Do as a5,on as a6,Tp as a7,Sa as a8,$y as a9,Y as aA,r_ as aB,Vb as aC,qb as aD,Wb as aE,Vx as aF,bo as aG,wp as aH,Ok as aI,zr as aJ,Yx as aK,jx as aL,De as aM,xy as aN,Qc as aO,ji as aP,Ui as aQ,vi as aR,th as aS,Kc as aT,U0 as aU,j as aV,uh as aW,mf as aX,my as aY,cy as aZ,Zm as a_,ap as aa,Er as ab,W as ac,U as ad,Po as ae,xb as af,hd as ag,a_ as ah,Hg as ai,Tt as aj,se as ak,ar as al,Rs as am,nh as an,Je as ao,hh as ap,q as aq,yy as ar,c0 as as,hy as at,Ls as au,uo as av,u1 as aw,i_ as ax,s_ as ay,e_ as az,cp as b,j0 as b0,Cy as b1,Rr as b2,Ke as b3,ki as b4,ey as b5,D1 as b6,Ir as b7,wi as b8,X0 as b9,Yc as ba,Jm as bb,t0 as bc,ve as bd,An as be,e0 as bf,Ms as bg,Qm as bh,a0 as bi,Qe as bj,be as bk,Tn as bl,As as bm,Vc as bn,as as bo,by as bp,Vi as bq,l_ as br,ot as c,Oo as d,gt as e,re as f,dp as g,jt as h,Gg as i,Or as j,lh as k,A as l,Dr as m,Ik as n,o_ as o,fp as p,pp as q,n_ as r,up as s,qg as t,Wt as u,Ib as v,Ey as w,Xk as x,lp as y,Rk as z};