lookatstudy-mobile 0.31.0 → 0.31.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/package.json +1 -1
  2. package/server.cjs +15331 -9819
  3. package/sql-wasm.wasm +0 -0
  4. package/web/assets/{CanvasStage-Cyt4NB7v.js → CanvasStage-BbqLSbD4.js} +1 -1
  5. package/web/assets/{CommandPalette-maHlqYwL.js → CommandPalette-DQ5w84ic.js} +1 -1
  6. package/web/assets/{CompanionBotLab-BjbCeiRW.js → CompanionBotLab-4Juuhsy3.js} +1 -1
  7. package/web/assets/{CourseSearchPanel-wyjGWBGr.js → CourseSearchPanel-ThxY4JL1.js} +1 -1
  8. package/web/assets/{ExamView-BoGgfcwj.js → ExamView-DVLRcljJ.js} +1 -1
  9. package/web/assets/{ReviewPanel-BxY2T_Ut.js → ReviewPanel-D1jKVMQK.js} +1 -1
  10. package/web/assets/{SettingsView-CdxkxEkP.js → SettingsView-BHoTkY38.js} +2 -2
  11. package/web/assets/{VoicePanel-BzRCM6vH.js → VoicePanel-BP1Ur7sF.js} +1 -1
  12. package/web/assets/{abnfDiagram-N423BO3Z-iXwATPSN.js → abnfDiagram-VCTEODGH-Ca-5zS8J.js} +1 -1
  13. package/web/assets/{abnfDiagram-VCTEODGH-ODA7YWAP-C1yAT6qh.js → abnfDiagram-VCTEODGH-ODA7YWAP-ZI6_0Jfq.js} +1 -1
  14. package/web/assets/{arc-DIdxrd7q.js → arc-D2ssjz3E.js} +1 -1
  15. package/web/assets/{architectureDiagram-5GKGNRK7-C4PU3XN7-NvY1Ic-5.js → architectureDiagram-5GKGNRK7-C4PU3XN7-B2bOUqy0.js} +1 -1
  16. package/web/assets/{architectureDiagram-T3A2C74G-DwrvQJhj.js → architectureDiagram-5GKGNRK7-DCEYr1uX.js} +1 -1
  17. package/web/assets/{arrow-right-33rr0pBZ.js → arrow-right---oCZhx2.js} +1 -1
  18. package/web/assets/blockDiagram-I7D4REHJ-Dx9xiTwp.js +129 -0
  19. package/web/assets/{blockDiagram-NRAW4CY4-UMJ6PMQQ-DsNh9SAm.js → blockDiagram-NRAW4CY4-UMJ6PMQQ-Do5yGQuh.js} +1 -1
  20. package/web/assets/c4Diagram-7LVT6UL2-DXh9Ebug.js +38 -0
  21. package/web/assets/{c4Diagram-UCG6FXSJ-75X3U2P3-Df4YtSzV.js → c4Diagram-UCG6FXSJ-75X3U2P3-DH7ShBLp.js} +1 -1
  22. package/web/assets/channel-CNRWz7VW.js +1 -0
  23. package/web/assets/{chunk-2Q5K7J3B-D2YxB7H3.js → chunk-2Q5K7J3B-Bbluh_im.js} +1 -1
  24. package/web/assets/{chunk-5VM5RSS4-CdfFIz--.js → chunk-5VM5RSS4-CwJZ1eAQ.js} +1 -1
  25. package/web/assets/{chunk-7XDTSPCN-BBCpJUAH.js → chunk-7XDTSPCN-3TtQfLC2.js} +1 -1
  26. package/web/assets/{chunk-CTNIYPP6-DW2rJhu_.js → chunk-CTNIYPP6--48noAMq.js} +1 -1
  27. package/web/assets/{chunk-CXNFBKHE-renpw2QE.js → chunk-CXNFBKHE-BMfLUSYr.js} +1 -1
  28. package/web/assets/{chunk-2GRJ4B5K-BqUg5toN.js → chunk-F27PBJKO-DQz5Eh8R.js} +1 -1
  29. package/web/assets/{chunk-5RXB4S5H-zfO8batT.js → chunk-IMKFNOWR-mEHtzDJe.js} +5 -5
  30. package/web/assets/{chunk-ISA7TJRJ-DhN-xjNX.js → chunk-ISA7TJRJ-Cua7d2fi.js} +1 -1
  31. package/web/assets/{chunk-JWPE2WC7-smESCI0k.js → chunk-JWPE2WC7-DqWkk9f8.js} +1 -1
  32. package/web/assets/{chunk-LV3HUYFY-DTGGOw_N.js → chunk-LV3HUYFY-BCzMQT8Q.js} +1 -1
  33. package/web/assets/{chunk-M3IUQBOH-Cp2xYH3K.js → chunk-M3IUQBOH-B-r9ydC6.js} +1 -1
  34. package/web/assets/{chunk-NDIOYS4C-B_iYUPk5.js → chunk-NDIOYS4C-DkAwrWHj.js} +1 -1
  35. package/web/assets/{chunk-KBJHAD2P-CLazgX1V.js → chunk-POPQ4Y6H-BjpioqkZ.js} +1 -1
  36. package/web/assets/{chunk-RE4WF27V-DFrNGxeZ.js → chunk-RE4WF27V-CJEnGv6g.js} +1 -1
  37. package/web/assets/{chunk-6Q2QTUOP-c0FQ_SfU.js → chunk-SVP7TREG-DGaiaQgi.js} +4 -4
  38. package/web/assets/{chunk-GF5L2VYU-DiF8ZWcT.js → chunk-TICWLB2K-DqXyoflV.js} +1 -1
  39. package/web/assets/{chunk-VII2H2IX-CTIhHlIp.js → chunk-VII2H2IX-CHqS8QXi.js} +1 -1
  40. package/web/assets/{chunk-X5GNSKZ3-BnL2P09p.js → chunk-X5GNSKZ3-CPiurspk.js} +1 -1
  41. package/web/assets/{chunk-XCWWM2C3-B3diWYxV.js → chunk-XCWWM2C3-CnpRc-BX.js} +1 -1
  42. package/web/assets/{chunk-XXDRQBXY-Cm9DsbCI.js → chunk-XXDRQBXY-xXPgDheN.js} +1 -1
  43. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-C5s2iR9J.js +1 -0
  44. package/web/assets/classDiagram-ZZMXUADV-Cjli-tvb.js +1 -0
  45. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-C5s2iR9J.js +1 -0
  46. package/web/assets/classDiagram-v2-VYDZK3BY-Cjli-tvb.js +1 -0
  47. package/web/assets/{core-CnhTLa0G.js → core-iYZpQJa6.js} +1 -1
  48. package/web/assets/{cose-bilkent-JH36ORCC-B1ZJcbUV.js → cose-bilkent-JH36ORCC-Dr_WUhVB.js} +1 -1
  49. package/web/assets/{cose-bilkent-JH36ORCC-OB24KH3T-BJpRu0cc.js → cose-bilkent-JH36ORCC-OB24KH3T-CQsWVK5X.js} +1 -1
  50. package/web/assets/{cynefin-OW5HDTMX-GVF3BKWE-CLl32jOg.js → cynefin-OW5HDTMX-GVF3BKWE-DwLRaQ37.js} +1 -1
  51. package/web/assets/{cynefin-VYW2F7L2-BFZHy-wK.js → cynefin-OW5HDTMX-fybCqBi3.js} +3 -3
  52. package/web/assets/{cynefinDiagram-MW4NZA55-BECq_tlH.js → cynefinDiagram-5FMLGOSQ-BLqywzF8.js} +2 -2
  53. package/web/assets/{cynefinDiagram-5FMLGOSQ-H3WIRU3N-BpmHF9Wo.js → cynefinDiagram-5FMLGOSQ-H3WIRU3N-D7Mzcgjs.js} +1 -1
  54. package/web/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
  55. package/web/assets/{dagre-3AP2YEHR-DCERTXHT-DIUrMTsj.js → dagre-3AP2YEHR-DCERTXHT-C3dpohva.js} +1 -1
  56. package/web/assets/dagre-GXQ25YYZ-QPjECY_W.js +4 -0
  57. package/web/assets/diagram-S7CK7UJ4-CwZRApeF.js +30 -0
  58. package/web/assets/{diagram-S7CK7UJ4-MULGZGEL-Bpt08-bP.js → diagram-S7CK7UJ4-MULGZGEL-Czqn_Fna.js} +1 -1
  59. package/web/assets/diagram-UQ7AKVKN-Bo8gzrdx.js +41 -0
  60. package/web/assets/{diagram-UQ7AKVKN-YQBY353J-DORAQMoA.js → diagram-UQ7AKVKN-YQBY353J-CgDXcRAT.js} +1 -1
  61. package/web/assets/{diagram-B4RE2ZJO-dNtQBNGN.js → diagram-VSXAHHWV-0w4db5zY.js} +3 -3
  62. package/web/assets/{diagram-VSXAHHWV-WLNH2ELY-Ce82dDi6.js → diagram-VSXAHHWV-WLNH2ELY-DbTl04rE.js} +1 -1
  63. package/web/assets/{diagram-Q27KOJAE-Bi0oJVBH.js → diagram-VX7I27RA-DJvH_pmt.js} +11 -11
  64. package/web/assets/{diagram-VX7I27RA-XW6YQV5G-D-fdo9DM.js → diagram-VX7I27RA-XW6YQV5G-fzWHr6UJ.js} +1 -1
  65. package/web/assets/{diagram-LBJQPF4R-BoiQEUHl.js → diagram-Z3DM3KII-DsT5qGVe.js} +2 -2
  66. package/web/assets/{diagram-Z3DM3KII-HG7RF65D-ZqMt25Js.js → diagram-Z3DM3KII-HG7RF65D-CDqb1-LL.js} +1 -1
  67. package/web/assets/{ebnfDiagram-BXEA7PRR-R3UwRAR7.js → ebnfDiagram-PWID7BFC-BoB0yBxV.js} +1 -1
  68. package/web/assets/{ebnfDiagram-PWID7BFC-OKY4VHYD-DDVM1P1I.js → ebnfDiagram-PWID7BFC-OKY4VHYD-Dl7tZHv0.js} +1 -1
  69. package/web/assets/{elk.bundled-Dv5OJ-BO.js → elk.bundled-Fo5ndUql.js} +1 -1
  70. package/web/assets/erDiagram-RLTQ6QDP-TcPkrxxF.js +99 -0
  71. package/web/assets/{erDiagram-SSCWMZ5O-PIPKOIK7-CxTLMFn2.js → erDiagram-SSCWMZ5O-PIPKOIK7-C13XODn3.js} +1 -1
  72. package/web/assets/{flowDiagram-A5DVABFB-2Z4AVO5R-DRUX3zZ5.js → flowDiagram-A5DVABFB-2Z4AVO5R-DNbmNTnm.js} +1 -1
  73. package/web/assets/flowDiagram-HODETNUW-D2o5XxIm.js +168 -0
  74. package/web/assets/{ganttDiagram-PKOTCBZU-D-5FV0PV.js → ganttDiagram-EL5Y4UJY-D36iMZvH.js} +1 -1
  75. package/web/assets/{ganttDiagram-EL5Y4UJY-JZNG7GOG-DjG0obYU.js → ganttDiagram-EL5Y4UJY-JZNG7GOG-C5IgtJLL.js} +1 -1
  76. package/web/assets/{gitGraphDiagram-WWUBYQGX-DMWMLL3G-D70uly9x.js → gitGraphDiagram-WWUBYQGX-DMWMLL3G-BA7YVBKU.js} +1 -1
  77. package/web/assets/{gitGraphDiagram-DS77QQ5N-DF-LawNi.js → gitGraphDiagram-WWUBYQGX-DoayvLMW.js} +3 -3
  78. package/web/assets/{index-X3hjUtR3.js → index-5UvRMS_e.js} +1 -1
  79. package/web/assets/index-CJuEfFQr.js +53 -0
  80. package/web/assets/{index-CApU5KjU.js → index-DtMB_WdP.js} +1 -1
  81. package/web/assets/{index-DawWPxKA.js → index-Zmq94tKz.js} +4 -4
  82. package/web/assets/{infoDiagram-6WML65LV-w8kz4hEa.js → infoDiagram-27XIBGKW-DbMBXMvx.js} +1 -1
  83. package/web/assets/{infoDiagram-RXCK75RN-HANS5KVC-C1PHC-YD.js → infoDiagram-RXCK75RN-HANS5KVC-NdEBDyb0.js} +1 -1
  84. package/web/assets/{ishikawaDiagram-5VMMS53U-7GCIT7WU-BrPFk2Ox.js → ishikawaDiagram-5VMMS53U-7GCIT7WU-CzqV69s-.js} +1 -1
  85. package/web/assets/{ishikawaDiagram-WSZJBQD7-C34Z0ADb.js → ishikawaDiagram-5VMMS53U-j9THtiQE.js} +4 -4
  86. package/web/assets/{journeyDiagram-NVQOT4AX-B6wtGi4C.js → journeyDiagram-3NMN7TZE-C3h3msUP.js} +2 -2
  87. package/web/assets/{journeyDiagram-EYS64GPL-OAPELBT7-CVn7FA19.js → journeyDiagram-EYS64GPL-OAPELBT7-ChETfPiS.js} +1 -1
  88. package/web/assets/{kanban-definition-3QL26DDD-I7RKWQQY-DSkHnZWn.js → kanban-definition-3QL26DDD-I7RKWQQY-Wjr70XLu.js} +1 -1
  89. package/web/assets/{kanban-definition-27J2QSJJ-Cauno8t4.js → kanban-definition-UXKFOSKX-C1b6cL5N.js} +6 -6
  90. package/web/assets/{katex-N6JRN4PM-7jQy_F2_.js → katex-N6JRN4PM-BIpBcqrZ.js} +1 -1
  91. package/web/assets/layout-D2XzcM9d.js +1 -0
  92. package/web/assets/{linear-DQOfHiUP.js → linear-CZIIlCMp.js} +1 -1
  93. package/web/assets/{main-BXa7WYYr.css → main-D9IB7N5p.css} +1 -1
  94. package/web/assets/{main-CmJlqSDk.js → main-Dj875aWF.js} +83 -83
  95. package/web/assets/{mermaid-layout-elk.core-h_IjwDpP.js → mermaid-layout-elk.core-CNNSrMhF.js} +2 -2
  96. package/web/assets/mermaid.core-CnNeOEec.js +312 -0
  97. package/web/assets/{mindmap-definition-FBJOCRG2-KIYZG64Y-De94GIvB.js → mindmap-definition-FBJOCRG2-KIYZG64Y-CE91aZQc.js} +1 -1
  98. package/web/assets/{mindmap-definition-FAOFIHXS-oc1QsLGD.js → mindmap-definition-YA3MSWOX-Dz0JwUgH.js} +1 -1
  99. package/web/assets/{pegDiagram-VL7TDLO6-C9eNGZDr.js → pegDiagram-XKGWAZYB-BEOg8IHd.js} +1 -1
  100. package/web/assets/{pegDiagram-XKGWAZYB-OIP57N6J-C2k8WABX.js → pegDiagram-XKGWAZYB-OIP57N6J-CB6_i_dk.js} +1 -1
  101. package/web/assets/{pet-D6jEJc1f.js → pet-B9Zl6XGT.js} +1 -1
  102. package/web/assets/pie-CJLEE_I4.js +1 -0
  103. package/web/assets/{pieDiagram-E7YTZNPT-2UOTW327-h1VN7kXL.js → pieDiagram-E7YTZNPT-2UOTW327-C_aP-GDD.js} +1 -1
  104. package/web/assets/{pieDiagram-7S7Q4E2Y-lAjmXNe_.js → pieDiagram-E7YTZNPT-Btcl-uz0.js} +3 -3
  105. package/web/assets/{quadrantDiagram-CIZ2JOQS-B0NfwoFD.js → quadrantDiagram-AXDQQJYC-CA7HBTBO.js} +1 -1
  106. package/web/assets/{quadrantDiagram-AXDQQJYC-SN3ASJJK-CVllGfdW.js → quadrantDiagram-AXDQQJYC-SN3ASJJK-CAd5tIhG.js} +1 -1
  107. package/web/assets/{railroadDiagram-O6MQD6OU-34742W6X-CqYqMw2v.js → railroadDiagram-O6MQD6OU-34742W6X-CLWiLZG6.js} +1 -1
  108. package/web/assets/{railroadDiagram-AXF67PYL-BiLISELA.js → railroadDiagram-O6MQD6OU-B7dkMwzi.js} +1 -1
  109. package/web/assets/{render-O7CIS3YK-C1DYXW0Z.js → render-O7CIS3YK-DQb_czkx.js} +7 -7
  110. package/web/assets/{requirementDiagram-LRYGKXZP-BMUGWzen.js → requirementDiagram-BXWQKSXE-C70GJhMZ.js} +5 -5
  111. package/web/assets/{requirementDiagram-EFPCY7ZU-NGAFFSMB-6i5RYobc.js → requirementDiagram-EFPCY7ZU-NGAFFSMB-Bc0CRxi2.js} +1 -1
  112. package/web/assets/{rotate-ccw-DhViz0iw.js → rotate-ccw-JEjtXKlH.js} +1 -1
  113. package/web/assets/{sankeyDiagram-P5KCCOFB-3D3M4XPB-EtCUQUn1.js → sankeyDiagram-P5KCCOFB-3D3M4XPB-B9PL6--N.js} +1 -1
  114. package/web/assets/{sankeyDiagram-W5VNT64P-C_r4P5MM.js → sankeyDiagram-P5KCCOFB-BJl2AqaQ.js} +2 -2
  115. package/web/assets/{sequenceDiagram-SI44F4Z6-pG01U8Cr.js → sequenceDiagram-WJ2MYXX4-DtmTM2Q1.js} +4 -4
  116. package/web/assets/{sequenceDiagram-WJ2MYXX4-Q2IOPB4R-sL3lWU4l.js → sequenceDiagram-WJ2MYXX4-Q2IOPB4R-DH1L8a7Q.js} +1 -1
  117. package/web/assets/{sizeCapture-X5ZJPWSS-TfK3b41W.js → sizeCapture-INFHLROL-e9akerky.js} +1 -1
  118. package/web/assets/{sizeCapture-X5ZJPWSS-PSGVOMYM-VHssc8WH.js → sizeCapture-X5ZJPWSS-PSGVOMYM-CSyLq32l.js} +1 -1
  119. package/web/assets/stateDiagram-D77RDMKH-Dc057ccO.js +1 -0
  120. package/web/assets/{stateDiagram-HBIQ2CUA-4M2S6MAN-DY0svUZL.js → stateDiagram-HBIQ2CUA-4M2S6MAN-D_uV5i1Q.js} +1 -1
  121. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-DBkBTIqA.js +1 -0
  122. package/web/assets/stateDiagram-v2-MP3YSRHH-D6iIkIH3.js +1 -0
  123. package/web/assets/swimlanes-42K2YHIH-ILKBiMPk.js +1 -0
  124. package/web/assets/{swimlanes-XN3QIQJK-N6N2CCQ6-tXCXpXUD.js → swimlanes-XN3QIQJK-N6N2CCQ6-CJ7qUhPg.js} +1 -1
  125. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-lkgr5sGZ.js +8 -0
  126. package/web/assets/swimlanesDiagram-VR7AAH4N-D-ke9u7H.js +8 -0
  127. package/web/assets/{time-BgujFIZT.js → time-C0TNQg6r.js} +1 -1
  128. package/web/assets/{timeline-definition-Z64GVDOM-BID9BJj_.js → timeline-definition-24CTP7MA-BckRkRye.js} +3 -3
  129. package/web/assets/{timeline-definition-24CTP7MA-KN7RSRVM-uhQqtZRP.js → timeline-definition-24CTP7MA-KN7RSRVM-DxSbNuQs.js} +1 -1
  130. package/web/assets/{transform-B5_amWNh.js → transform-Bd_a5eGM.js} +1 -1
  131. package/web/assets/{vennDiagram-4TSXK5OY-AKJ7LXAN-MJEMZHM_.js → vennDiagram-4TSXK5OY-AKJ7LXAN-hG9roRh0.js} +1 -1
  132. package/web/assets/{vennDiagram-T6HMQDX7-noYkNxPf.js → vennDiagram-4TSXK5OY-Bxkq0y0p.js} +5 -5
  133. package/web/assets/{wardleyDiagram-VM6X3IG4-3B6A3BN5-D_oZuxaD.js → wardleyDiagram-VM6X3IG4-3B6A3BN5-CLmKLRJP.js} +1 -1
  134. package/web/assets/{wardleyDiagram-T6FBY63Y-CnUMOnEG.js → wardleyDiagram-VM6X3IG4-CaTbamBI.js} +1 -1
  135. package/web/assets/xychartDiagram-S5SC5T6Z-CHtC3u6M.js +7 -0
  136. package/web/assets/{xychartDiagram-S5SC5T6Z-OBDNV6WG-Cd6y2GuD.js → xychartDiagram-S5SC5T6Z-OBDNV6WG-ZjDcqfTl.js} +1 -1
  137. package/web/index.html +3 -3
  138. package/web/pet.html +2 -2
  139. package/web/assets/blockDiagram-VBNYF7ZC-BX4qMKoE.js +0 -132
  140. package/web/assets/c4Diagram-5PPSVZJV-wjiwvuPV.js +0 -10
  141. package/web/assets/channel-D9baWZnV.js +0 -1
  142. package/web/assets/chunk-RYQCIY6F-CXmfoCP1.js +0 -1
  143. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-CiuZ0TyW.js +0 -1
  144. package/web/assets/classDiagram-JCYQIIEL-DJMqLmfy.js +0 -1
  145. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-CiuZ0TyW.js +0 -1
  146. package/web/assets/classDiagram-v2-OCEON4UE-DJMqLmfy.js +0 -1
  147. package/web/assets/cytoscape.esm-DTSO7Bv0.js +0 -331
  148. package/web/assets/dagre-VZM6K2ZE-D-oITinM.js +0 -4
  149. package/web/assets/diagram-7IWD3JNH-07yeFgf1.js +0 -30
  150. package/web/assets/diagram-UB23O5K3-FLVFr6Cc.js +0 -41
  151. package/web/assets/erDiagram-JOGREHBK-Dr_g_g8q.js +0 -85
  152. package/web/assets/flowDiagram-UKHOOZJN-BEX6wJhw.js +0 -156
  153. package/web/assets/graph-C9eacEi8.js +0 -1
  154. package/web/assets/index-DZN4z5wF.js +0 -53
  155. package/web/assets/layout-DEXfKzaS.js +0 -1
  156. package/web/assets/map-Czzmt4hB.js +0 -1
  157. package/web/assets/mermaid.core-n1vgOa_E.js +0 -314
  158. package/web/assets/pie-5VdQHRMI.js +0 -1
  159. package/web/assets/stateDiagram-OKZ733FA-CHPWqFKU.js +0 -1
  160. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-B2GuWRPu.js +0 -1
  161. package/web/assets/stateDiagram-v2-UEYNNEHI-mdLp8HQQ.js +0 -1
  162. package/web/assets/swimlanes-SLNWSIFB-BoK2wZ7r.js +0 -2
  163. package/web/assets/swimlanesDiagram-ULZ7WXOC-CI3RFQDZ.js +0 -8
  164. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-DLkFvd5d.js +0 -8
  165. package/web/assets/xychartDiagram-ELKLHX3M-Ck_2zrW5.js +0 -7
@@ -0,0 +1,312 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./sizeCapture-INFHLROL-e9akerky.js","./main-Dj875aWF.js","./index-CJuEfFQr.js","./index-CvvLDKMx.css","./main-D9IB7N5p.css","./transform-Bd_a5eGM.js","./dagre-GXQ25YYZ-QPjECY_W.js","./layout-D2XzcM9d.js","./swimlanes-42K2YHIH-ILKBiMPk.js","./cose-bilkent-JH36ORCC-Dr_WUhVB.js","./cytoscape.esm-Ix0LnXOy.js","./c4Diagram-7LVT6UL2-DXh9Ebug.js","./chunk-F27PBJKO-DQz5Eh8R.js","./flowDiagram-HODETNUW-D2o5XxIm.js","./chunk-5VM5RSS4-CwJZ1eAQ.js","./chunk-XXDRQBXY-xXPgDheN.js","./chunk-POPQ4Y6H-BjpioqkZ.js","./channel-CNRWz7VW.js","./swimlanesDiagram-VR7AAH4N-D-ke9u7H.js","./erDiagram-RLTQ6QDP-TcPkrxxF.js","./gitGraphDiagram-WWUBYQGX-DoayvLMW.js","./chunk-2Q5K7J3B-Bbluh_im.js","./chunk-JWPE2WC7-DqWkk9f8.js","./cynefin-OW5HDTMX-fybCqBi3.js","./ganttDiagram-EL5Y4UJY-D36iMZvH.js","./time-C0TNQg6r.js","./linear-CZIIlCMp.js","./init-Gi6I4Gst.js","./defaultLocale-5voVPcsN.js","./infoDiagram-27XIBGKW-DbMBXMvx.js","./pieDiagram-E7YTZNPT-Btcl-uz0.js","./arc-D2ssjz3E.js","./ordinal-Cboi1Yqb.js","./pie-CJLEE_I4.js","./quadrantDiagram-AXDQQJYC-CA7HBTBO.js","./xychartDiagram-S5SC5T6Z-CHtC3u6M.js","./band-dPffDWoQ.js","./requirementDiagram-BXWQKSXE-C70GJhMZ.js","./sequenceDiagram-WJ2MYXX4-DtmTM2Q1.js","./classDiagram-ZZMXUADV-Cjli-tvb.js","./chunk-TICWLB2K-DqXyoflV.js","./classDiagram-v2-VYDZK3BY-Cjli-tvb.js","./stateDiagram-D77RDMKH-Dc057ccO.js","./chunk-IMKFNOWR-mEHtzDJe.js","./stateDiagram-v2-MP3YSRHH-D6iIkIH3.js","./journeyDiagram-3NMN7TZE-C3h3msUP.js","./timeline-definition-24CTP7MA-BckRkRye.js","./mindmap-definition-YA3MSWOX-Dz0JwUgH.js","./kanban-definition-UXKFOSKX-C1b6cL5N.js","./sankeyDiagram-P5KCCOFB-BJl2AqaQ.js","./Tableau10-CvOaoHrI.js","./diagram-Z3DM3KII-DsT5qGVe.js","./diagram-UQ7AKVKN-Bo8gzrdx.js","./blockDiagram-I7D4REHJ-Dx9xiTwp.js","./diagram-S7CK7UJ4-CwZRApeF.js","./architectureDiagram-5GKGNRK7-DCEYr1uX.js","./diagram-VSXAHHWV-0w4db5zY.js","./ishikawaDiagram-5VMMS53U-j9THtiQE.js","./vennDiagram-4TSXK5OY-Bxkq0y0p.js","./diagram-VX7I27RA-DJvH_pmt.js","./index-CvYzv8kf.js","./wardleyDiagram-VM6X3IG4-CaTbamBI.js","./cynefinDiagram-5FMLGOSQ-BLqywzF8.js","./railroadDiagram-O6MQD6OU-B7dkMwzi.js","./chunk-SVP7TREG-DGaiaQgi.js","./ebnfDiagram-PWID7BFC-BoB0yBxV.js","./abnfDiagram-VCTEODGH-Ca-5zS8J.js","./pegDiagram-XKGWAZYB-BEOg8IHd.js"])))=>i.map(i=>d[i]);
2
+ var Km=Object.defineProperty;var Qm=(e,t,r)=>t in e?Km(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zt=(e,t,r)=>Qm(e,typeof t!="symbol"?t+"":t,r);import{_ as Pt}from"./main-Dj875aWF.js";import{g as Fn}from"./index-CJuEfFQr.js";import{s as It,E as Fu,F as Au,G as Eu,H as Mu,I as Ou,J as $u,K as Jm,L as Zs,M as Du,N as ty,O as ey,P as Iu,Q as ry,S as iy,T as sy,U as Pu,V as Ru,W as ay,X as oy,n as Go,l as ny}from"./transform-Bd_a5eGM.js";var qu=Object.defineProperty,p=(e,t)=>qu(e,"name",{value:t,configurable:!0}),ly=(e,t)=>{for(var r in t)qu(e,r,{get:t[r],enumerable:!0})},Ks={exports:{}},hy=Ks.exports,nh;function cy(){return nh||(nh=1,(function(e,t){(function(r,i){e.exports=i()})(hy,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",g="quarter",d="year",m="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var O=["th","st","nd","rd"],L=E%100;return"["+E+(O[(L-20)%10]||O[L]||O[0])+"]"}},S=function(E,O,L){var R=String(E);return!R||R.length>=O?E:""+Array(O+1-R.length).join(L)+E},w={s:S,z:function(E){var O=-E.utcOffset(),L=Math.abs(O),R=Math.floor(L/60),I=L%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S(I,2,"0")},m:function E(O,L){if(O.date()<L.date())return-E(L,O);var R=12*(L.year()-O.year())+(L.month()-O.month()),I=O.clone().add(R,u),H=L-I<0,Z=O.clone().add(R+(H?-1:1),u);return+(-(R+(L-I)/(H?I-Z:Z-I))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:u,y:d,w:h,d:c,D:m,h:l,m:n,s:o,ms:a,Q:g}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},v="en",_={};_[v]=k;var A="$isDayjsObject",F=function(E){return E instanceof at||!(!E||!E[A])},X=function E(O,L,R){var I;if(!O)return v;if(typeof O=="string"){var H=O.toLowerCase();_[H]&&(I=H),L&&(_[H]=L,I=H);var Z=O.split("-");if(!I&&Z.length>1)return E(Z[0])}else{var ut=O.name;_[ut]=O,I=ut}return!R&&I&&(v=I),I||!R&&v},N=function(E,O){if(F(E))return E.clone();var L=typeof O=="object"?O:{};return L.date=E,L.args=arguments,new at(L)},W=w;W.l=X,W.i=F,W.w=function(E,O){return N(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var at=(function(){function E(L){this.$L=X(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[A]=!0}var O=E.prototype;return O.parse=function(L){this.$d=(function(R){var I=R.date,H=R.utc;if(I===null)return new Date(NaN);if(W.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var Z=I.match(x);if(Z){var ut=Z[2]-1||0,gt=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,gt)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,gt)}}return new Date(I)})(L),this.init()},O.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},O.$utils=function(){return W},O.isValid=function(){return this.$d.toString()!==y},O.isSame=function(L,R){var I=N(L);return this.startOf(R)<=I&&I<=this.endOf(R)},O.isAfter=function(L,R){return N(L)<this.startOf(R)},O.isBefore=function(L,R){return this.endOf(R)<N(L)},O.$g=function(L,R,I){return W.u(L)?this[R]:this.set(I,L)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(L,R){var I=this,H=!!W.u(R)||R,Z=W.p(L),ut=function(Lt,lt){var ft=W.w(I.$u?Date.UTC(I.$y,lt,Lt):new Date(I.$y,lt,Lt),I);return H?ft:ft.endOf(c)},gt=function(Lt,lt){return W.w(I.toDate()[Lt].apply(I.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(lt)),I)},bt=this.$W,Tt=this.$M,nt=this.$D,Et="set"+(this.$u?"UTC":"");switch(Z){case d:return H?ut(1,0):ut(31,11);case u:return H?ut(1,Tt):ut(0,Tt+1);case h:var _t=this.$locale().weekStart||0,qt=(bt<_t?bt+7:bt)-_t;return ut(H?nt-qt:nt+(6-qt),Tt);case c:case m:return gt(Et+"Hours",0);case l:return gt(Et+"Minutes",1);case n:return gt(Et+"Seconds",2);case o:return gt(Et+"Milliseconds",3);default:return this.clone()}},O.endOf=function(L){return this.startOf(L,!1)},O.$set=function(L,R){var I,H=W.p(L),Z="set"+(this.$u?"UTC":""),ut=(I={},I[c]=Z+"Date",I[m]=Z+"Date",I[u]=Z+"Month",I[d]=Z+"FullYear",I[l]=Z+"Hours",I[n]=Z+"Minutes",I[o]=Z+"Seconds",I[a]=Z+"Milliseconds",I)[H],gt=H===c?this.$D+(R-this.$W):R;if(H===u||H===d){var bt=this.clone().set(m,1);bt.$d[ut](gt),bt.init(),this.$d=bt.set(m,Math.min(this.$D,bt.daysInMonth())).$d}else ut&&this.$d[ut](gt);return this.init(),this},O.set=function(L,R){return this.clone().$set(L,R)},O.get=function(L){return this[W.p(L)]()},O.add=function(L,R){var I,H=this;L=Number(L);var Z=W.p(R),ut=function(Tt){var nt=N(H);return W.w(nt.date(nt.date()+Math.round(Tt*L)),H)};if(Z===u)return this.set(u,this.$M+L);if(Z===d)return this.set(d,this.$y+L);if(Z===c)return ut(1);if(Z===h)return ut(7);var gt=(I={},I[n]=i,I[l]=s,I[o]=r,I)[Z]||1,bt=this.$d.getTime()+L*gt;return W.w(bt,this)},O.subtract=function(L,R){return this.add(-1*L,R)},O.format=function(L){var R=this,I=this.$locale();if(!this.isValid())return I.invalidDate||y;var H=L||"YYYY-MM-DDTHH:mm:ssZ",Z=W.z(this),ut=this.$H,gt=this.$m,bt=this.$M,Tt=I.weekdays,nt=I.months,Et=I.meridiem,_t=function(lt,ft,At,Rt){return lt&&(lt[ft]||lt(R,H))||At[ft].slice(0,Rt)},qt=function(lt){return W.s(ut%12||12,lt,"0")},Lt=Et||function(lt,ft,At){var Rt=lt<12?"AM":"PM";return At?Rt.toLowerCase():Rt};return H.replace(C,(function(lt,ft){return ft||(function(At){switch(At){case"YY":return String(R.$y).slice(-2);case"YYYY":return W.s(R.$y,4,"0");case"M":return bt+1;case"MM":return W.s(bt+1,2,"0");case"MMM":return _t(I.monthsShort,bt,nt,3);case"MMMM":return _t(nt,bt);case"D":return R.$D;case"DD":return W.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return _t(I.weekdaysMin,R.$W,Tt,2);case"ddd":return _t(I.weekdaysShort,R.$W,Tt,3);case"dddd":return Tt[R.$W];case"H":return String(ut);case"HH":return W.s(ut,2,"0");case"h":return qt(1);case"hh":return qt(2);case"a":return Lt(ut,gt,!0);case"A":return Lt(ut,gt,!1);case"m":return String(gt);case"mm":return W.s(gt,2,"0");case"s":return String(R.$s);case"ss":return W.s(R.$s,2,"0");case"SSS":return W.s(R.$ms,3,"0");case"Z":return Z}return null})(lt)||Z.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(L,R,I){var H,Z=this,ut=W.p(R),gt=N(L),bt=(gt.utcOffset()-this.utcOffset())*i,Tt=this-gt,nt=function(){return W.m(Z,gt)};switch(ut){case d:H=nt()/12;break;case u:H=nt();break;case g:H=nt()/3;break;case h:H=(Tt-bt)/6048e5;break;case c:H=(Tt-bt)/864e5;break;case l:H=Tt/s;break;case n:H=Tt/i;break;case o:H=Tt/r;break;default:H=Tt}return I?H:W.a(H)},O.daysInMonth=function(){return this.endOf(u).$D},O.$locale=function(){return _[this.$L]},O.locale=function(L,R){if(!L)return this.$L;var I=this.clone(),H=X(L,R,!0);return H&&(I.$L=H),I},O.clone=function(){return W.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},E})(),j=at.prototype;return N.prototype=j,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",m]].forEach((function(E){j[E[1]]=function(O){return this.$g(O,E[0],E[1])}})),N.extend=function(E,O){return E.$i||(E(O,at,N),E.$i=!0),N},N.locale=X,N.isDayjs=F,N.unix=function(E){return N(1e3*E)},N.en=_[v],N.Ls=_,N.p={},N}))})(Ks)),Ks.exports}var uy=cy();const dy=Fn(uy);var pr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},An=p(function(e="fatal"){let t=pr.fatal;typeof e=="string"?e.toLowerCase()in pr&&(t=pr[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=pr.fatal&&(z.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",qe("FATAL"))),t<=pr.error&&(z.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",qe("ERROR"))),t<=pr.warn&&(z.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",qe("WARN"))),t<=pr.info&&(z.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",qe("INFO"))),t<=pr.debug&&(z.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("DEBUG"))),t<=pr.trace&&(z.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("TRACE")))},"setLogLevel"),qe=p(e=>`%c${dy().format("ss.SSS")} : ${e} : `,"format");const Qs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return Qs.hue2rgb(a,s,e+1/3)*255;case"g":return Qs.hue2rgb(a,s,e)*255;case"b":return Qs.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},gy={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},py={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Dt={channel:Qs,lang:gy,unit:py},_r={};for(let e=0;e<=255;e++)_r[e]=Dt.unit.dec2hex(e);const ye={ALL:0,RGB:1,HSL:2};let fy=class{constructor(){this.type=ye.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=ye.ALL}is(t){return this.type===t}};class my{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new fy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ye.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Dt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Dt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Dt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Dt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Dt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Dt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ye.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ye.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ye.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ye.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ye.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ye.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ba=new my({r:0,g:0,b:0,a:0},"transparent"),gi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(gi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ba.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${_r[Math.round(t)]}${_r[Math.round(r)]}${_r[Math.round(i)]}${_r[Math.round(s*255)]}`:`#${_r[Math.round(t)]}${_r[Math.round(r)]}${_r[Math.round(i)]}`}},zr={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(zr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(zr.re);if(!r)return;const[,i,s,a,o,n]=r;return Ba.set({h:zr._hue2deg(i),s:Dt.channel.clamp.s(parseFloat(s)),l:Dt.channel.clamp.l(parseFloat(a)),a:o?Dt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%, ${s})`:`hsl(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%)`}},cs={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=cs.colors[e];if(t)return gi.parse(t)},stringify:e=>{const t=gi.stringify(e);for(const r in cs.colors)if(cs.colors[r]===t)return r}},rs={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(rs.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return Ba.set({r:Dt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Dt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Dt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`:`rgb(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)})`}},sr={format:{keyword:cs,hex:gi,rgb:rs,rgba:rs,hsl:zr,hsla:zr},parse:e=>{if(typeof e!="string")return e;const t=gi.parse(e)||rs.parse(e)||zr.parse(e)||cs.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ye.HSL)||e.data.r===void 0?zr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?rs.stringify(e):gi.stringify(e)},Nu=(e,t)=>{const r=sr.parse(e);for(const i in t)r[i]=Dt.channel.clamp[i](t[i]);return sr.stringify(r)},Er=(e,t,r=0,i=1)=>{if(typeof e!="number")return Nu(e,{a:t});const s=Ba.set({r:Dt.channel.clamp.r(e),g:Dt.channel.clamp.g(t),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(i)});return sr.stringify(s)},yy=e=>{const{r:t,g:r,b:i}=sr.parse(e),s=.2126*Dt.channel.toLinear(t)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(i);return Dt.lang.round(s)},Cy=e=>yy(e)>=.5,Xe=e=>!Cy(e),Wu=(e,t,r)=>{const i=sr.parse(e),s=i[t],a=Dt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),sr.stringify(i)},Y=(e,t)=>Wu(e,"l",t),U=(e,t)=>Wu(e,"l",-t),b=(e,t)=>{const r=sr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Nu(e,i)},xy=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=sr.parse(e),{r:n,g:l,b:c,a:h}=sr.parse(t),u=r/100,g=u*2-1,d=o-h,y=((g*d===-1?g:(g+d)/(1+g*d))+1)/2,x=1-y,C=i*y+n*x,k=s*y+l*x,S=a*y+c*x,w=o*u+h*(1-u);return Er(C,k,S,w)},M=(e,t=100)=>{const r=sr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,xy(r,e,t)};/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function by(e){if(Array.isArray(e))return e}function ky(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return n}}function Ty(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sy(e,t){return by(e)||ky(e,t)||wy(e,t)||Ty()}function wy(e,t){if(e){if(typeof e=="string")return lh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lh(e,t):void 0}}const zu=Object.entries,hh=Object.setPrototypeOf,By=Object.isFrozen,vy=Object.getPrototypeOf,Ly=Object.getOwnPropertyDescriptor;let he=Object.freeze,ue=Object.seal,li=Object.create,Hu=typeof Reflect<"u"&&Reflect,Xo=Hu.apply,Vo=Hu.construct;he||(he=function(t){return t});ue||(ue=function(t){return t});Xo||(Xo=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});Vo||(Vo=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Nr=ne(Array.prototype.forEach),_y=ne(Array.prototype.lastIndexOf),ch=ne(Array.prototype.pop),Ui=ne(Array.prototype.push),Fy=ne(Array.prototype.splice),pi=Array.isArray,is=ne(String.prototype.toLowerCase),Ja=ne(String.prototype.toString),uh=ne(String.prototype.match),Gi=ne(String.prototype.replace),dh=ne(String.prototype.indexOf),Ay=ne(String.prototype.trim),Ey=ne(Number.prototype.toString),My=ne(Boolean.prototype.toString),gh=typeof BigInt>"u"?null:ne(BigInt.prototype.toString),ph=typeof Symbol>"u"?null:ne(Symbol.prototype.toString),Ee=ne(Object.prototype.hasOwnProperty),Xi=ne(Object.prototype.toString),me=ne(RegExp.prototype.test),Ir=Oy(TypeError);function ne(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return Xo(e,t,i)}}function Oy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Vo(e,r)}}function Yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:is;if(hh&&hh(e,null),!pi(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(By(t)||(t[i]=a),s=a)}e[s]=!0}return e}function $y(e){for(let t=0;t<e.length;t++)Ee(e,t)||(e[t]=null);return e}function Ie(e){const t=li(null);for(const i of zu(e)){var r=Sy(i,2);const s=r[0],a=r[1];Ee(e,s)&&(pi(a)?t[s]=$y(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Ie(a):t[s]=a)}return t}function Dy(e){switch(typeof e){case"string":return e;case"number":return Ey(e);case"boolean":return My(e);case"bigint":return gh?gh(e):"0";case"symbol":return ph?ph(e):"Symbol()";case"undefined":return Xi(e);case"function":case"object":{if(e===null)return Xi(e);const t=e,r=Ne(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Xi(i)}return Xi(e)}default:return Xi(e)}}function Ne(e,t){for(;e!==null;){const i=Ly(e,t);if(i){if(i.get)return ne(i.get);if(typeof i.value=="function")return ne(i.value)}e=vy(e)}function r(){return null}return r}function Iy(e){try{return me(e,""),!0}catch{return!1}}const fh=he(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),to=he(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),eo=he(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Py=he(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ro=he(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ry=he(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mh=he(["#text"]),yh=he(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),io=he(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ch=he(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ps=he(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qy=ue(/{{[\w\W]*|^[\w\W]*}}/g),Ny=ue(/<%[\w\W]*|^[\w\W]*%>/g),Wy=ue(/\${[\w\W]*/g),zy=ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),Hy=ue(/^aria-[\-\w]+$/),xh=ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jy=ue(/^(?:\w+script|data):/i),Yy=ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Uy=ue(/^html$/i),Gy=ue(/^[a-z][.\w]*(-[.\w]+)+$/i),bh=ue(/<[/\w!]/g),kh=ue(/<[/\w]/g),Xy=ue(/<\/no(script|embed|frames)/i),Vy=ue(/\/>/i),$e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ju=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Zy=he(Yt({},ju)),Ky=(function(){const e={};return Nr(ju,t=>{e[t]=ue(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),he(e)})(),Qy=function(){return typeof window>"u"?null:window},Jy=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Th=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},vr=function(t,r,i,s){return Ee(t,r)&&pi(t[r])?Yt(s.base?Ie(s.base):{},t[r],s.transform):i},so=function(t,r,i){const s=Ee(t,r)?t[r]:void 0;return s&&typeof s=="object"?Ie(s):i()};function Yu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qy();const t=ot=>Yu(ot);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==$e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,g=n.prototype,d=Ne(g,"cloneNode"),m=Ne(g,"remove"),y=Ne(g,"removeAttributeNode"),x=Ne(g,"nextSibling"),C=Ne(g,"childNodes"),k=Ne(g,"parentNode"),S=Ne(g,"shadowRoot"),w=Ne(g,"attributes"),v=o&&o.prototype?Ne(o.prototype,"nodeType"):null,_=o&&o.prototype?Ne(o.prototype,"nodeName"):null,A=o&&o.prototype?Ne(o.prototype,"ownerDocument"):null,F=function(B){return v?v(B):B.nodeType},X=function(B){return _?_(B):B.nodeName};if(typeof a=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let N,W="",at,j=!1,E=0;const O=function(){if(E>0)throw Ir('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},L=function(B){O(),E++;try{return N.createHTML(B)}finally{E--}},R=function(B){O(),E++;try{return N.createScriptURL(B)}finally{E--}},I=function(){return j||(at=Jy(u,s),j=!0),at},H=r,Z=H.implementation,ut=H.createNodeIterator,gt=H.createDocumentFragment,bt=H.getElementsByTagName,Tt=i.importNode;let nt=Th();t.isSupported=typeof zu=="function"&&typeof k=="function"&&Z&&Z.createHTMLDocument!==void 0;const Et=qy,_t=Ny,qt=Wy,Lt=zy,lt=Hy,ft=jy,At=Yy,Rt=Gy;let Ut=xh,D=null;const Ft=Yt({},[...fh,...to,...eo,...ro,...mh]);let zt=null;const we=Yt({},[...yh,...io,...Ch,...Ps]);let pe=Object.seal(li(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,cr=null;const Be=Object.seal(li(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ve=!0,ur=!0,dr=!1,gr=!0,Le=!1,f=!0,$=!1,V=!1,Q=null,G=null,st=!1,T=!1,q=!1,et=!1,K=!0,J=!1;const it="user-content-";let tt=!0,mt=!1,ct={},kt=null;const vt=Yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nt=null;const Vt=Yt({},["audio","video","img","source","image","track"]);let Hi=null;const wr=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",As="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let ri=Ke,Ya=!1,Ua=null;const Dm=Yt({},[Ze,As,Ke],Ja),Yl=he(["mi","mo","mn","ms","mtext"]);let Ga=Yt({},Yl);const Ul=he(["annotation-xml"]);let Xa=Yt({},Ul);const Im=Yt({},["title","style","font","a","script"]);let ji=null;const Pm=["application/xhtml+xml","text/html"],Rm="text/html";let ie=null,ii=null;const qm=r.createElement("form"),Gl=function(B){return B instanceof RegExp||B instanceof Function},Va=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ii&&ii===B)return;(!B||typeof B!="object")&&(B={}),B=Ie(B),ji=Pm.indexOf(B.PARSER_MEDIA_TYPE)===-1?Rm:B.PARSER_MEDIA_TYPE,ie=ji==="application/xhtml+xml"?Ja:is,D=vr(B,"ALLOWED_TAGS",Ft,{transform:ie}),zt=vr(B,"ALLOWED_ATTR",we,{transform:ie}),Ua=vr(B,"ALLOWED_NAMESPACES",Dm,{transform:Ja}),Hi=vr(B,"ADD_URI_SAFE_ATTR",wr,{transform:ie,base:wr}),Nt=vr(B,"ADD_DATA_URI_TAGS",Vt,{transform:ie,base:Vt}),kt=vr(B,"FORBID_CONTENTS",vt,{transform:ie}),Re=vr(B,"FORBID_TAGS",Ie({}),{transform:ie}),cr=vr(B,"FORBID_ATTR",Ie({}),{transform:ie}),ct=Ee(B,"USE_PROFILES")?B.USE_PROFILES&&typeof B.USE_PROFILES=="object"?Ie(B.USE_PROFILES):B.USE_PROFILES:!1,ve=B.ALLOW_ARIA_ATTR!==!1,ur=B.ALLOW_DATA_ATTR!==!1,dr=B.ALLOW_UNKNOWN_PROTOCOLS||!1,gr=B.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Le=B.SAFE_FOR_TEMPLATES||!1,f=B.SAFE_FOR_XML!==!1,$=B.WHOLE_DOCUMENT||!1,T=B.RETURN_DOM||!1,q=B.RETURN_DOM_FRAGMENT||!1,et=B.RETURN_TRUSTED_TYPE||!1,st=B.FORCE_BODY||!1,K=B.SANITIZE_DOM!==!1,J=B.SANITIZE_NAMED_PROPS||!1,tt=B.KEEP_CONTENT!==!1,mt=B.IN_PLACE||!1,Ut=Iy(B.ALLOWED_URI_REGEXP)?B.ALLOWED_URI_REGEXP:xh,ri=typeof B.NAMESPACE=="string"?B.NAMESPACE:Ke,Ga=so(B,"MATHML_TEXT_INTEGRATION_POINTS",()=>Yt({},Yl)),Xa=so(B,"HTML_INTEGRATION_POINTS",()=>Yt({},Ul));const P=so(B,"CUSTOM_ELEMENT_HANDLING",()=>li(null));if(pe=li(null),Ee(P,"tagNameCheck")&&Gl(P.tagNameCheck)&&(pe.tagNameCheck=P.tagNameCheck),Ee(P,"attributeNameCheck")&&Gl(P.attributeNameCheck)&&(pe.attributeNameCheck=P.attributeNameCheck),Ee(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),ue(pe),Le&&(ur=!1),q&&(T=!0),ct&&(D=Yt({},mh),zt=li(null),ct.html===!0&&(Yt(D,fh),Yt(zt,yh)),ct.svg===!0&&(Yt(D,to),Yt(zt,io),Yt(zt,Ps)),ct.svgFilters===!0&&(Yt(D,eo),Yt(zt,io),Yt(zt,Ps)),ct.mathMl===!0&&(Yt(D,ro),Yt(zt,Ch),Yt(zt,Ps))),Be.tagCheck=null,Be.attributeCheck=null,Ee(B,"ADD_TAGS")&&(typeof B.ADD_TAGS=="function"?Be.tagCheck=B.ADD_TAGS:pi(B.ADD_TAGS)&&(D===Ft&&(D=Ie(D)),Yt(D,B.ADD_TAGS,ie))),Ee(B,"ADD_ATTR")&&(typeof B.ADD_ATTR=="function"?Be.attributeCheck=B.ADD_ATTR:pi(B.ADD_ATTR)&&(zt===we&&(zt=Ie(zt)),Yt(zt,B.ADD_ATTR,ie))),Ee(B,"ADD_FORBID_CONTENTS")&&pi(B.ADD_FORBID_CONTENTS)&&(kt===vt&&(kt=Ie(kt)),Yt(kt,B.ADD_FORBID_CONTENTS,ie)),tt&&(D["#text"]=!0),$&&Yt(D,["html","head","body"]),D.table&&(Yt(D,["tbody"]),delete Re.tbody),B.TRUSTED_TYPES_POLICY){if(typeof B.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof B.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const rt=N;N=B.TRUSTED_TYPES_POLICY;try{W=L("")}catch(yt){throw N=rt,yt}}else B.TRUSTED_TYPES_POLICY===null?(N=void 0,W=""):(N===void 0&&(N=I()),N&&typeof W=="string"&&(W=L("")));he&&he(B),ii=B},Xl=Yt({},[...to,...eo,...Py]),Vl=Yt({},[...ro,...Ry]),Nm=function(B,P,rt){return P.namespaceURI===Ke?B==="svg":P.namespaceURI===Ze?B==="svg"&&(rt==="annotation-xml"||Ga[rt]):!!Xl[B]},Wm=function(B,P,rt){return P.namespaceURI===Ke?B==="math":P.namespaceURI===As?B==="math"&&Xa[rt]:!!Vl[B]},zm=function(B,P,rt){return P.namespaceURI===As&&!Xa[rt]||P.namespaceURI===Ze&&!Ga[rt]?!1:!Vl[B]&&(Im[B]||!Xl[B])},Hm=function(B){let P=k(B);(!P||!P.tagName)&&(P={namespaceURI:ri,tagName:"template"});const rt=is(B.tagName),yt=is(P.tagName);return Ua[B.namespaceURI]?B.namespaceURI===As?Nm(rt,P,yt):B.namespaceURI===Ze?Wm(rt,P,yt):B.namespaceURI===Ke?zm(rt,P,yt):!!(ji==="application/xhtml+xml"&&Ua[B.namespaceURI]):!1},Br=function(B){Ui(t.removed,{element:B});try{k(B).removeChild(B)}catch{if(m(B),!k(B))throw Ir("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Zl=function(B,P,rt){try{y(B,P)}catch{try{B.removeAttribute(rt)}catch{}}},Es=function(B){Ms(B);const P=C(B);if(P){const yt=[];Nr(P,Bt=>{Ui(yt,Bt)}),Nr(yt,Bt=>{try{m(Bt)}catch{}})}const rt=w(B);if(rt)for(let yt=rt.length-1;yt>=0;--yt){const Bt=rt[yt],$t=Bt&&Bt.name;typeof $t=="string"&&Zl(B,Bt,$t)}},Dr=function(B,P,rt){if(!rt)try{rt=P.getAttributeNode(B)}catch{rt=null}Ui(t.removed,{attribute:rt||null,from:P});try{rt?y(P,rt):P.removeAttribute(B)}catch{try{P.removeAttribute(B)}catch{}}if(B==="is")if(T||q)try{Br(P)}catch{}else try{P.setAttribute(B,"")}catch{}},jm=function(B){const P=w(B);if(P)for(let rt=P.length-1;rt>=0;--rt){const yt=P[rt],Bt=yt&&yt.name;typeof Bt!="string"||zt[ie(Bt)]||Zl(B,yt,Bt)}},Ms=function(B){const P=[B];for(;P.length>0;){const rt=P.pop();F(rt)===$e.element&&jm(rt);const Bt=C(rt);if(Bt)for(let $t=Bt.length-1;$t>=0;--$t)P.push(Bt[$t])}},Kl=function(B,P){return f?B==="patchsrc"?!0:B==="for"&&P!=="label"&&P!=="output":!1},Ym=function(B){if(!f)return;const P=[B];for(;P.length>0;){const rt=P.pop(),yt=F(rt);if(yt===$e.processingInstruction||yt===$e.comment&&me(kh,rt.data)){try{m(rt)}catch{}continue}if(yt===$e.element){const $t=rt,Kt=ie(X(rt));try{$t.hasAttribute&&$t.hasAttribute("patchsrc")&&$t.removeAttribute("patchsrc"),$t.hasAttribute&&$t.hasAttribute("for")&&Kl("for",Kt)&&$t.removeAttribute("for")}catch{}}const Bt=C(rt);if(Bt)for(let $t=Bt.length-1;$t>=0;--$t)P.push(Bt[$t])}},Ql=function(B){let P=null,rt=null;if(st)B="<remove></remove>"+B;else{const $t=uh(B,/^[\r\n\t ]+/);rt=$t&&$t[0]}ji==="application/xhtml+xml"&&ri===Ke&&(B='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+B+"</body></html>");const yt=N?L(B):B;if(ri===Ke)try{P=new h().parseFromString(yt,ji)}catch{}if(!P||!P.documentElement){P=Z.createDocument(ri,"template",null);try{P.documentElement.innerHTML=Ya?W:yt}catch{}}const Bt=P.body||P.documentElement;return B&&rt&&Bt.insertBefore(r.createTextNode(rt),Bt.childNodes[0]||null),ri===Ke?bt.call(P,$?"html":"body")[0]:$?P.documentElement:Bt},Jl=function(B){const P=A?A(B):B.ownerDocument;return ut.call(P||B,B,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Os=function(B){return B=Gi(B,Et," "),B=Gi(B,_t," "),B=Gi(B,qt," "),B},Za=function(B){var P;B.normalize();const rt=A?A(B):B.ownerDocument,yt=ut.call(rt||B,B,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Bt=yt.nextNode();for(;Bt;)Bt.data=Os(Bt.data),Bt=yt.nextNode();const $t=(P=B.querySelectorAll)===null||P===void 0?void 0:P.call(B,"template");$t&&Nr($t,Kt=>{si(Kt.content)&&Za(Kt.content)})},$s=function(B){const P=_?_(B):null;return typeof P!="string"||ie(P)!=="form"?!1:typeof B.nodeName!="string"||typeof B.textContent!="string"||typeof B.removeChild!="function"||B.attributes!==w(B)||typeof B.removeAttribute!="function"||typeof B.removeAttributeNode!="function"||typeof B.getAttributeNode!="function"||typeof B.setAttribute!="function"||typeof B.namespaceURI!="string"||typeof B.insertBefore!="function"||typeof B.hasChildNodes!="function"||B.nodeType!==v(B)||B.childNodes!==C(B)},si=function(B){if(!v||typeof B!="object"||B===null)return!1;try{return v(B)===$e.documentFragment}catch{return!1}},Yi=function(B){if(!v||typeof B!="object"||B===null)return!1;try{return typeof v(B)=="number"}catch{return!1}};function Qe(ot,B,P){ot.length!==0&&Nr(ot,rt=>{rt.call(t,B,P,ii)})}const Um=function(B,P){return!!(f&&B.hasChildNodes()&&!Yi(B.firstElementChild)&&me(bh,B.textContent)&&me(bh,B.innerHTML)||f&&B.namespaceURI===Ke&&Zy[P]&&(Yi(B.firstElementChild)||typeof B.textContent=="string"&&me(Ky[P],B.textContent))||B.nodeType===$e.processingInstruction||f&&B.nodeType===$e.comment&&me(kh,B.data))},Ds=function(B,P){if(B instanceof RegExp)return me(B,P);if(B instanceof Function){for(var rt=arguments.length,yt=new Array(rt>2?rt-2:0),Bt=2;Bt<rt;Bt++)yt[Bt-2]=arguments[Bt];return!!B(P,...yt)}return!1},Gm=function(B,P,rt){if(!Re[P]&&sh(P)&&Ds(pe.tagNameCheck,P))return!1;if(tt&&!kt[P]){const yt=k(B),Bt=C(B);if(Bt&&yt){const $t=Bt.length;for(let Kt=$t-1;Kt>=0;--Kt){const ee=B===rt?d(Bt[Kt],!0):Bt[Kt];yt.insertBefore(ee,x(B))}}}return Br(B),!0},th=function(B,P,rt,yt){return B.length===0?P:P===rt||P===yt?Ie(P):P},eh=function(B,P){return B===P||k(B)!==null?!1:(mt&&Ms(B),!0)},rh=function(B,P){if(Qe(nt.beforeSanitizeElements,B,null),eh(B,P))return!0;if($s(B))return Br(B),!0;const rt=ie(X(B));if(D=th(nt.uponSanitizeElement,D,Ft,Q),Qe(nt.uponSanitizeElement,B,{tagName:rt,allowedTags:D}),eh(B,P))return!0;if(Um(B,rt))return Br(B),!0;if(Re[rt]||!(Be.tagCheck instanceof Function&&Be.tagCheck(rt))&&!D[rt]){const Bt=Gm(B,rt,P);return Bt===!1&&Qe(nt.afterSanitizeElements,B,null),Bt}if(F(B)===$e.element&&!Hm(B)||(rt==="noscript"||rt==="noembed"||rt==="noframes")&&me(Xy,B.innerHTML))return Br(B),!0;if(Le&&B.nodeType===$e.text){const Bt=Os(B.textContent);B.textContent!==Bt&&(Ui(t.removed,{element:B.cloneNode()}),B.textContent=Bt)}return Qe(nt.afterSanitizeElements,B,null),!1},ih=function(B,P,rt){if(cr[P]||Kl(P,B)||K&&(P==="id"||P==="name")&&(rt in r||rt in qm))return!1;const yt=zt[P]||Be.attributeCheck instanceof Function&&Be.attributeCheck(P,B);return ur&&me(Lt,P)||ve&&me(lt,P)?!0:yt?Hi[P]||me(Ut,Gi(rt,At,""))||(P==="src"||P==="xlink:href"||P==="href")&&B!=="script"&&dh(rt,"data:")===0&&Nt[B]||dr&&!me(ft,Gi(rt,At,""))?!0:!rt:sh(B)&&Ds(pe.tagNameCheck,B)&&Ds(pe.attributeNameCheck,P,B)||P==="is"&&pe.allowCustomizedBuiltInElements&&Ds(pe.tagNameCheck,rt)},Xm=Yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),sh=function(B){return!Xm[is(B)]&&me(Rt,B)},Vm=function(B,P,rt,yt){if(N&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!rt)switch(u.getAttributeType(B,P)){case"TrustedHTML":return L(yt);case"TrustedScriptURL":return R(yt)}return yt},Zm=function(B,P,rt,yt){try{return rt?B.setAttributeNS(rt,P,yt):B.setAttribute(P,yt),$s(B)?(Br(B),!1):!0}catch{return Dr(P,B),!1}},ah=function(B){Qe(nt.beforeSanitizeAttributes,B,null);const P=B.attributes;if(!P||$s(B))return;zt=th(nt.uponSanitizeAttribute,zt,we,G);const rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:zt,forceKeepAttr:void 0};let yt=P.length;const Bt=ie(B.nodeName);for(;yt--;){const $t=P[yt],Kt=$t.name,ee=$t.namespaceURI,_e=$t.value,Fe=ie(Kt),Qa=_e;let Te=Kt==="value"?Qa:Ay(Qa),oh=!1;if(rt.attrName=Fe,rt.attrValue=Te,rt.keepAttr=!0,rt.forceKeepAttr=void 0,Qe(nt.uponSanitizeAttribute,B,rt),Te=rt.attrValue,J&&(Fe==="id"||Fe==="name")&&dh(Te,it)!==0&&(Dr(Kt,B,$t),Te=it+Te,oh=!0),f&&me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){Dr(Kt,B,$t);continue}if(Fe==="attributename"&&uh(Te,"href")){Dr(Kt,B,$t);continue}if(!rt.forceKeepAttr){if(!rt.keepAttr){Dr(Kt,B,$t);continue}if(!gr&&me(Vy,Te)){Dr(Kt,B,$t);continue}if(Le&&(Te=Os(Te)),!ih(Bt,Fe,Te)){Dr(Kt,B,$t);continue}Te=Vm(Bt,Fe,ee,Te),Te!==Qa&&Zm(B,Kt,ee,Te)&&oh&&ch(t.removed)}}Qe(nt.afterSanitizeAttributes,B,null)},Is=function(B){let P=null;const rt=Jl(B);for(Qe(nt.beforeSanitizeShadowDOM,B,null);P=rt.nextNode();)if(Qe(nt.uponSanitizeShadowNode,P,null),rh(P,B),ah(P),si(P.content)&&Is(P.content),F(P)===$e.element){const yt=S(P);si(yt)&&(Ka(yt),Is(yt))}Qe(nt.afterSanitizeShadowDOM,B,null)},Ka=function(B){const P=[{node:B,shadow:null}];for(;P.length>0;){const rt=P.pop();if(rt.shadow){Is(rt.shadow);continue}const yt=rt.node,$t=F(yt)===$e.element,Kt=C(yt);if(Kt)for(let ee=Kt.length-1;ee>=0;--ee)P.push({node:Kt[ee],shadow:null});if($t){const ee=_?_(yt):null;if(typeof ee=="string"&&ie(ee)==="template"){const _e=yt.content;si(_e)&&P.push({node:_e,shadow:null})}}if($t){const ee=S(yt);si(ee)&&P.push({node:null,shadow:ee},{node:ee,shadow:null})}}};return t.sanitize=function(ot){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,rt=null,yt=null,Bt=null;if(Ya=!ot,Ya&&(ot="<!-->"),typeof ot!="string"&&!Yi(ot)&&(ot=Dy(ot),typeof ot!="string"))throw Ir("dirty is not a string, aborting");if(!t.isSupported)return ot;V?(D=Q,zt=G):Va(B),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(D=Ie(D)),nt.uponSanitizeAttribute.length>0&&(zt=Ie(zt)),t.removed=[];const $t=mt&&typeof ot!="string"&&Yi(ot);if($t){Ym(ot);const _e=X(ot);if(typeof _e=="string"){const Fe=ie(_e);if(!D[Fe]||Re[Fe])throw Es(ot),Ir("root node is forbidden and cannot be sanitized in-place")}if($s(ot))throw Es(ot),Ir("root node is clobbered and cannot be sanitized in-place");try{Ka(ot)}catch(Fe){throw Es(ot),Fe}}else if(Yi(ot))P=Ql("<!---->"),rt=P.ownerDocument.importNode(ot,!0),rt.nodeType===$e.element&&rt.nodeName==="BODY"||rt.nodeName==="HTML"?P=rt:P.appendChild(rt),Ka(P);else{if(!T&&!Le&&!$&&ot.indexOf("<")===-1)return N&&et?L(ot):ot;if(P=Ql(ot),!P)return T?null:et?W:""}P&&st&&Br(P.firstChild);const Kt=$t?ot:P;try{const _e=Jl(Kt);for(;yt=_e.nextNode();)rh(yt,Kt),ah(yt),si(yt.content)&&Is(yt.content)}catch(_e){throw $t&&(Es(ot),Nr(t.removed,Fe=>{Fe.element&&Ms(Fe.element)})),_e}if($t)return Nr(t.removed,_e=>{_e.element&&Ms(_e.element)}),Le&&Za(ot),ot;if(T){if(Le&&Za(P),q)for(Bt=gt.call(P.ownerDocument);P.firstChild;)Bt.appendChild(P.firstChild);else Bt=P;return(zt.shadowroot||zt.shadowrootmode)&&(Bt=Tt.call(i,Bt,!0)),Bt}let ee=$?P.outerHTML:P.innerHTML;return $&&D["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&me(Uy,P.ownerDocument.doctype.name)&&(ee="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
4
+ `+ee),Le&&(ee=Os(ee)),N&&et?L(ee):ee},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Va(ot),V=!0,Q=D,G=zt},t.clearConfig=function(){ii=null,V=!1,Q=null,G=null,N=at,W=""},t.isValidAttribute=function(ot,B,P){ii||Va({});const rt=ie(ot),yt=ie(B);return ih(rt,yt,P)},t.addHook=function(ot,B){typeof B=="function"&&Ee(nt,ot)&&Ui(nt[ot],B)},t.removeHook=function(ot,B){if(Ee(nt,ot)){if(B!==void 0){const P=_y(nt[ot],B);return P===-1?void 0:Fy(nt[ot],P,1)[0]}return ch(nt[ot])}},t.removeHooks=function(ot){Ee(nt,ot)&&(nt[ot]=[])},t.removeAllHooks=function(){nt=Th()},t}var Mi=Yu(),Zo=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>Zo(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=Zo(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ce=Zo,or="#ffffff",nr="#f2f2f2",Ot=p((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),yi,tC=(yi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,g,d,m,y,x,C,k,S,w,v,_,A,F,X,N,W,at,j,E,O,L,R,I,H,Z,ut,gt,bt,Tt,nt,Et,_t,qt,Lt,lt,ft,At,Rt,Ut,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScale"+Ft]=U(this["cScale"+Ft],75);else for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScale"+Ft]=U(this["cScale"+Ft],25);for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScaleInv"+Ft]=this["cScaleInv"+Ft]||M(this["cScale"+Ft]);for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this.darkMode?this["cScalePeer"+Ft]=this["cScalePeer"+Ft]||Y(this["cScale"+Ft],10):this["cScalePeer"+Ft]=this["cScalePeer"+Ft]||U(this["cScale"+Ft],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScaleLabel"+Ft]=this["cScaleLabel"+Ft]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Ft=0;Ft<5;Ft++)this["surface"+Ft]=this["surface"+Ft]||b(this.mainBkg,{h:180,s:-15,l:t*(5+Ft*3)}),this["surfacePeer"+Ft]=this["surfacePeer"+Ft]||b(this.mainBkg,{h:180,s:-15,l:t*(8+Ft*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((g=this.cynefin)==null?void 0:g.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((S=this.radar)==null?void 0:S.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((v=this.radar)==null?void 0:v.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((X=this.radar)==null?void 0:X.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((W=this.wardley)==null?void 0:W.backgroundColor)||this.background,axisColor:((at=this.wardley)==null?void 0:at.axisColor)||this.lineColor,axisTextColor:((j=this.wardley)==null?void 0:j.axisTextColor)||this.primaryTextColor,gridColor:((E=this.wardley)==null?void 0:E.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((L=this.wardley)==null?void 0:L.componentStroke)||this.lineColor,componentLabelColor:((R=this.wardley)==null?void 0:R.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((H=this.wardley)==null?void 0:H.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((ut=this.wardley)==null?void 0:ut.annotationTextColor)||this.primaryTextColor,annotationFill:((gt=this.wardley)==null?void 0:gt.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((Tt=this.xyChart)==null?void 0:Tt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Et=this.xyChart)==null?void 0:Et.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_t=this.xyChart)==null?void 0:_t.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((qt=this.xyChart)==null?void 0:qt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((lt=this.xyChart)==null?void 0:lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ft=this.xyChart)==null?void 0:ft.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((At=this.xyChart)==null?void 0:At.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Ut=this.xyChart)==null?void 0:Ut.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(yi,"Theme"),yi),eC=p(e=>{const t=new tC;return t.calculate(e),t},"getThemeVariables"),Ci,rC=(Ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Er(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Er(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Er(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||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,g,d,m,y,x,C,k,S,w,v,_,A,F,X,N,W,at,j,E,O,L,R,I,H,Z,ut,gt,bt,Tt,nt,Et,_t,qt,Lt,lt,ft,At,Rt,Ut;this.secondBkg=Y(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=Y(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=M(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||M(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||Y(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??Y(this["cScale"+D],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((X=this.xyChart)==null?void 0:X.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((W=this.xyChart)==null?void 0:W.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.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:((j=this.radar)==null?void 0:j.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((L=this.radar)==null?void 0:L.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((I=this.radar)==null?void 0:I.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((ut=this.radar)==null?void 0:ut.legendBoxSize)||12,legendFontSize:((gt=this.radar)==null?void 0:gt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((bt=this.wardley)==null?void 0:bt.backgroundColor)||this.background,axisColor:((Tt=this.wardley)==null?void 0:Tt.axisColor)||this.lineColor,axisTextColor:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((Et=this.wardley)==null?void 0:Et.gridColor)||this.gridColor,componentFill:((_t=this.wardley)==null?void 0:_t.componentFill)||this.mainBkg,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((Lt=this.wardley)==null?void 0:Lt.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((ft=this.wardley)==null?void 0:ft.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((At=this.wardley)==null?void 0:At.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ci,"Theme"),Ci),iC=p(e=>{const t=new rC;return t.calculate(e),t},"getThemeVariables"),xi,sC=(xi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Er(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,g,d,m,y,x,C,k,S,w,v,_,A,F,X,N,W,at,j,E,O,L,R,I,H,Z,ut,gt,bt,Tt,nt,Et,_t,qt,Lt,lt,ft,At,Rt,Ut;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=U(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||b(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((W=this.wardley)==null?void 0:W.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((j=this.wardley)==null?void 0:j.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((L=this.wardley)==null?void 0:L.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((I=this.wardley)==null?void 0:I.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((ut=this.wardley)==null?void 0:ut.annotationFill)||this.background},this.xyChart={backgroundColor:((gt=this.xyChart)==null?void 0:gt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Et=this.xyChart)==null?void 0:Et.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_t=this.xyChart)==null?void 0:_t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ft=this.xyChart)==null?void 0:ft.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((At=this.xyChart)==null?void 0:At.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(xi,"Theme"),xi),aC=p(e=>{const t=new sC;return t.calculate(e),t},"getThemeVariables"),bi,oC=(bi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Y("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,g,d,m,y,x,C,k,S,w,v,_,A,F,X,N,W,at,j,E,O,L,R,I,H,Z,ut,gt,bt,Tt,nt,Et,_t,qt,Lt,lt,ft,At,Rt,Ut;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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=U(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||b(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,s:-30,l:-(8+D*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||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((v=this.radar)==null?void 0:v.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((_=this.radar)==null?void 0:_.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((W=this.wardley)==null?void 0:W.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((j=this.wardley)==null?void 0:j.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((L=this.wardley)==null?void 0:L.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((I=this.wardley)==null?void 0:I.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((ut=this.wardley)==null?void 0:ut.annotationFill)||this.background},this.xyChart={backgroundColor:((gt=this.xyChart)==null?void 0:gt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Et=this.xyChart)==null?void 0:Et.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_t=this.xyChart)==null?void 0:_t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ft=this.xyChart)==null?void 0:ft.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((At=this.xyChart)==null?void 0:At.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(bi,"Theme"),bi),nC=p(e=>{const t=new oC;return t.calculate(e),t},"getThemeVariables"),ki,lC=(ki=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,g,d,m,y,x,C,k,S,w,v,_,A,F,X,N,W,at,j,E,O,L,R,I,H,Z,ut,gt,bt,Tt,nt,Et,_t,qt,Lt,lt,ft,At,Rt,Ut;this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||M(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||Y(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{l:-(8+D*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=Y(this.contrast,30),this.sectionBkgColor2=Y(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=Y(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=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];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 D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((_=this.xyChart)==null?void 0:_.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((X=this.xyChart)==null?void 0:X.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((W=this.xyChart)==null?void 0:W.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((j=this.radar)==null?void 0:j.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((L=this.radar)==null?void 0:L.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((I=this.radar)==null?void 0:I.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((ut=this.radar)==null?void 0:ut.legendBoxSize)||12,legendFontSize:((gt=this.radar)==null?void 0:gt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((bt=this.wardley)==null?void 0:bt.backgroundColor)||this.background,axisColor:((Tt=this.wardley)==null?void 0:Tt.axisColor)||this.lineColor,axisTextColor:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((Et=this.wardley)==null?void 0:Et.gridColor)||this.gridColor,componentFill:((_t=this.wardley)==null?void 0:_t.componentFill)||this.background,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((Lt=this.wardley)==null?void 0:Lt.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((ft=this.wardley)==null?void 0:ft.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((At=this.wardley)==null?void 0:At.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ki,"Theme"),ki),hC=p(e=>{const t=new lC;return t.calculate(e),t},"getThemeVariables"),Ti,cC=(Ti=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,g,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ti,"Theme"),Ti),uC=p(e=>{const t=new cC;return t.calculate(e),t},"getThemeVariables"),Si,dC=(Si=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Er(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,g,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Si,"Theme"),Si),gC=p(e=>{const t=new dC;return t.calculate(e),t},"getThemeVariables"),wi,pC=(wi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,g,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(wi,"Theme"),wi),fC=p(e=>{const t=new pC;return t.calculate(e),t},"getThemeVariables"),Bi,mC=(Bi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Er(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,g,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Bi,"Theme"),Bi),yC=p(e=>{const t=new mC;return t.calculate(e),t},"getThemeVariables"),vi,CC=(vi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,g,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?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||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(vi,"Theme"),vi),xC=p(e=>{const t=new CC;return t.calculate(e),t},"getThemeVariables"),Li,bC=(Li=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Er(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,g,d;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=U(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.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||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(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||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Li,"Theme"),Li),kC=p(e=>{const t=new bC;return t.calculate(e),t},"getThemeVariables"),Cr={base:{getThemeVariables:eC},dark:{getThemeVariables:iC},default:{getThemeVariables:aC},forest:{getThemeVariables:nC},neutral:{getThemeVariables:hC},neo:{getThemeVariables:uC},"neo-dark":{getThemeVariables:gC},redux:{getThemeVariables:fC},"redux-dark":{getThemeVariables:yC},"redux-color":{getThemeVariables:xC},"redux-dark-color":{getThemeVariables:kC}},de={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Uu={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Cr.default.getThemeVariables(),sequence:{...de.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:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.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:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},eventmodeling:{...de.eventmodeling},treeView:{...de.treeView,useWidth:void 0},radar:{...de.radar},railroad:{...de.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...de.ishikawa},sankey:{...de.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...de.venn},cynefin:{...de.cynefin}},Gu=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Gu(e[i],"")]:[...r,t+i],[]),"keyify"),TC=new Set(Gu(Uu,"")),Xu=Uu,SC={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},wC=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(z.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),na=p(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>na(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!TC.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=SC[t];i?wC(e[t],i):(z.debug("sanitizing object",t),na(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=Vu(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),Vu=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"),Oi=Object.freeze(Xu),lr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Me=ce({},Oi),la,Yr=[],us=ce({},Oi),Ss=p((e,t)=>{let r=ce({},e),i={};for(const s of t)Qu(s),i=ce(i,s);if(r=ce(r,i),i.theme&&i.theme in Cr){const s=ce({},la),a=ce(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Cr&&(r.themeVariables=Cr[r.theme].getThemeVariables(a))}return us=r,AC(us),us},"updateCurrentConfig"),BC=p(e=>(Me=ce({},Oi),Me=ce(Me,e),e.theme&&Cr[e.theme]&&(Me.themeVariables=Cr[e.theme].getThemeVariables(e.themeVariables)),Ss(Me,Yr),Me),"setSiteConfig"),vC=p(e=>{la=ce({},e)},"saveConfigFromInitialize"),LC=p(e=>(Me=ce(Me,e),Ss(Me,Yr),Me),"updateSiteConfig"),Zu=p(()=>ce({},Me),"getSiteConfig"),Ku=p(e=>(Ss(us,[e]),te()),"setConfig"),te=p(()=>ce({},us),"getConfig"),Qu=p(e=>{e&&(["secure",...Me.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&Qu(e[t])}))},"sanitize"),_C=p(e=>{var t;na(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Yr.push(e),Ss(Me,Yr)},"addDirective"),ha=p((e=Me)=>{Yr=[],Ss(e,Yr)},"reset"),FC={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."},Sh={},Ju=p(e=>{Sh[e]||(z.warn(FC[e]),Sh[e]=!0)},"issueWarning"),AC=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ju("LAZY_LOAD_DEPRECATED")},"checkConfig"),KL=p(()=>{let e={};la&&(e=ce(e,la));for(const t of Yr)e=ce(e,t);return e},"getUserDefinedConfig"),be=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Ju("FLOWCHART_HTML_LABELS_DEPRECATED"),lr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),td=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,ds=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,EC=/\s*%%.*\n/gm,_i,ed=(_i=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(_i,"UnknownDiagramError"),_i),Ur={},En=p(function(e,t){e=e.replace(td,"").replace(ds,"").replace(EC,`
5
+ `);for(const[r,{detector:i}]of Object.entries(Ur))if(i(e,t))return r;throw new ed(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ko=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)rd(t,r,i)},"registerLazyLoadedDiagrams"),rd=p((e,t,r)=>{Ur[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),Ur[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),MC=p(e=>Ur[e].loader,"getDiagramLoader"),ws=/<br\s*\/?>/gi,OC=p(e=>e?ad(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),$C=(()=>{let e=!1;return()=>{e||(id(),e=!0)}})();function id(){const e="data-temp-href-target";Mi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Mi.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(id,"setupDompurifyHooks");var sd=p(e=>($C(),Mi.sanitize(e)),"removeScript"),wh=p((e,t)=>{if(be(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=sd(e):r!=="loose"&&(e=ad(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=RC(e))}return e},"sanitizeMore"),We=p((e,t)=>e&&(t.dompurifyConfig?e=Mi.sanitize(wh(e,t),t.dompurifyConfig).toString():e=Mi.sanitize(wh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),DC=p((e,t)=>typeof e=="string"?We(e,t):e.flat().map(r=>We(r,t)),"sanitizeTextOrArray"),IC=p(e=>ws.test(e),"hasBreaks"),PC=p(e=>e.split(ws),"splitBreaks"),RC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ad=p(e=>e.replace(ws,"#br#"),"breakToPlaceholder"),qC=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"),NC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),WC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Bh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],o=t[i+1];zC(a,o)&&(s=a+","+o,i++,r.pop())}r.push(HC(s))}return r.join("")},"parseGenericTypes"),Qo=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),zC=p((e,t)=>{const r=Qo(e,"~"),i=Qo(t,"~");return r===1&&i===1},"shouldCombineSets"),HC=p(e=>{const t=Qo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),vh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Jo=/\$\$(.*?)\$\$/g,ms=p(e=>{var t;return(((t=e.match(Jo))==null?void 0:t.length)??0)>0},"hasKatex"),QL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await od(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),jC=p(async(e,t)=>{if(!ms(e))return e;if(!(vh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Jo,"MathML is unsupported in this environment.");{const{default:r}=await Pt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!vh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ws).map(s=>ms(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Jo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),od=p(async(e,t)=>We(await jC(e,t),t),"renderKatexSanitized"),Bs={getRows:OC,sanitizeText:We,sanitizeTextOrArray:DC,hasBreaks:IC,splitBreaks:PC,lineBreakRegex:ws,removeScript:sd,getUrl:qC,evaluate:lr,getMax:NC,getMin:WC},YC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),UC=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"),nd=p(function(e,t,r,i){const s=UC(t,r,i);YC(e,s)},"configureSvgSize"),GC=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let n=0,l=0;z.info(`Graph bounds: ${n}x${l}`,e),n=a+r*2,l=o+r*2,z.info(`Calculated bounds: ${n}x${l}`),nd(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Js={};function tn(e){return[...e.cssRules].map(t=>t.cssText).join(`
6
+ `)}p(tn,"cssStyleSheetToString");var XC=p((e,t,r,i)=>{let s="";return e in Js&&Js[e]?s=Js[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),`& {
7
+ font-family: ${r.fontFamily};
8
+ font-size: ${r.fontSize};
9
+ fill: ${r.textColor}
10
+ }
11
+ @keyframes edge-animation-frame {
12
+ from {
13
+ stroke-dashoffset: 0;
14
+ }
15
+ }
16
+ @keyframes dash {
17
+ to {
18
+ stroke-dashoffset: 0;
19
+ }
20
+ }
21
+ & .edge-animation-slow {
22
+ stroke-dasharray: 9,5 !important;
23
+ stroke-dashoffset: 900;
24
+ animation: dash 50s linear infinite;
25
+ stroke-linecap: round;
26
+ }
27
+ & .edge-animation-fast {
28
+ stroke-dasharray: 9,5 !important;
29
+ stroke-dashoffset: 900;
30
+ animation: dash 20s linear infinite;
31
+ stroke-linecap: round;
32
+ }
33
+ /* Classes common for multiple diagrams */
34
+
35
+ & .error-icon {
36
+ fill: ${r.errorBkgColor};
37
+ }
38
+ & .error-text {
39
+ fill: ${r.errorTextColor};
40
+ stroke: ${r.errorTextColor};
41
+ }
42
+
43
+ & .edge-thickness-normal {
44
+ stroke-width: ${r.strokeWidth??1}px;
45
+ }
46
+ & .edge-thickness-thick {
47
+ stroke-width: 3.5px
48
+ }
49
+ & .edge-pattern-solid {
50
+ stroke-dasharray: 0;
51
+ }
52
+ & .edge-thickness-invisible {
53
+ stroke-width: 0;
54
+ fill: none;
55
+ }
56
+ & .edge-pattern-dashed{
57
+ stroke-dasharray: 3;
58
+ }
59
+ .edge-pattern-dotted {
60
+ stroke-dasharray: 2;
61
+ }
62
+
63
+ & .marker {
64
+ fill: ${r.lineColor};
65
+ stroke: ${r.lineColor};
66
+ }
67
+ & .marker.cross {
68
+ stroke: ${r.lineColor};
69
+ }
70
+
71
+ & svg {
72
+ font-family: ${r.fontFamily};
73
+ font-size: ${r.fontSize};
74
+ }
75
+ & p {
76
+ margin: 0
77
+ }
78
+
79
+ ${s}
80
+ .node .neo-node {
81
+ stroke: ${r.nodeBorder};
82
+ }
83
+
84
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
85
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
86
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
87
+ }
88
+ [data-look="neo"].swimlane.cluster rect {
89
+ filter: none;
90
+ }
91
+
92
+
93
+ [data-look="neo"].node path {
94
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
95
+ stroke-width: ${r.strokeWidth??1}px;
96
+ }
97
+
98
+ [data-look="neo"].node .outer-path {
99
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
100
+ }
101
+
102
+ [data-look="neo"].node .neo-line path {
103
+ stroke: ${r.nodeBorder};
104
+ filter: none;
105
+ }
106
+
107
+ [data-look="neo"].node circle{
108
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
109
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
110
+ }
111
+
112
+ [data-look="neo"].node circle .state-start{
113
+ fill: #000000;
114
+ }
115
+
116
+ [data-look="neo"].icon-shape .icon {
117
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
118
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
119
+ }
120
+
121
+ [data-look="neo"].icon-shape .icon-neo path {
122
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
123
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
124
+ }
125
+
126
+ ${t}
127
+ `},"getStyles"),VC=p((e,t)=>{t!==void 0&&(Js[e]=t)},"addStylesForDiagram"),ZC=XC,ld={};ly(ld,{clear:()=>KC,getAccDescription:()=>e0,getAccTitle:()=>JC,getDiagramTitle:()=>i0,setAccDescription:()=>t0,setAccTitle:()=>QC,setDiagramTitle:()=>r0});var Mn="",On="",$n="",Dn=p(e=>We(e,te()),"sanitizeText"),KC=p(()=>{Mn="",$n="",On=""},"clear"),QC=p(e=>{Mn=Dn(e).replace(/^\s+/g,"")},"setAccTitle"),JC=p(()=>Mn,"getAccTitle"),t0=p(e=>{$n=Dn(e).replace(/\n\s+/g,`
128
+ `)},"setAccDescription"),e0=p(()=>$n,"getAccDescription"),r0=p(e=>{On=Dn(e)},"setDiagramTitle"),i0=p(()=>On,"getDiagramTitle"),Lh=z,s0=An,Wt=te,JL=Ku,t_=Oi,In=p(e=>We(e,Wt()),"sanitizeText"),a0=GC,o0=p(()=>ld,"getCommonDb"),ca={},ua=p((e,t,r)=>{var i;ca[e]&&Lh.warn(`Diagram with id ${e} already registered. Overwriting.`),ca[e]=t,r&&rd(e,r),VC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Lh,s0,Wt,In,a0,o0(),()=>{})},"registerDiagram"),en=p(e=>{if(e in ca)return ca[e];throw new n0(e)},"getDiagram"),Fi,n0=(Fi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Fi,"DiagramNotFoundError"),Fi),l0=p(e=>{var s;const{securityLevel:t}=Wt();let r=It("body");if(t==="sandbox"){const o=((s=It(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=It(o.body)}return r.select(`#${e}`)},"selectSvgElement"),h0=p(e=>{const{handDrawnSeed:t}=Wt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),c0=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Pi=p(e=>{const t=u0([...e.cssCompiledStyles||[],...e.cssStyles||[],...c0(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),u0=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),hd=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"),xt=p(e=>{const{stylesArray:t}=Pi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];hd(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),dt=p((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Wt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=Pi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:d0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),d0=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const g0=Object.freeze({left:0,top:0,width:16,height:16}),da=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),cd=Object.freeze({...g0,...da}),p0=Object.freeze({...cd,body:"",hidden:!1}),f0=Object.freeze({width:null,height:null}),m0=Object.freeze({...f0,...da}),y0=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return ao(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return ao(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return ao(n,r)?n:null}return null},ao=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function C0(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 _h(e,t){const r=C0(e,t);for(const i in p0)i in da?i in e&&!(i in r)&&(r[i]=da[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function x0(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Fh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=_h(i[n]||s[n],a)}return o(t),r.forEach(o),_h(e,a)}function b0(e,t){if(e.icons[t])return Fh(e,t,[]);const r=x0(e,[t])[t];return r?Fh(e,t,r):null}const k0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,T0=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Ah(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(k0);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=T0.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function S0(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function w0(e,t){return e?"<defs>"+e+"</defs>"+t:t}function B0(e,t,r){const i=S0(e);return w0(i.defs,t+i.content+r)}const v0=e=>e==="unset"||e==="undefined"||e==="none";function L0(e,t){const r={...cd,...e},i={...m0,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,k=y.vFlip;let S=y.rotate;C?k?S+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):k&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let w;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:w=s.height/2+s.top,x.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,x.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")")}S%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),x.length&&(a=B0(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Ah(u,l/c)):(h=o==="auto"?l:o,u=n===null?Ah(h,c/l):n==="auto"?c:n);const g={},d=(y,x)=>{v0(x)||(g[y]=x.toString())};d("width",h),d("height",u);const m=[s.left,s.top,l,c];return g.viewBox=m.join(" "),{attributes:g,viewBox:m,body:a}}const _0=/\sid="(\S+)"/g,Eh=new Map;function F0(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Eh.get(e)||0;return Eh.set(e,t+1),t?`${e}${t}`:e}function A0(e){const t=[];let r;for(;r=_0.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=F0(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function E0(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var M0={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},rn=new Map,ud=new Map,O0=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(z.debug("Registering icon pack:",t.name),"loader"in t)ud.set(t.name,t.loader);else if("icons"in t)rn.set(t.name,t.icons);else throw z.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),dd=p(async(e,t)=>{const r=y0(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=rn.get(i);if(!s){const o=ud.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},rn.set(i,s)}catch(n){throw z.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=b0(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),$0=p(async e=>{try{return await dd(e),!0}catch{return!1}},"isIconAvailable"),vs=p(async(e,t,r)=>{let i;try{i=await dd(e,t==null?void 0:t.fallbackPrefix)}catch(o){z.error(o),i=M0}const s=L0(i,t),a=E0(A0(s.body),{...s.attributes,...r});return We(a,te())},"getIconSVG"),Rs={},le={},Mh;function D0(){return Mh||(Mh=1,Object.defineProperty(le,"__esModule",{value:!0}),le.BLANK_URL=le.relativeFirstCharacters=le.whitespaceEscapeCharsRegex=le.urlSchemeRegex=le.ctrlCharactersRegex=le.htmlCtrlEntityRegex=le.htmlEntitiesRegex=le.invalidProtocolRegex=void 0,le.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,le.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,le.htmlCtrlEntityRegex=/&(newline|tab);/gi,le.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,le.urlSchemeRegex=/^.+(:|&colon;)/gim,le.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,le.relativeFirstCharacters=[".","/"],le.BLANK_URL="about:blank"),le}var Oh;function I0(){if(Oh)return Rs;Oh=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.sanitizeUrl=a;var e=D0();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 s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(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 g=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(g))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(g==="mailto:"||g.includes("://"))return d;if(g==="http:"||g==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return Rs}var P0=I0();function oo(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function R0(){}function gd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Pn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const q0="[object RegExp]",pd="[object String]",fd="[object Number]",md="[object Boolean]",yd="[object Arguments]",N0="[object Symbol]",W0="[object Date]",z0="[object Map]",H0="[object Set]",j0="[object Array]",Y0="[object ArrayBuffer]",U0="[object Object]",G0="[object DataView]",X0="[object Uint8Array]",V0="[object Uint8ClampedArray]",Z0="[object Uint16Array]",K0="[object Uint32Array]",Q0="[object Int8Array]",J0="[object Int16Array]",tx="[object Int32Array]",ex="[object Float32Array]",rx="[object Float64Array]",$h=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Rn(e){return typeof $h.Buffer<"u"&&$h.Buffer.isBuffer(e)}function ix(e){return Number.isSafeInteger(e)&&e>=0}function Cd(e){return e!=null&&typeof e!="function"&&ix(e.length)}function sx(e){return e==="__proto__"}function qn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Nn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ax(e,t){return di(e,void 0,e,new Map,t)}function di(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(qn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=di(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,di(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(di(n,void 0,r,i,s));return o}if(Rn(e))return e.subarray();if(Nn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=di(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),je(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,je(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(typeof e=="object"&&ox(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),je(o,e,r,i,s),o}return e}function je(e,t,r=e,i,s){const a=[...Object.keys(t),...gd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=di(t[n],n,r,i,s))}}function ox(e){switch(Pn(e)){case yd:case j0:case Y0:case G0:case md:case W0:case ex:case rx:case Q0:case J0:case tx:case z0:case fd:case U0:case q0:case H0:case pd:case N0:case X0:case V0:case Z0:case K0:return!0;default:return!1}}function nx(e,t){return ax(e,(r,i,s,a)=>{if(typeof e=="object"){if(Pn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),je(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case fd:case pd:case md:{const o=new e.constructor(e==null?void 0:e.valueOf());return je(o,e),o}case yd:{const o={};return je(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Dh(e){return nx(e)}function sn(e){return e!==null&&typeof e=="object"&&Pn(e)==="[object Arguments]"}function an(e){return typeof e=="object"&&e!==null}function lx(e){return an(e)&&Cd(e)}function ta(e){return Nn(e)}function hx(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Ls(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Ls.Cache||Map),r}Ls.Cache=Map;function cx(e){if(qn(e))return e;if(Array.isArray(e)||Nn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function ux(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=ea(s,o,i,new Map)}return s}function ea(e,t,r,i){if(qn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return cx(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...gd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(sx(o))continue;let n=t[o],l=e[o];if(sn(n)&&(n={...n}),sn(l)&&(l={...l}),Rn(n)&&(n=Dh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let g=0;g<u.length;g++){const d=u[g];h[d]=l[d]}l=h}else if(lx(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||an(l)&&an(n)&&(oo(l)||oo(n)||ta(l)||ta(n))?e[o]=ea(l,n,r,i):l==null&&oo(n)?e[o]=ea({},n,r,i):l==null&&ta(n)?e[o]=Dh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function dx(e,...t){return ux(e,...t,R0)}function Ih(e){if(e==null)return!0;if(Cd(e))return typeof e.splice!="function"&&typeof e!="string"&&!Rn(e)&&!ta(e)&&!sn(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return hx(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var gx="​",px={curveBasis:Go,curveBasisClosed:oy,curveBasisOpen:ay,curveBumpX:Ru,curveBumpY:Pu,curveBundle:sy,curveCardinalClosed:iy,curveCardinalOpen:ry,curveCardinal:Iu,curveCatmullRomClosed:ey,curveCatmullRomOpen:ty,curveCatmullRom:Du,curveLinear:Zs,curveLinearClosed:Jm,curveMonotoneX:$u,curveMonotoneY:Ou,curveNatural:Mu,curveStep:Eu,curveStepAfter:Au,curveStepBefore:Fu},fx=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,mx=p(function(e,t){const r=xd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);na(o),i=ce(i,[...o])}else i=r.args;if(!i)return;let s=En(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),xd=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${fx.source})(?=[}][%]{2}).*
129
+ `,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=ds.exec(e))!==null;)if(a.index===ds.lastIndex&&ds.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return z.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),yx=p(function(e){return e.replace(ds,"")},"removeDirectives"),Cx=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Wn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return px[r]??t}p(Wn,"interpolateToCurve");function bd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?P0.sanitizeUrl(r):r}p(bd,"formatUrl");var xx=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){z.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function zn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(zn,"distance");function kd(e){let t,r=0;e.forEach(s=>{r+=zn(s,t),t=s});const i=r/2;return Hn(e,i)}p(kd,"traverseEdge");function Td(e){return e.length===1?e[0]:kd(e)}p(Td,"calcLabelPosition");var Ph=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Hn=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=zn(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:Ph((1-o)*r.x+o*s.x,5),y:Ph((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),bx=p((e,t,r)=>{z.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Hn(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Sd(e,t,r){const i=structuredClone(r);z.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Hn(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}p(Sd,"calcTerminalLabelPosition");function wd(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(wd,"getStylesFromArray");var Rh=0,kx=p(()=>(Rh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rh),"generateId");function Bd(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Bd,"makeRandomHex");var Tx=p(e=>Bd(e.length),"random"),Sx=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"),wx=p(function(e,t){const r=t.text.replace(Bs.lineBreakRegex," "),[,i]=va(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),Bx=Ls((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Bs.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=br(`${o} `,r),c=br(a,r);if(l>t){const{hyphenatedStrings:g,remainingWord:d}=vx(o,t,"-",r);s.push(a,...g),a=d}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),vx=Ls((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(br(c,i)>=t){const u=l+1,g=s.length===u,d=`${c}${r}`;a.push(g?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function vd(e,t){return jn(e,t).height}p(vd,"calculateTextHeight");function br(e,t){return jn(e,t).width}p(br,"calculateTextWidth");var jn=Ls((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=va(r),o=["sans-serif",i],n=e.split(Bs.lineBreakRegex),l=[],c=It("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const g of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const x=Sx();x.text=y||gx;const C=wx(h,x).style("font-size",a).style("font-weight",s).style("font-family",g),k=(C._groups||C)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),d=Math.round(k.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}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}`),Ai,Lx=(Ai=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Ai,"InitIDGenerator"),Ai),qs,_x=p(function(e){return qs=qs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qs.innerHTML=e,unescape(qs.textContent)},"entityDecode");function Yn(e){return"str"in e}p(Yn,"isDetailedError");var Fx=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),va=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 Un(e,t){return dx({},e,t)}p(Un,"cleanAndMerge");var xe={assignWithDepth:ce,wrapLabel:Bx,calculateTextHeight:vd,calculateTextWidth:br,calculateTextDimensions:jn,cleanAndMerge:Un,detectInit:mx,detectDirective:xd,isSubstringInArray:Cx,interpolateToCurve:Wn,calcLabelPosition:Td,calcCardinalityPosition:bx,calcTerminalLabelPosition:Sd,formatUrl:bd,getStylesFromArray:wd,generateId:kx,random:Tx,runFunc:xx,entityDecode:_x,insertTitle:Fx,isLabelCoordinateInPath:Ld,parseFontSize:va,InitIDGenerator:Lx},Ax=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"),Mr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),e_=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function oe(e){return e??null}p(oe,"handleUndefinedAttr");function Ld(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(Ld,"isLabelCoordinateInPath");var ra={exports:{}},qh=ra.exports,Nh;function Ex(){return Nh||(Nh=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var g=u?h.bind(u):h;return this.reads.push(g),a(this),g},mutate:function(h,u){var g=u?h.bind(u):h;return this.writes.push(g),a(this),g},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function a(h){h.scheduled||(h.scheduled=!0,h.raf(o.bind(null,h)))}function o(h){var u=h.writes,g=h.reads,d;try{r("flushing reads",g.length),h.runTasks(g),r("flushing writes",u.length),h.runTasks(u)}catch(m){d=m}if(h.scheduled=!1,(g.length||u.length)&&a(h),d)if(r("task errored",d.message),h.catch)h.catch(d);else throw d}function n(h,u){var g=h.indexOf(u);return!!~g&&!!h.splice(g,1)}function l(h,u){for(var g in u)u.hasOwnProperty(g)&&(h[g]=u[g])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof qh<"u"?qh:globalThis)})(ra)),ra.exports}var Mx=Ex();const Ox=Fn(Mx);var no={exports:{}},Wh;function $x(){return Wh||(Wh=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,a=s.get(i);this.fastdom.clear(a),s.delete(i)}};function r(i,s,a,o){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(u,g){c=l[s](function(){n.delete(h);try{u(o?a.call(o):a())}catch(d){g(d)}},o)});return n.set(h,c),h}e.exports=t})()})(no)),no.exports}var Dx=$x();const Ix=Fn(Dx);function Gn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Qr=Gn();function _d(e){Qr=e}var gs={exec:()=>null};function Gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Se.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var Px=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Se={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")},Rx=/^(?:[ \t]*(?:\n|$))+/,qx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_s=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Xn=/(?:[*+-]|\d{1,9}[.)])/,Fd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ad=Gt(Fd).replace(/bull/g,Xn).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(),zx=Gt(Fd).replace(/bull/g,Xn).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(),Vn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hx=/^[^\n]+/,Zn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jx=Gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yx=Gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Xn).getRegex(),La="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",Kn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ux=Gt("^ {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",Kn).replace("tag",La).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ed=Gt(Vn).replace("hr",_s).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",La).getRegex(),Gx=Gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ed).getRegex(),Qn={blockquote:Gx,code:qx,def:jx,fences:Nx,heading:Wx,hr:_s,html:Ux,lheading:Ad,list:Yx,newline:Rx,paragraph:Ed,table:gs,text:Hx},zh=Gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_s).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",La).getRegex(),Xx={...Qn,lheading:zx,table:zh,paragraph:Gt(Vn).replace("hr",_s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zh).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",La).getRegex()},Vx={...Qn,html:Gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kn).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:gs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gt(Vn).replace("hr",_s).replace("heading",` *#{1,6} *[^
130
+ ]`).replace("lheading",Ad).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Md=/^( {2,}|\\)\n(?!\s*$)/,Qx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_a=/[\p{P}\p{S}]/u,Jn=/[\s\p{P}\p{S}]/u,Od=/[^\s\p{P}\p{S}]/u,Jx=Gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Jn).getRegex(),$d=/(?!~)[\p{P}\p{S}]/u,tb=/(?!~)[\s\p{P}\p{S}]/u,eb=/(?:[^\s\p{P}\p{S}]|~)/u,rb=Gt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Px?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Dd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ib=Gt(Dd,"u").replace(/punct/g,_a).getRegex(),sb=Gt(Dd,"u").replace(/punct/g,$d).getRegex(),Id="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ab=Gt(Id,"gu").replace(/notPunctSpace/g,Od).replace(/punctSpace/g,Jn).replace(/punct/g,_a).getRegex(),ob=Gt(Id,"gu").replace(/notPunctSpace/g,eb).replace(/punctSpace/g,tb).replace(/punct/g,$d).getRegex(),nb=Gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Od).replace(/punctSpace/g,Jn).replace(/punct/g,_a).getRegex(),lb=Gt(/\\(punct)/,"gu").replace(/punct/g,_a).getRegex(),hb=Gt(/^<(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(),cb=Gt(Kn).replace("(?:-->|$)","-->").getRegex(),ub=Gt("^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",cb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ga=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,db=Gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ga).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Pd=Gt(/^!?\[(label)\]\[(ref)\]/).replace("label",ga).replace("ref",Zn).getRegex(),Rd=Gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zn).getRegex(),gb=Gt("reflink|nolink(?!\\()","g").replace("reflink",Pd).replace("nolink",Rd).getRegex(),Hh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,tl={_backpedal:gs,anyPunctuation:lb,autolink:hb,blockSkip:rb,br:Md,code:Kx,del:gs,emStrongLDelim:ib,emStrongRDelimAst:ab,emStrongRDelimUnd:nb,escape:Zx,link:db,nolink:Rd,punctuation:Jx,reflink:Pd,reflinkSearch:gb,tag:ub,text:Qx,url:gs},pb={...tl,link:Gt(/^!?\[(label)\]\((.*?)\)/).replace("label",ga).getRegex(),reflink:Gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ga).getRegex()},on={...tl,emStrongRDelimAst:ob,emStrongLDelim:sb,url:Gt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Hh).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:Gt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Hh).getRegex()},fb={...on,br:Gt(Md).replace("{2,}","*").getRegex(),text:Gt(on.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ns={normal:Qn,gfm:Xx,pedantic:Vx},Vi={normal:tl,gfm:on,breaks:fb,pedantic:pb},mb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jh=e=>mb[e];function Je(e,t){if(t){if(Se.escapeTest.test(e))return e.replace(Se.escapeReplace,jh)}else if(Se.escapeTestNoEncode.test(e))return e.replace(Se.escapeReplaceNoEncode,jh);return e}function Yh(e){try{e=encodeURI(e).replace(Se.percentDecode,"%")}catch{return null}return e}function Uh(e,t){var a;let r=e.replace(Se.findPipe,(o,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Se.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Se.slashPipe,"|");return i}function Zi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function yb(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 Gh(e,t,r,i,s){let a=t.href,o=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function Cb(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
131
+ `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[n]=o;return n.length>=s.length?a.slice(s.length):a}).join(`
132
+ `)}var pa=class{constructor(t){Zt(this,"options");Zt(this,"rules");Zt(this,"lexer");this.options=t||Qr}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:Zi(i,`
133
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Cb(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Zi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Zi(r[0],`
134
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Zi(r[0],`
135
+ `).split(`
136
+ `),s="",a="",o=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
137
+ `),u=h.replace(this.rules.other.blockquoteSetextReplace,`
138
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
139
+ ${h}`:h,a=a?`${a}
140
+ ${u}`:u;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=g,i.length===0)break;let d=o.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let m=d,y=m.raw+`
141
+ `+i.join(`
142
+ `),x=this.blockquote(y);o[o.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,a=a.substring(0,a.length-m.text.length)+x.text;break}else if((d==null?void 0:d.type)==="list"){let m=d,y=m.raw+`
143
+ `+i.join(`
144
+ `),x=this.list(y);o[o.length-1]=x,s=s.substring(0,s.length-d.raw.length)+x.raw,a=a.substring(0,a.length-m.raw.length)+x.raw,i=y.substring(o.at(-1).raw.length).split(`
145
+ `);continue}}return{type:"blockquote",raw:s,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",u="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let g=r[2].split(`
146
+ `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),d=t.split(`
147
+ `,1)[0],m=!g.trim(),y=0;if(this.options.pedantic?(y=2,u=g.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,u=g.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(d)&&(h+=d+`
148
+ `,t=t.substring(d.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),S=this.rules.other.hrRegex(y),w=this.rules.other.fencesBeginRegex(y),v=this.rules.other.headingBeginRegex(y),_=this.rules.other.htmlBeginRegex(y);for(;t;){let A=t.split(`
149
+ `,1)[0],F;if(d=A,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),F=d):F=d.replace(this.rules.other.tabCharGlobal," "),w.test(d)||v.test(d)||_.test(d)||k.test(d)||S.test(d))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!d.trim())u+=`
150
+ `+F.slice(y);else{if(m||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(g)||v.test(g)||S.test(g))break;u+=`
151
+ `+d}!m&&!d.trim()&&(m=!0),h+=A+`
152
+ `,t=t.substring(A.length+1),g=F.slice(y)}}a.loose||(n?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(u),x&&(C=x[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!x,checked:C,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(g=>g.type==="space"),u=h.length>0&&h.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Uh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
153
+ `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<i.length;l++)o.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:o.align[l]});for(let l of a)o.rows.push(Uh(l,o.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:o.align[h]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
154
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let o=Zi(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{let o=yb(r[2],"()");if(o===-2)return;if(o>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),Gh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Gh(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,o,n,l=a,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(s=h.exec(r))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(n=[...o].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&a%3&&!((a+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let u=[...s[0]][0].length,g=t.slice(0,a+s.index+u+n);if(Math.min(a,n)%2){let m=g.slice(1,-1);return{type:"em",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}let d=g.slice(2,-2);return{type:"strong",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ye=class nn{constructor(t){Zt(this,"tokens");Zt(this,"options");Zt(this,"state");Zt(this,"tokenizer");Zt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Qr,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Se,block:Ns.normal,inline:Vi.normal};this.options.pedantic?(r.block=Ns.pedantic,r.inline=Vi.pedantic):this.options.gfm&&(r.block=Ns.gfm,this.options.breaks?r.inline=Vi.breaks:r.inline=Vi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ns,inline:Vi}}static lex(t,r){return new nn(r).lex(t)}static lexInline(t,r){return new nn(r).inlineTokens(t)}lex(t){t=t.replace(Se.carriageReturn,`
155
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,o;for(this.options.pedantic&&(t=t.replace(Se.tabCharGlobal," ").replace(Se.spaceLine,""));t;){let n;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
156
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
157
+ `)?"":`
158
+ `)+n.raw,c.text+=`
159
+ `+n.text,this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
160
+ `)?"":`
161
+ `)+n.raw,c.text+=`
162
+ `+n.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((o=this.options.extensions)!=null&&o.startBlock){let c=1/0,h=t.slice(1),u;this.options.extensions.startBlock.forEach(g=>{u=g.call({lexer:this},h),typeof u=="number"&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
163
+ `)?"":`
164
+ `)+n.raw,c.text+=`
165
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
166
+ `)?"":`
167
+ `)+n.raw,c.text+=`
168
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,h,u,g;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let o=!1,n="";for(;t;){o||(n=""),o=!1;let d;if((u=(h=this.options.extensions)==null?void 0:h.inline)!=null&&u.some(y=>(d=y.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let y=r.at(-1);d.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let m=t;if((g=this.options.extensions)!=null&&g.startInline){let y=1/0,x=t.slice(1),C;this.options.extensions.startInline.forEach(k=>{C=k.call({lexer:this},x),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(d=this.tokenizer.inlineText(m)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),o=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=d.raw,y.text+=d.text):r.push(d);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},fa=class{constructor(t){Zt(this,"options");Zt(this,"parser");this.options=t||Qr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;let s=(o=(r||"").match(Se.notSpaceStart))==null?void 0:o[0],a=t.replace(Se.endingNewline,"")+`
169
+ `;return s?'<pre><code class="language-'+Je(s)+'">'+(i?a:Je(a,!0))+`</code></pre>
170
+ `:"<pre><code>"+(i?a:Je(a,!0))+`</code></pre>
171
+ `}blockquote({tokens:t}){return`<blockquote>
172
+ ${this.parser.parse(t)}</blockquote>
173
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
174
+ `}hr(t){return`<hr>
175
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let a=r?"ol":"ul",o=r&&i!==1?' start="'+i+'"':"";return"<"+a+o+`>
176
+ `+s+"</"+a+`>
177
+ `}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Je(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
178
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
179
+ `}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];i="";for(let n=0;n<o.length;n++)i+=this.tablecell(o[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
180
+ <thead>
181
+ `+r+`</thead>
182
+ `+s+`</table>
183
+ `}tablerow({text:t}){return`<tr>
184
+ ${t}</tr>
185
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
186
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Je(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=Yh(t);if(a===null)return s;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+Je(r)+'"'),o+=">"+s+"</a>",o}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=Yh(t);if(a===null)return Je(i);t=a;let o=`<img src="${t}" alt="${i}"`;return r&&(o+=` title="${Je(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Je(t.text)}},el=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ue=class ln{constructor(t){Zt(this,"options");Zt(this,"renderer");Zt(this,"textRenderer");this.options=t||Qr,this.options.renderer=this.options.renderer||new fa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new el}static parse(t,r){return new ln(r).parse(t)}static parseInline(t,r){return new ln(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let c=n,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;o+1<t.length&&t[o+1].type==="text";)c=t[++o],h+=`
187
+ `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let o=0;o<t.length;o++){let n=t[o];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=c||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Vs,ss=(Vs=class{constructor(t){Zt(this,"options");Zt(this,"block");this.options=t||Qr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}},Zt(Vs,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Zt(Vs,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Vs),xb=class{constructor(...t){Zt(this,"defaults",Gn());Zt(this,"options",this.setOptions);Zt(this,"parse",this.parseMarkdown(!0));Zt(this,"parseInline",this.parseMarkdown(!1));Zt(this,"Parser",Ue);Zt(this,"Renderer",fa);Zt(this,"TextRenderer",el);Zt(this,"Lexer",Ye);Zt(this,"Tokenizer",pa);Zt(this,"Hooks",ss);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let o of t)switch(i=i.concat(r.call(this,o)),o.type){case"table":{let n=o;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=o;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=o;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let c=n[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...n){let l=a.renderer.apply(this,n);return l===!1&&(l=o.apply(this,n)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new fa(this.defaults);for(let o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let n=o,l=i.renderer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new pa(this.defaults);for(let o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let n=o,l=i.tokenizer[n],c=a[n];a[n]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new ss;for(let o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let n=o,l=i.hooks[n],c=a[n];ss.passThroughHooks.has(o)?a[n]=h=>{if(this.defaults.async&&ss.passThroughHooksRespectAsync.has(o))return(async()=>{let g=await l.call(a,h);return c.call(a,g)})();let u=l.call(a,h);return c.call(a,u)}:a[n]=(...h)=>{if(this.defaults.async)return(async()=>{let g=await l.apply(a,h);return g===!1&&(g=await c.apply(a,h)),g})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,o=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(o.call(this,n)),a&&(l=l.concat(a.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ye.lex(t,r??this.defaults)}parser(t,r){return Ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let n=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(n,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let n=(a.hooks?a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(r,a);a.hooks&&(n=a.hooks.processAllTokens(n)),a.walkTokens&&this.walkTokens(n,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(n,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(n){return o(n)}}}onError(t,r){return i=>{if(i.message+=`
188
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Je(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Gr=new xb;function Xt(e,t){return Gr.parse(e,t)}Xt.options=Xt.setOptions=function(e){return Gr.setOptions(e),Xt.defaults=Gr.defaults,_d(Xt.defaults),Xt};Xt.getDefaults=Gn;Xt.defaults=Qr;Xt.use=function(...e){return Gr.use(...e),Xt.defaults=Gr.defaults,_d(Xt.defaults),Xt};Xt.walkTokens=function(e,t){return Gr.walkTokens(e,t)};Xt.parseInline=Gr.parseInline;Xt.Parser=Ue;Xt.parser=Ue.parse;Xt.Renderer=fa;Xt.TextRenderer=el;Xt.Lexer=Ye;Xt.lexer=Ye.lex;Xt.Tokenizer=pa;Xt.Hooks=ss;Xt.parse=Xt;Xt.options;Xt.setOptions;Xt.use;Xt.walkTokens;Xt.parseInline;Ue.parse;Ye.lex;function qd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var u,g;return(g=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&g!==void 0?g:0})):n},[]);if(s.length){var a=new RegExp(`
189
+ [ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(n){return n.replace(a,`
190
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var o=i[0];return t.forEach(function(n,l){var c=o.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=n;typeof n=="string"&&n.includes(`
191
+ `)&&(u=String(n).split(`
192
+ `).map(function(g,d){return d===0?g:"".concat(h).concat(g)}).join(`
193
+ `)),o+=u+i[l+1]}),o}var hn=typeof performance<"u"&&typeof performance.now=="function",ai=p(()=>hn?performance.now():0,"now"),lo="🧜 ",bb="Mermaid render",kb="Mermaid",Tb={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Ei;Ei=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=ai();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(ai()-i)}}async tick(t,r){if(!this.enabled)return r();const i=ai();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(ai()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:ai(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),hn&&typeof performance.mark=="function")try{performance.mark(`${lo}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=ai();if(t.duration=r-t.start,hn&&typeof performance.measure=="function")try{performance.measure(`${lo}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:bb,trackGroup:kb,color:Tb[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],o=p((l,c)=>{const h=" ".repeat(c),u=l.duration.toFixed(1).padStart(8),g=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${u} ${g} ${h}${l.name}`);for(const d of l.children)o(d,c+1);if(l.children.length>0){const d=l.children.reduce((y,x)=>y+x.duration,0),m=l.duration-d;if(m>.5){const y=m.toFixed(1).padStart(8);a.push(`${y} ${h} (self)`)}}},"walk");o(t,0);const n=Object.keys(this.buckets);if(n.length>0){a.push("—— buckets (summed) ——");for(const l of n)a.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${lo}mermaid render profile · ${s}
194
+ ${a.join(`
195
+ `)}`)}},p(Ei,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var Sb=Ox.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(Ix),Xr=Sb;function Nd(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
196
+ `).replace(/\n{2,}/g,`
197
+ `);return qd(i)}p(Nd,"preprocessMarkdown");function Wd(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(Wd,"nonMarkdownToLines");function zd(e,t={}){const r=Nd(e,t),i=Xt.lexer(r),s=[[]];let a=0;function o(n,l="normal"){n.type==="text"?n.text.split(`
198
+ `).forEach((h,u)=>{u!==0&&(a++,s.push([])),h.split(" ").forEach(g=>{g=g.replace(/&#39;/g,"'"),g&&s[a].push({content:g,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{o(c,n.type)}):n.type==="html"&&s[a].push({content:n.text,type:"normal"})}return p(o,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{o(c)}):n.type==="html"?s[a].push({content:n.text,type:"normal"}):s[a].push({content:n.raw,type:"normal"})}),s}p(zd,"markdownToLines");function Hd(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Hd,"nonMarkdownToHTML");function jd(e,{markdownAutoWrap:t}={}){const r=Xt.lexer(e);function i(s){var a,o,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(o=s.tokens)==null?void 0:o.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(z.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(jd,"markdownToHTML");function Yd(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Yd,"splitTextToChars");function Ud(e,t){const r=Yd(t.content);return rl(e,[],r,t.type)}p(Ud,"splitWordToFitWidth");function rl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,o=[...t,s];return e([{content:o.join(""),type:i}])?rl(e,o,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(rl,"splitWordToFitWidthRecursion");function Gd(e,t){if(e.some(({content:r})=>r.includes(`
199
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ma(e,t)}p(Gd,"splitLineToFitWidth");function ma(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(s!==""&&o.push({content:s,type:"normal"}),o.push(a),t(o))return ma(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[n,l]=Ud(t,a);r.push([n]),l.content&&e.unshift(l)}return ma(e,t,r)}p(ma,"splitLineToFitWidthRecursion");function cn(e,t){t&&e.attr("style",t)}p(cn,"applyStyle");var Xh=16384;async function Xd(e,t,r,i,s=!1,a=te()){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Xh)}px`),o.attr("height",`${Math.min(10*r,Xh)}px`);const n=o.append("xhtml:div"),l=ms(t.label)?await od(t.label.replace(Bs.lineBreakRegex,`
200
+ `),a):We(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),cn(h,t.labelStyle),h.attr("class",`${c} ${i}`),cn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await Xr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),o.node()}p(Xd,"addHtmlSpan");function Fa(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(Fa,"createTspan");function Vd(e,t,r){const i=e.append("text"),s=Fa(i,1,t);Aa(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Vd,"computeWidthOfText");function wb(e,t,r){var o;const i=e.append("text"),s=Fa(i,1,t);Aa(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}p(wb,"computeDimensionOfText");function Zd(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(d=>Vd(o,1.1,d)<=e,"checkWidth"),g=u(h)?[h]:Gd(h,u);for(const d of g){const m=Fa(l,c,1.1,s);Aa(m,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(Zd,"createFormattedText");function un(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(un,"decodeHTMLEntities");function Aa(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(un(r.content)):s.text(" "+un(r.content))})}p(Aa,"updateTextContentAndStyles");async function Kd(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await $0(n)?await vs(n,void 0,{class:"label-icon"}):`<i class='${We(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Kd,"replaceIconSubstring");var Ve=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(z.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?jd(t,h):Hd(t),g=await Kd(Mr(u),h),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:ms(t)?d:g,labelStyle:r.replace("fill:","color:")};return await Xd(e,m,l,s,c,h)}else{const u=Mr(t.replace(/<br\s*\/?>/g,"<br/>")),g=o?zd(u.replace("<br>","<br/>"),h):Wd(u),d=Zd(l,e,g,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");It(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");It(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");It(d).select("text").attr("style",y)}return i?It(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):It(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function ho(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function Bb(e,t){return e[0]===t[0]&&e[1]===t[1]}function vb(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)ho(c,n,s);const l=(function(c,h,u){const g=[];for(const k of c){const S=[...k];Bb(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&g.push(S)}const d=[];h=Math.max(h,.1);const m=[];for(const k of g)for(let S=0;S<k.length-1;S++){const w=k[S],v=k[S+1];if(w[1]!==v[1]){const _=Math.min(w[1],v[1]);m.push({ymin:_,ymax:Math.max(w[1],v[1]),x:_===w[1]?w[0]:v[0],islope:(v[0]-w[0])/(v[1]-w[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return d;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>x);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:x,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=x))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(u!==1||C%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const w=y[k].edge,v=y[S].edge;d.push([[Math.round(w.x),x],[Math.round(v.x),x]])}x+=u,y.forEach((k=>{k.edge.x=k.edge.x+u*k.edge.islope})),C++}return d})(o,a,i);if(s){for(const c of o)ho(c,n,-s);(function(c,h,u){const g=[];c.forEach((d=>g.push(...d))),ho(g,h,u)})(l,n,-s)}return l}function Fs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),vb(e,s,i,a||1)}class il{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Fs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Ea(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 Lb extends il{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Fs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)Ea([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 _b extends il{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class Fb{constructor(t){this.helper=t}fillPolygons(t,r){const i=Fs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Ea(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,g=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=d+u+m*s,x=g-o+2*Math.random()*o,C=y-o+2*Math.random()*o,k=this.helper.ellipse(x,C,a,a,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class Ab{constructor(t){this.helper=t}fillPolygons(t,r){const i=Fs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=Ea(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const g=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const m=d*(i+s),y=m+i,x=[h[0]+m*Math.cos(g)+c*Math.cos(g),h[1]+m*Math.sin(g)+c*Math.sin(g)],C=[h[0]+y*Math.cos(g)+c*Math.cos(g),h[1]+y*Math.sin(g)+c*Math.sin(g)];a.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),a}}class Eb{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Fs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=Ea(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const g=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+g*Math.cos(h),l[1]+g*Math.sin(h)],x=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const Ae={};class Mb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Ob=0,co=1,Vh=2,Ws={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 uo(e,t){return e.type===t}function sl(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:Ob,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:co,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:Vh,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!uo(a,Vh);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return sl("M0,0"+e);s++,o=Ws[a.text],i=a.text}else uo(a,co)?o=Ws[i]:(s++,o=Ws[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!uo(c,co))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Ws[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Qd(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Jd(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,g=0;r==="C"||r==="S"?(u=i+(i-n),g=s+(s-l)):(u=i,g=s),t.push({key:"C",data:[u,g,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,g]=h;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const y=i+2*(d-i)/3,x=s+2*(m-s)/3,C=u+2*(d-u)/3,k=g+2*(m-g)/3;t.push({key:"C",data:[y,x,C,k,u,g]}),n=d,l=m,i=u,s=g;break}case"Q":{const[u,g,d,m]=h,y=i+2*(u-i)/3,x=s+2*(g-s)/3,C=d+2*(u-d)/3,k=m+2*(g-m)/3;t.push({key:"C",data:[y,x,C,k,d,m]}),n=u,l=g,i=d,s=m;break}case"A":{const u=Math.abs(h[0]),g=Math.abs(h[1]),d=h[2],m=h[3],y=h[4],x=h[5],C=h[6];u===0||g===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(tg(i,s,x,C,u,g,d,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Ki(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function tg(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let g=[],d=0,m=0,y=0,x=0;if(c)[d,m,y,x]=c;else{[e,t]=Ki(e,t,-h),[r,i]=Ki(r,i,-h);const j=(e-r)/2,E=(t-i)/2;let O=j*j/(s*s)+E*E/(a*a);O>1&&(O=Math.sqrt(O),s*=O,a*=O);const L=s*s,R=a*a,I=L*R-L*E*E-R*j*j,H=L*E*E+R*j*j,Z=(n===l?-1:1)*Math.sqrt(Math.abs(I/H));y=Z*s*E/a+(e+r)/2,x=Z*-a*j/s+(t+i)/2,d=Math.asin(parseFloat(((t-x)/a).toFixed(9))),m=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const j=m,E=r,O=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,g=tg(r=y+s*Math.cos(m),i=x+a*Math.sin(m),E,O,s,a,o,0,l,[m,j,y,x])}C=m-d;const k=Math.cos(d),S=Math.sin(d),w=Math.cos(m),v=Math.sin(m),_=Math.tan(C/4),A=4/3*s*_,F=4/3*a*_,X=[e,t],N=[e+A*S,t-F*k],W=[r+A*v,i-F*w],at=[r,i];if(N[0]=2*X[0]-N[0],N[1]=2*X[1]-N[1],c)return[N,W,at].concat(g);{g=[N,W,at].concat(g);const j=[];for(let E=0;E<g.length;E+=3){const O=Ki(g[E][0],g[E][1],h),L=Ki(g[E+1][0],g[E+1][1],h),R=Ki(g[E+2][0],g[E+2][1],h);j.push([O[0],O[1],L[0],L[1],R[0],R[1]])}return j}}const $b={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return ya(e,t,r)},ellipse:function(e,t,r,i,s){const a=rg(r,i,s);return dn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return Or(e,t,r,i,s,!0)}};function eg(e,t,r,i,s){return{type:"path",ops:Or(e,t,r,i,s)}}function ia(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...Or(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...Or(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?eg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Db(e,t,r,i,s){return(function(a,o){return ia(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Zh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=zs(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:zs(r[0],1.5*(1+.22*t.roughness),Jh(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=zs(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:zs(o,1.5*(1+.22*t.roughness),Jh(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function rg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=Mt(o*l,r),n+=Mt(n*l,r),{increment:a,rx:o,ry:n}}function dn(e,t,r,i){const[s,a]=tc(i.increment,e,t,i.rx,i.ry,1,i.increment*ya(.1,ya(.4,1,r),r),r);let o=Ca(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=tc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Ca(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function Kh(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),g=Math.abs(i/2);u+=Mt(.01*u,l),g+=Mt(.01*g,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,x=Math.min(y/2,(m-d)/2),C=ec(x,c,h,u,g,d,m,1,l);if(!l.disableMultiStroke){const k=ec(x,c,h,u,g,d,m,1.5,l);C.push(...k)}return o&&(n?C.push(...Or(c,h,c+u*Math.cos(d),h+g*Math.sin(d),l),...Or(c,h,c+u*Math.cos(m),h+g*Math.sin(m),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+g*Math.sin(d)]})),{type:"path",ops:C}}function Qh(e,t){const r=Jd(Qd(sl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Or(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,g,d]=n;i.push(...Ib(l,c,h,u,g,d,a,t)),a=[g,d];break}case"Z":i.push(...Or(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function go(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+Mt(s,t),i[o][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function oi(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Ae[s])switch(s){case"zigzag":Ae[s]||(Ae[s]=new Lb(i));break;case"cross-hatch":Ae[s]||(Ae[s]=new _b(i));break;case"dots":Ae[s]||(Ae[s]=new Fb(i));break;case"dashed":Ae[s]||(Ae[s]=new Ab(i));break;case"zigzag-line":Ae[s]||(Ae[s]=new Eb(i));break;default:s="hachure",Ae[s]||(Ae[s]=new il(i))}return Ae[s]})(t,$b).fillPolygons(e,t)}function Jh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function ig(e){return e.randomizer||(e.randomizer=new Mb(e.seed||0)),e.randomizer.next()}function ya(e,t,r,i=1){return r.roughness*i*(ig(r)*(t-e)+e)}function Mt(e,t,r=1){return ya(-e,e,t,r)}function Or(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=gn(e,t,r,i,s,!0,!1);if(o)return n;const l=gn(e,t,r,i,s,!0,!0);return n.concat(l)}function gn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,g=.2+.2*ig(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=Mt(d,s,c),m=Mt(m,s,c);const y=[],x=()=>Mt(u,s,c),C=()=>Mt(h,s,c),k=s.preserveVertices;return o?y.push({op:"move",data:[e+(k?0:x()),t+(k?0:x())]}):y.push({op:"move",data:[e+(k?0:Mt(h,s,c)),t+(k?0:Mt(h,s,c))]}),o?y.push({op:"bcurveTo",data:[d+e+(r-e)*g+x(),m+t+(i-t)*g+x(),d+e+2*(r-e)*g+x(),m+t+2*(i-t)*g+x(),r+(k?0:x()),i+(k?0:x())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*g+C(),m+t+(i-t)*g+C(),d+e+2*(r-e)*g+C(),m+t+2*(i-t)*g+C(),r+(k?0:C()),i+(k?0:C())]}),y}function zs(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return Ca(i,null,r)}function Ca(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...gn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function tc(e,t,r,i,s,a,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=Mt(.5,n)-Math.PI/2;c.push([Mt(a,n)+t+.9*i*Math.cos(h-e),Mt(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let g=h;g<u;g+=e){const d=[Mt(a,n)+t+i*Math.cos(g),Mt(a,n)+r+s*Math.sin(g)];l.push(d),c.push(d)}c.push([Mt(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),Mt(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([Mt(a,n)+t+.98*i*Math.cos(h+o),Mt(a,n)+r+.98*s*Math.sin(h+o)]),c.push([Mt(a,n)+t+.9*i*Math.cos(h+.5*o),Mt(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function ec(e,t,r,i,s,a,o,n,l){const c=a+Mt(.1,l),h=[];h.push([Mt(n,l)+t+.9*i*Math.cos(c-e),Mt(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([Mt(n,l)+t+i*Math.cos(u),Mt(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Ca(h,null,l)}function Ib(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,g=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]+(g?0:Mt(c[0],n)),o[1]+(g?0:Mt(c[0],n))]}),h=g?[s,a]:[s+Mt(c[d],n),a+Mt(c[d],n)],l.push({op:"bcurveTo",data:[e+Mt(c[d],n),t+Mt(c[d],n),r+Mt(c[d],n),i+Mt(c[d],n),h[0],h[1]]});return l}function Qi(e){return[...e]}function rc(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(Qi(e[0]),Qi(e[1]),Qi(e[2]),Qi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(Qi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function sa(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Pb(e,t,r){const i=sa(t,r);if(i===0)return sa(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),sa(e,Wr(t,r,s))}function Wr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function pn(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],g=n[l+3];let d=3*h[0]-2*c[0]-g[0];d*=d;let m=3*h[1]-2*c[1]-g[1];m*=m;let y=3*u[0]-2*g[0]-c[0];y*=y;let x=3*u[1]-2*g[1]-c[1];return x*=x,d<y&&(d=y),m<x&&(m=x),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(sa(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],g=Wr(l,c,.5),d=Wr(c,h,.5),m=Wr(h,u,.5),y=Wr(g,d,.5),x=Wr(d,m,.5),C=Wr(y,x,.5);pn([l,g,y,C],0,r,s),pn([C,x,m,u],0,r,s)}var a,o;return s}function Rb(e,t){return xa(e,0,e.length,t)}function xa(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=Pb(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(xa(e,t,c+1,i,a),xa(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function po(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)pn(e,3*a,t,i);return r&&r>0?xa(i,0,i.length,r):i}const De="none";class ba{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[eg(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=Db(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(go([c],o)):n.push(oi([c],o))}return o.stroke!==De&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=rg(i,s,o),c=dn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=dn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(oi([c.estimatedPoints],o));return o.stroke!==De&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ia(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=Kh(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const g=Object.assign({},c);g.disableMultiStroke=!0;const d=Kh(t,r,i,s,a,o,!0,!1,g);d.type="fillPath",h.push(d)}else h.push((function(g,d,m,y,x,C,k){const S=g,w=d;let v=Math.abs(m/2),_=Math.abs(y/2);v+=Mt(.01*v,k),_+=Mt(.01*_,k);let A=x,F=C;for(;A<0;)A+=2*Math.PI,F+=2*Math.PI;F-A>2*Math.PI&&(A=0,F=2*Math.PI);const X=(F-A)/k.curveStepCount,N=[];for(let W=A;W<=F;W+=X)N.push([S+v*Math.cos(W),w+_*Math.sin(W)]);return N.push([S+v*Math.cos(F),w+_*Math.sin(F)]),N.push([S,w]),oi([N],k)})(t,r,i,s,a,o,c));return c.stroke!==De&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=Zh(t,i);if(i.fill&&i.fill!==De)if(i.fillStyle==="solid"){const o=Zh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...po(rc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...po(rc(c),10,(1+i.roughness)/2))}o.length&&s.push(oi([o],i))}return i.stroke!==De&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=ia(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(go([t],i)):s.push(oi([t],i))),i.stroke!==De&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==De,o=i.stroke!==De,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,g){const d=Jd(Qd(sl(h))),m=[];let y=[],x=[0,0],C=[];const k=()=>{C.length>=4&&y.push(...po(C,u)),C=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:v,data:_}of d)switch(v){case"M":S(),x=[_[0],_[1]],y.push(x);break;case"L":k(),y.push([_[0],_[1]]);break;case"C":if(!C.length){const A=y.length?y[y.length-1]:x;C.push([A[0],A[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":k(),y.push([x[0],x[1]])}if(S(),!g)return m;const w=[];for(const v of m){const _=Rb(v,g);_.length&&w.push(_)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Qh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Qh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(go(l,i));else s.push(oi(l,i));return o&&(n?l.forEach((h=>{s.push(ia(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:De};break;case"fillPath":o={d:this.opsToPath(a),stroke:De,strokeWidth:0,fill:i.fill||De};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||De,strokeWidth:i,fill:De}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class qb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ba(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Hs="http://www.w3.org/2000/svg";class Nb{constructor(t,r){this.svg=t,this.gen=new ba(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Hs,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Hs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Hs,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Hs,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var pt={canvas:(e,t)=>new qb(e,t),svg:(e,t)=>new Nb(e,t),generator:e=>new ba(e),newSeed:()=>ba.newSeed()},Wb=1,zb=3;async function al(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ol(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const o=Wt().fontSize?Wt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=Xu.fontSize]=va(o),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}p(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}p(al,"configureLabelImages");function ol(e){var r;return e.nodeType===zb?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==Wb||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ol)}p(ol,"hasTextBesidesImages");var ic=3,Hb=32,jb=p(async(e,t,r)=>{var C,k,S;const i=Wt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",oe(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(w=>({text:w,cssClass:"c4-descr"}))].filter(w=>w.text),l=t.width?Math.max(t.width-2*(t.padding??0),Hb):((k=Wt().flowchart)==null?void 0:k.wrappingWidth)??200,h=((S=i.c4)==null?void 0:S.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async w=>{const v=a.append("g").attr("class",w.cssClass),_=await Ve(v,We(Mr(w.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return It(_).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),It(_).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:v,box:v.node().getBBox()}})),g=Math.max(...u.map(({box:w})=>w.width),0);let d=0;for(const{el:w,box:v}of u)w.attr("transform",`translate(${g/2-v.x-v.width/2}, ${d-v.y})`),d+=v.height+ic;const m=u.length>0?d-ic:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-g/2}, ${-m/2})`);const y=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:a}},"c4LabelHelper"),St=p(async(e,t,r)=>{var d,m;if(t.stereotype!==void 0)return jb(e,t,r);let i;const s=t.useHtmlLabels||lr((d=Wt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",oe(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ve(o,We(Mr(n),Wt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((m=Wt().flowchart)==null?void 0:m.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Wt()),u=((t==null?void 0:t.padding)??0)/2;let g;if(s){const y=h.children[0],x=It(h);await al(y),g=await Xr.measure(()=>y.getBoundingClientRect()),x.attr("width",g.width),x.attr("height",g.height)}else g=await Xr.measure(()=>h.getBBox());return s?o.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):o.attr("transform","translate(0, "+-g.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:g,halfPadding:u,label:o}},"labelHelper"),fo=p(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??be(Wt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ve(s,We(Mr(t),Wt()),{useHtmlLabels:i,width:r.width||((c=(l=Wt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2;let n;if(be(Wt())){const h=a.children[0],u=It(a);n=await Xr.measure(()=>h.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await Xr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),Ct=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),wt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function jt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(jt,"createPathFromPoints");function $r(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,g=t+c/2;for(let d=0;d<=50;d++){const m=d/50,y=e+m*l,x=g+s*Math.sin(u*(y-e));o.push({x:y,y:x})}return o}p($r,"generateFullSineWavePoints");function ir(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const g=n+u*h,d=e+r*Math.cos(g),m=t+r*Math.sin(g);o.push({x:-d,y:-m})}return o}p(ir,"generateCirclePoints");function fn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=p((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}p(fn,"mergePaths");var Yb=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),Jr=Yb,He=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Ub=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=Wt(),n=be(o);return await Ve(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Fr=Ub;function sg(e,t){return e.intersect(t)}p(sg,"intersectNode");var Gb=sg;function ag(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}p(ag,"intersectEllipse");var og=ag;function ng(e,t,r){return og(e,t,t,r)}p(ng,"intersectCircle");var Xb=ng;function lg(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&mn(n,l))return;const h=i.y-r.y,u=r.x-i.x,g=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+g,m=h*t.x+u*t.y+g;if(Math.abs(d)<c&&Math.abs(m)<c&&mn(d,m))return;const y=s*u-h*a;if(y===0)return;const x=Math.abs(y/2);let C=a*g-u*o;const k=C<0?(C-x)/y:(C+x)/y;C=h*o-s*g;const S=C<0?(C-x)/y:(C+x)/y;return{x:k,y:S}}}p(lg,"intersectLine");function mn(e,t){return e*t>0}p(mn,"sameSign");var Vb=lg;function hg(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],g=t[h<t.length-1?h+1:0],d=Vb(e,r,{x:l+u.x,y:c+u.y},{x:l+g.x,y:c+g.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let g=h.x-r.x,d=h.y-r.y,m=Math.sqrt(g*g+d*d),y=u.x-r.x,x=u.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),a[0]):e}p(hg,"intersectPolygon");var Zb=hg,ht={node:Gb,circle:Xb,ellipse:og,polygon:Zb,rect:Jr};function cg(e,t){const{labelStyles:r}=xt(t);t.labelStyle=r;const i=wt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=pt.svg(a),c=dt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",oe(n)),Ct(t,u),t.intersect=function(g){return z.info("Circle intersect",t,o,g),ht.circle(t,o,g)},a}p(cg,"anchor");function yn(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,g=(i-t)/2,d=u/s,m=g/a,y=Math.sqrt(d**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=l+x*a*Math.sin(h)*(o?-1:1),k=c-x*s*Math.cos(h)*(o?-1:1),S=Math.atan2((t-k)/a,(e-C)/s);let v=Math.atan2((i-k)/a,(r-C)/s)-S;o&&v<0&&(v+=2*Math.PI),!o&&v>0&&(v-=2*Math.PI);const _=[];for(let A=0;A<20;A++){const F=A/19,X=S+F*v,N=C+s*Math.cos(X),W=k+a*Math.sin(X);_.push({x:N,y:W})}return _}p(yn,"generateArcPoints");function ug(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(ug,"calculateArcSagitta");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=p(X=>X+o,"calcTotalHeight"),l=p(X=>{const N=X/2;return[N/(2.5+X/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[g,d]=l(u),m=ug(u,g,d),x=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+m-m,C=u,{cssStyles:k}=t,S=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...yn(-x/2,-C/2,-x/2,C/2,g,d,!1),{x:x/2,y:C/2},...yn(x/2,C/2,x/2,-C/2,g,d,!0)],w=pt.svg(c),v=dt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=jt(S),A=w.path(_,v),F=c.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${g/2}, 0)`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,S,X)},c}p(dg,"bowTieRect");async function gg(e,t,{config:{themeVariables:r}}){var A;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(o.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),g=Math.max(o.height+c*2+u,t.height??0),d=-g/2+u,m=g/2,y=h*.72,x=[`M${-h/2},${d}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${h/2},${d}`,`A${h/2},${u} 0 0 0 ${-h/2},${d}`,"Z"].join(" "),{cssStyles:C}=t,k=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const X=pt.svg(a).path(x,dt(t,{}));(A=k.node())==null||A.appendChild(X),C&&k.attr("style",C)}else k.append("path").attr("d",x).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Ct(t,k);const S=d+(m-d)/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`);const w=12,v=p((F,X,N)=>Array.from({length:w+1},(W,at)=>{const j=Math.PI-at*Math.PI/w;return{x:F*Math.cos(j),y:X+N*u*Math.sin(j)}}),"arc"),_=[...v(h/2,d,-1),...v(y/2,m,1).reverse()];return t.intersect=function(F){return ht.polygon(t,_,F)},a}p(gg,"bucket");var sc=20,ac=8,Kb=80,mo=8;async function pg(e,t){const{themeVariables:r}=Wt(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:a}=xt(t),{shapeSvg:o,bbox:n}=await St(e,t,wt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,Kb,(t==null?void 0:t.width)??0),u=Math.max(c+ac+sc+l*2,(t==null?void 0:t.height)??0),g=-h/2,d=-u/2,m=-28/2,y=o.select(".label");y&&(t.useHtmlLabels??be(Wt())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let x;if(t.look==="handDrawn"){const v=pt.svg(o),_=dt(t,{fill:i,stroke:s,fillStyle:"solid"}),A=v.path(He(g,d,h,u,mo),_);x=o.insert(()=>A,":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",oe(t.cssStyles))}else x=o.insert("rect",":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",mo).attr("ry",mo).attr("x",g).attr("y",d).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const C=d+l+c+ac;o.append("line").attr("class","collapsed-separator").attr("x1",g+8).attr("y1",C).attr("x2",g+h-8).attr("y2",C).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=C+sc/2,S=2.5,w=10;for(let v=-1;v<=1;v++)o.append("circle").attr("class","collapsed-indicator").attr("cx",v*w).attr("cy",k).attr("r",S).attr("fill",s);return Ct(t,x),t.calcIntersect=function(v,_){return ht.rect(v,_)},t.intersect=function(v){return ht.rect(t,v)},o}p(pg,"collapsedGroup");function hr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(hr,"insertPolygonShape");var Qb=["right","left","up","down"],nl="point",Jb=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),tk=p(e=>Qb.filter(t=>e.has(t)).join("|")||nl,"getDirectionKey"),oc={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[nl]:()=>[{x:0,y:0}]},ek=p((e,t,r,i)=>{const s=Jb(e),a=(r.padding??0)/2,o=t.height+4*a,n=o/2,l=i??t.width+2*n+2*a,c=tk(s);return(oc[c]??oc[nl])({height:o,midpoint:n,padding:a,width:l})},"getArrowPoints");async function fg(e,t){const r=t,{shapeSvg:i,bbox:s}=await St(e,r,wt(r)),a=r.padding??0,o=s.height+2*a,n=o/2,l=s.width+2*n+a,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,g=ek(r.directions??[],s,r,u),d=hr(i,u,o,g);return d.attr("style",r.style??null),Ct(r,d),r.intersect=function(m){return ht.polygon(r,g,m)},i}p(fg,"block_arrow");async function mg(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,g=Math.max(o.width+c*2,t.width??0,90),d=Math.max(o.height+c*2+h,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=pt.svg(a).path(He(-g/2,m,g,d,u),dt(t,{}));(k=x.node())==null||k.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-g/2).attr("y",m).attr("width",g).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-g/2).attr("y1",m+h).attr("x2",g/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let S=0;S<3;S++)x.append("circle").attr("cx",-g/2+12+S*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-g/2+44).attr("y",m+4).attr("width",Math.max(g-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Ct(t,x);const C=m+h+(d-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.rect(t,S)},a}p(mg,"browser");var js=12;async function yg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+js),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,g=c,d=-h,m=0,y=[{x:u+js,y:d},{x:g,y:d},{x:g,y:m},{x:u,y:m},{x:u,y:d+js},{x:u+js,y:d}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=pt.svg(n),S=dt(t,{}),w=jt(y),v=k.path(w,S);x=n.insert(()=>v,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&x.attr("style",C)}else x=hr(n,c,h,y);return i&&x.attr("style",i),Ct(t,x),t.intersect=function(k){return ht.polygon(t,y,k)},n}p(yg,"card");function Cg(e,t){const{nodeStyles:r}=xt(t);t.label="";const i=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=pt.svg(i),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=jt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(g){return ht.polygon(t,o,g)},i}p(Cg,"choice");async function ll(e,t,r){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await St(e,t,wt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const d=pt.svg(a),m=dt(t,{}),y=d.circle(0,0,h*2,m);u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",oe(g))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return Ct(t,u),t.calcIntersect=function(d,m){const y=d.width/2;return ht.circle(d,y,m)},t.intersect=function(d){return z.info("Circle intersect",t,h,d),ht.circle(t,h,d)},a}p(ll,"circle");async function xg(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:o}=await St(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:a.width+l,h=r.positioned?r.height??0:a.height+l,u=r.positioned?-c/2:-a.width/2-o,g=r.positioned?-h/2:-a.height/2-o;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",g).attr("width",c).attr("height",h),Ct(r,n),r.intersect=function(d){return ht.rect(r,d)},s}p(xg,"composite");async function bg(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,g=Math.max(o.width+c*2,t.width??0,90),d=Math.max(o.height+c*2+h,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=pt.svg(a).path(He(-g/2,m,g,d,u),dt(t,{}));(k=x.node())==null||k.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-g/2).attr("y",m).attr("width",g).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-g/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Ct(t,x);const C=m+h+(d-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.rect(t,S)},a}p(bg,"consoleWindow");function kg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
201
+ M ${s.x},${s.y} L ${o.x},${o.y}`}p(kg,"createLine");function Tg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=pt.svg(s),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=kg(a),u=n.path(h,l),g=s.insert(()=>c,":first-child");return g.insert(()=>u),g.attr("class","outer-path"),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),Ct(t,g),t.intersect=function(d){return z.info("crossedCircle intersect",t,{radius:a,point:d}),ht.circle(t,a,d)},s}p(Tg,"crossedCircle");function fr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const g=n+u*h,d=e+r*Math.cos(g),m=t+r*Math.sin(g);o.push({x:-d,y:-m})}return o}p(fr,"generateCirclePoints");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:g}=t,d=[...fr(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...fr(c/2+u*2,-u,u,20,-180,-270),...fr(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...fr(c/2,h/2,u,20,0,90)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...fr(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...fr(c/2+c*.1,-u,u,20,-180,-270),...fr(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...fr(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=pt.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=jt(d).replace("Z",""),S=y.path(k,x),w=jt(m),v=y.path(w,{...x}),_=s.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>S,":first-child"),_.attr("class","text"),g&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,_),t.intersect=function(A){return ht.polygon(t,m,A)},s}p(Sg,"curlyBraceLeft");function mr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const g=n+u*h,d=e+r*Math.cos(g),m=t+r*Math.sin(g);o.push({x:d,y:m})}return o}p(mr,"generateCirclePoints");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:g}=t,d=[...mr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...mr(c/2,h/2,u,20,0,90)],m=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...mr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...mr(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=pt.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=jt(d).replace("Z",""),S=y.path(k,x),w=jt(m),v=y.path(w,{...x}),_=s.insert("g",":first-child");return _.insert(()=>v,":first-child").attr("stroke-opacity",0),_.insert(()=>S,":first-child"),_.attr("class","text"),g&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,_),t.intersect=function(A){return ht.polygon(t,m,A)},s}p(wg,"curlyBraceRight");function ge(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const g=n+u*h,d=e+r*Math.cos(g),m=t+r*Math.sin(g);o.push({x:-d,y:-m})}return o}p(ge,"generateCirclePoints");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:g}=t,d=[...ge(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...ge(c/2+u*2,-u,u,20,-180,-270),...ge(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...ge(c/2,h/2,u,20,0,90)],m=[...ge(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...ge(-c/2-u/2,-u,u,20,0,90),...ge(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...ge(-c/2+u+u/2,h/2,u,30,-180,-270)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...ge(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...ge(c/2+u*2,-u,u,20,-180,-270),...ge(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...ge(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...ge(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...ge(-c/2-u/2,-u,u,20,0,90),...ge(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...ge(-c/2+u+u/2,h/2,u,30,-180,-270)],x=pt.svg(s),C=dt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=jt(d).replace("Z",""),w=x.path(S,C),_=jt(m).replace("Z",""),A=x.path(_,C),F=jt(y),X=x.path(F,{...C}),N=s.insert("g",":first-child");return N.insert(()=>X,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>A,":first-child"),N.attr("class","text"),g&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,N),t.intersect=function(W){return ht.polygon(t,y,W)},s}p(Bg,"curlyBraces");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),g=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),d=g/2,{cssStyles:m}=t,y=pt.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=u,k=g,S=C-d,w=k/4,v=[{x:S,y:0},{x:w,y:0},{x:0,y:k/2},{x:w,y:k},{x:S,y:k},...ir(-S,-k/2,d,50,270,90)],_=jt(v),A=y.path(_,x),F=c.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(${-u/2}, ${-g/2})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,v,X)},c}p(vg,"curvedTrapezoid");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??20,l=Math.max(a.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(a.height+n*2,t.height?t.height-(2*c-h):0),g=Math.min(l*.177,u*.45),d=u+2*c-h,m=-d/2,y=m+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const F=pt.svg(s),X=dt(t,{}),N=F.path(He(-l/2,y,l,u,g),X),W=F.circle(0,m+c,c*2,X);x.insert(()=>W,":first-child"),x.insert(()=>N,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",g).attr("ry",g).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);Ct(t,x);const k=y+u/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const S=m+c,w=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,A=[...ir(0,-S,c,24,180+w,-w),...ir(-(-l/2+g),-(y+g),g,12,90,0),...ir(-(-l/2+g),-(d/2-g),g,12,360,270),...ir(-(l/2-g),-(d/2-g),g,12,270,180),...ir(-(l/2-g),-(y+g),g,12,180,90)];return t.intersect=function(F){return ht.polygon(t,A,F)},s}p(Lg,"person");var rk=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),ik=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),sk=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),nc=8,lc=8;async function _g(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-o,t.width<lc&&(t.width=lc)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-a-k*3,t.height<nc&&(t.height=nc)}const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=Math.max(t.width??0,c.width)+o,g=u/2,d=g/(2.5+u/50),m=Math.max(t.height??0,c.height)+a+d;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=pt.svg(l),k=ik(0,0,u,m,g,d),S=sk(0,d,u,m,g,d),w=dt(t,{}),v=C.path(k,w),_=C.path(S,dt(t,{fill:"none"}));y=l.insert(()=>_,":first-child"),y=l.insert(()=>v,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=rk(0,0,u,m,g,d);y=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-u/2}, ${-(m/2+d)})`),Ct(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(C){const k=ht.rect(t,C),S=k.x-(t.x??0);if(g!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let w=d*d*(1-S*S/(g*g));w>0&&(w=Math.sqrt(w)),w=d-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},l}p(_g,"cylinder");async function Ri(e,t,r){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await St(e,t,wt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:g,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(g=r.rx,d=r.ry),t.look==="handDrawn"){const y=pt.svg(a),x=dt(t,{}),C=g||d?y.path(He(c,h,n,l,g||0),x):y.rectangle(c,h,n,l,x);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",oe(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",oe(g)).attr("ry",oe(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,x){return ht.rect(y,x)},t.intersect=function(y){return ht.rect(t,y)},a}p(Ri,"drawRect");async function Fg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await Ri(e,t,l);if(t.look==="handDrawn"){const d=pt.svg(c),m=dt(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),c.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,g=(Number(h.attr("height"))||n)??0;return u>0&&g>0&&h.attr("stroke-dasharray",`${u} ${g}`),c}p(Fg,"datastore");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=n.width+s,h=n.height+a,u=h*.2,g=-c/2,d=-h/2-u/2,{cssStyles:m}=t,y=pt.svg(o),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:g,y:d+u},{x:-g,y:d+u},{x:-g,y:-d},{x:g,y:-d},{x:g,y:d},{x:-g,y:d},{x:-g,y:d+u}],k=y.polygon(C.map(w=>[w.x,w.y]),x),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${g+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Ct(t,S),t.intersect=function(w){return ht.rect(t,w)},o}p(Ag,"dividedRectangle");async function Eg(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=xt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const y=pt.svg(n),x=dt(t,{roughness:.2,strokeWidth:2.5}),C=dt(t,{roughness:.2,strokeWidth:1.5}),k=y.circle(0,0,c*2,x),S=y.circle(0,0,h*2,C);u=n.insert("g",":first-child"),u.attr("class",oe(t.cssClasses)).attr("style",oe(g)),(d=u.node())==null||d.appendChild(k),(m=u.node())==null||m.appendChild(S)}else{u=n.insert("g",":first-child");const y=u.insert("circle",":first-child"),x=u.insert("circle");u.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Ct(t,u),t.intersect=function(y){return z.info("DoubleCircle intersect",t,c,y),ht.circle(t,c,y)},n}p(Eg,"doublecircle");function Mg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=xt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=pt.svg(a),{nodeBorder:c}=r,h=dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),g=a.insert(()=>u,":first-child");return g.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),Ct(t,g),t.intersect=function(d){return z.info("filledCircle intersect",t,{radius:o,point:d}),ht.circle(t,o,d)},a}p(Mg,"filledCircle");var hc=10,cc=10;async function Og(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<hc&&(t.height=hc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<cc&&(t.width=cc));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,g=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,m=pt.svg(o),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=jt(g),C=m.path(x,y),k=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,Ct(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return z.info("Triangle intersect",t,g,S),ht.polygon(t,g,S)},o}p(Og,"flippedTriangle");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??12,l=Math.max(a.width+n*2,t.width??0,90),c=a.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),g=u-h,d=Math.max(l*.38,28),m=-u/2,y=[{x:-l/2,y:m},{x:-l/2+d,y:m},{x:-l/2+d,y:m+h},{x:l/2,y:m+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(w=>`L${w.x},${w.y}`),"Z"].join(" "),{cssStyles:C}=t;let k;if(t.look==="handDrawn"){const v=pt.svg(s).path(x,dt(t,{}));k=s.insert(()=>v,":first-child").attr("class","basic label-container"),C&&k.attr("style",C)}else k=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ct(t,k):Ct(t,k,{width:l,height:u});const S=m+h+g/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(w){return ht.polygon(t,y,w)},s}p($g,"folder");function Dg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=xt(t);t.label="";const o=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,g=pt.svg(o),d=dt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=g.rectangle(h,u,l,c,d),y=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ct(t,y);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return ht.rect(t,C)},o}p(Dg,"forkJoin");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,g=u/2,{cssStyles:d}=t,m=pt.svg(l),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:-u/2},{x:h/2-g,y:-u/2},...ir(-h/2+g,0,g,50,90,270),{x:h/2-g,y:u/2},{x:-h/2,y:u/2}],C=jt(x),k=m.path(C,y),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),Ct(t,S),t.intersect=function(w){return z.info("Pill intersect",t,{radius:g,point:w}),ht.polygon(t,x,w)},l}p(Ig,"halfRoundedRectangle");var ak=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const S=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await St(e,t,wt(t)),g=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=g/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,y=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-g/2},{x:m-d,y:-g},{x:d,y:-g},{x:0,y:-g/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=pt.svg(h),S=dt(t,{}),w=ak(0,0,m,g,d),v=k.path(w,S);x=h.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${g/2})`),C&&x.attr("style",C)}else x=hr(h,m,g,y);return i&&x.attr("style",i),t.width=m,t.height=g,Ct(t,x),t.intersect=function(k){return ht.polygon(t,y,k)},h}p(Pg,"hexagon");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await St(e,t,wt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=pt.svg(s),c=dt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=jt(h),g=l.path(u,c),d=s.insert(()=>g,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Ct(t,d),t.intersect=function(m){return z.info("Pill intersect",t,{points:h}),ht.polygon(t,h,m)},s}p(Rg,"hourglass");async function qg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await St(e,t,"icon-shape default"),g=t.pos==="t",d=n,m=n,{nodeBorder:y}=r,{stylesMap:x}=Pi(t),C=-m/2,k=-d/2,S=t.label?8:0,w=pt.svg(c),v=dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const _=w.rectangle(C,k,m,d,v),A=Math.max(m,h.width),F=d+h.height+S,X=w.rectangle(-A/2,-F/2,A,F,{...v,fill:"transparent",stroke:"none"}),N=c.insert(()=>_,":first-child"),W=c.insert(()=>X);if(t.icon){const at=c.append("g");at.html(`<g>${await vs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const j=at.node().getBBox(),E=j.width,O=j.height,L=j.x,R=j.y;at.attr("transform",`translate(${-E/2-L},${g?h.height/2+S/2-O/2-R:-h.height/2-S/2-O/2-R})`),at.attr("style",`color: ${x.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-F/2:F/2-h.height})`),N.attr("transform",`translate(0,${g?h.height/2+S/2:-h.height/2-S/2})`),Ct(t,W),t.intersect=function(at){if(z.info("iconSquare intersect",t,at),!t.label)return ht.rect(t,at);const j=t.x??0,E=t.y??0,O=t.height??0;let L=[];return g?L=[{x:j-h.width/2,y:E-O/2},{x:j+h.width/2,y:E-O/2},{x:j+h.width/2,y:E-O/2+h.height+S},{x:j+m/2,y:E-O/2+h.height+S},{x:j+m/2,y:E+O/2},{x:j-m/2,y:E+O/2},{x:j-m/2,y:E-O/2+h.height+S},{x:j-h.width/2,y:E-O/2+h.height+S}]:L=[{x:j-m/2,y:E-O/2},{x:j+m/2,y:E-O/2},{x:j+m/2,y:E-O/2+d},{x:j+h.width/2,y:E-O/2+d},{x:j+h.width/2/2,y:E+O/2},{x:j-h.width/2,y:E+O/2},{x:j-h.width/2,y:E-O/2+d},{x:j-m/2,y:E-O/2+d}],ht.polygon(t,L,at)},c}p(qg,"icon");async function Ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await St(e,t,"icon-shape default"),g=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Pi(t),k=pt.svg(c),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=C.get("fill");S.stroke=w??x;const v=c.append("g");t.icon&&v.html(`<g>${await vs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=v.node().getBBox(),A=_.width,F=_.height,X=_.x,N=_.y,W=Math.max(A,F)*Math.SQRT2+g*2,at=k.circle(0,0,W,S),j=Math.max(W,h.width),E=W+h.height+d,O=k.rectangle(-j/2,-E/2,j,E,{...S,fill:"transparent",stroke:"none"}),L=c.insert(()=>at,":first-child"),R=c.insert(()=>O);return v.attr("transform",`translate(${-A/2-X},${m?h.height/2+d/2-F/2-N:-h.height/2-d/2-F/2-N})`),v.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-E/2:E/2-h.height})`),L.attr("transform",`translate(0,${m?h.height/2+d/2:-h.height/2-d/2})`),Ct(t,R),t.intersect=function(I){return z.info("iconSquare intersect",t,I),ht.rect(t,I)},c}p(Ng,"iconCircle");async function Wg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:g}=await St(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=Pi(t),S=-y/2,w=-m/2,v=t.label?8:0,_=pt.svg(c),A=dt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=k.get("fill");A.stroke=F??C;const X=_.path(He(S,w,y,m,5),A),N=Math.max(y,h.width),W=m+h.height+v,at=_.rectangle(-N/2,-W/2,N,W,{...A,fill:"transparent",stroke:"none"}),j=c.insert(()=>X,":first-child").attr("class","icon-shape2"),E=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await vs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=O.node().getBBox(),R=L.width,I=L.height,H=L.x,Z=L.y;O.attr("transform",`translate(${-R/2-H},${d?h.height/2+v/2-I/2-Z:-h.height/2-v/2-I/2-Z})`),O.attr("style",`color: ${k.get("stroke")??x};`)}return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-W/2:W/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),Ct(t,E),t.intersect=function(O){if(z.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const L=t.x??0,R=t.y??0,I=t.height??0;let H=[];return d?H=[{x:L-h.width/2,y:R-I/2},{x:L+h.width/2,y:R-I/2},{x:L+h.width/2,y:R-I/2+h.height+v},{x:L+y/2,y:R-I/2+h.height+v},{x:L+y/2,y:R+I/2},{x:L-y/2,y:R+I/2},{x:L-y/2,y:R-I/2+h.height+v},{x:L-h.width/2,y:R-I/2+h.height+v}]:H=[{x:L-y/2,y:R-I/2},{x:L+y/2,y:R-I/2},{x:L+y/2,y:R-I/2+m},{x:L+h.width/2,y:R-I/2+m},{x:L+h.width/2/2,y:R+I/2},{x:L-h.width/2,y:R+I/2},{x:L-h.width/2,y:R-I/2+m},{x:L-y/2,y:R-I/2+m}],ht.polygon(t,H,O)},c}p(Wg,"iconRounded");async function zg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:g}=await St(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=Pi(t),S=-y/2,w=-m/2,v=t.label?8:0,_=pt.svg(c),A=dt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=k.get("fill");A.stroke=F??C;const X=_.path(He(S,w,y,m,.1),A),N=Math.max(y,h.width),W=m+h.height+v,at=_.rectangle(-N/2,-W/2,N,W,{...A,fill:"transparent",stroke:"none"}),j=c.insert(()=>X,":first-child"),E=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await vs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=O.node().getBBox(),R=L.width,I=L.height,H=L.x,Z=L.y;O.attr("transform",`translate(${-R/2-H},${d?h.height/2+v/2-I/2-Z:-h.height/2-v/2-I/2-Z})`),O.attr("style",`color: ${k.get("stroke")??x};`)}return g.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-W/2:W/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+v/2:-h.height/2-v/2})`),Ct(t,E),t.intersect=function(O){if(z.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const L=t.x??0,R=t.y??0,I=t.height??0;let H=[];return d?H=[{x:L-h.width/2,y:R-I/2},{x:L+h.width/2,y:R-I/2},{x:L+h.width/2,y:R-I/2+h.height+v},{x:L+y/2,y:R-I/2+h.height+v},{x:L+y/2,y:R+I/2},{x:L-y/2,y:R+I/2},{x:L-y/2,y:R-I/2+h.height+v},{x:L-h.width/2,y:R-I/2+h.height+v}]:H=[{x:L-y/2,y:R-I/2},{x:L+y/2,y:R-I/2},{x:L+y/2,y:R-I/2+m},{x:L+h.width/2,y:R-I/2+m},{x:L+h.width/2/2,y:R+I/2},{x:L-h.width/2,y:R+I/2},{x:L-h.width/2,y:R-I/2+m},{x:L-y/2,y:R-I/2+m}],ht.polygon(t,H,O)},c}p(zg,"iconSquare");async function Hg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=xt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:g,label:d}=await St(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,x=-h/2,C=t.label?8:0,k=pt.svg(u),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=k.rectangle(y,x,c,h,S),v=Math.max(c,g.width),_=h+g.height+C,A=k.rectangle(-v/2,-_/2,v,_,{...S,fill:"none",stroke:"none"}),F=u.insert(()=>w,":first-child"),X=u.insert(()=>A);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${m?_/2-h:-_/2})`)}return d.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${m?-h/2-g.height/2-C/2:h/2-g.height/2+C/2})`),F.attr("transform",`translate(0,${m?g.height/2+C/2:-g.height/2-C/2})`),Ct(t,X),t.intersect=function(N){if(z.info("iconSquare intersect",t,N),!t.label)return ht.rect(t,N);const W=t.x??0,at=t.y??0,j=t.height??0;let E=[];return m?E=[{x:W-g.width/2,y:at-j/2},{x:W+g.width/2,y:at-j/2},{x:W+g.width/2,y:at-j/2+g.height+C},{x:W+c/2,y:at-j/2+g.height+C},{x:W+c/2,y:at+j/2},{x:W-c/2,y:at+j/2},{x:W-c/2,y:at-j/2+g.height+C},{x:W-g.width/2,y:at-j/2+g.height+C}]:E=[{x:W-c/2,y:at-j/2},{x:W+c/2,y:at-j/2},{x:W+c/2,y:at-j/2+h},{x:W+g.width/2,y:at-j/2+h},{x:W+g.width/2/2,y:at+j/2},{x:W-g.width/2,y:at+j/2},{x:W-g.width/2,y:at-j/2+h},{x:W-c/2,y:at-j/2+h}],ht.polygon(t,E,N)},u}p(Hg,"imageSquare");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+o*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let g;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&g.attr("style",d)}else g=hr(n,h,c,u);return i&&g.attr("style",i),t.width=h,t.height=c,Ct(t,g),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(jg,"inv_trapezoid");async function Yg(e,t){const{shapeSvg:r,bbox:i,label:s}=await St(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ct(t,a),t.intersect=function(l){return ht.rect(t,l)},r}p(Yg,"labelRect");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let g;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&g.attr("style",d)}else g=hr(n,h,c,u);return i&&g.attr("style",i),t.width=h,t.height=c,Ct(t,g),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(Ug,"lean_left");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let g;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&g.attr("style",d)}else g=hr(n,h,c,u);return i&&g.attr("style",i),t.width=h,t.height=c,Ct(t,g),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(Gg,"lean_right");function Xg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=pt.svg(s),u=dt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const g=jt(c),d=h.path(g,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),Ct(t,m),t.intersect=function(y){return z.info("lightningBolt intersect",t,y),ht.polygon(t,c,y)},s}p(Xg,"lightningBolt");var ok=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),nk=p((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lk=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),uc=10,dc=10;async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<dc&&(t.width=dc);const S=C/2/(2.5+C/50);t.height=(t.height??0)-o-S*3,t.height<uc&&(t.height=uc)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,g=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+g+o*2,m=d*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=pt.svg(n),k=nk(0,0,h,d,u,g,m),S=lk(0,g,h,d,u,g),w=dt(t,{}),v=C.path(k,w),_=C.path(S,w);n.insert(()=>_,":first-child").attr("class","line"),y=n.insert(()=>v,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=ok(0,0,h,d,u,g,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-h/2}, ${-(d/2+g)})`),Ct(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+g-(l.y-(l.top??0))})`),t.intersect=function(C){const k=ht.rect(t,C),S=k.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-g)){let w=g*g*(1-S*S/(u*u));w>0&&(w=Math.sqrt(w)),w=g-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},n}p(Vg,"linedCylinder");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,g=t.look==="neo"?u/4:u/8,d=u+g,{cssStyles:m}=t,y=pt.svg(n),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...$r(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,g,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],k=y.polygon(C.map(w=>[w.x,w.y]),x),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-g/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-g/2-(l.y-(l.top??0))})`),Ct(t,S),t.intersect=function(w){return ht.polygon(t,C,w)},n}p(Zg,"linedWaveEdgedRect");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,d=u-2*n,m=g-2*n,y=-d/2,x=-m/2,{cssStyles:C}=t,k=pt.svg(l),S=dt(t,{}),w=[{x:y-n,y:x+n},{x:y-n,y:x+m+n},{x:y+d-n,y:x+m+n},{x:y+d-n,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x+m-n},{x:y+d+n,y:x+m-n},{x:y+d+n,y:x-n},{x:y+n,y:x-n},{x:y+n,y:x},{x:y,y:x},{x:y,y:x+n}],v=[{x:y,y:x+n},{x:y+d-n,y:x+n},{x:y+d-n,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=jt(w);let A=k.path(_,S);const F=jt(v);let X=k.path(F,S);t.look!=="handDrawn"&&(A=fn(A),X=fn(X));const N=l.insert("g",":first-child");return N.insert(()=>A),N.insert(()=>X),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),Ct(t,N),t.intersect=function(W){return ht.polygon(t,w,W)},l}p(Kg,"multiRect");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,g=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?g/4:g/8,m=g+(h?d/2:-d/2),y=-u/2,x=-m/2,C=10,{cssStyles:k}=t,S=$r(y-C,x+m+C,y+u-C,x+m+C,d,.8),w=S==null?void 0:S[S.length-1],v=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...S,{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:w.y-2*C},{x:y+u+C,y:w.y-2*C},{x:y+u+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],_=[{x:y,y:x+C},{x:y+u-C,y:x+C},{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:x},{x:y,y:x}],A=pt.svg(s),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const X=jt(v),N=A.path(X,F),W=jt(_),at=A.path(W,F),j=s.insert(()=>N,":first-child");return j.insert(()=>at),j.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),Ct(t,j),t.intersect=function(E){return ht.polygon(t,v,E)},s}p(Qg,"multiWaveEdgedRectangle");async function Jg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i,t.useHtmlLabels||be(te())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,g=-h/2,{cssStyles:d}=t,m=pt.svg(o),y=dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(u,g,c,h,y),C=o.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,C),t.intersect=function(k){return ht.rect(t,k)},o}p(Jg,"note");var hk=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 tp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await St(e,t,wt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const d=pt.svg(s),m=dt(t,{}),y=hk(0,0,l),x=d.path(y,m);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),g&&u.attr("style",g)}else u=hr(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Ct(t,u),t.calcIntersect=function(d,m){const y=d.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=ht.polygon(d,x,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}p(tp,"question");async function ep(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?o*2:o),t.height??0),g=u/4,m=-Math.max(h,(t.width??0)-g)/2,y=-u/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=pt.svg(n),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=jt(C),_=S.path(v,w),A=n.insert(()=>_,":first-child");return A.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,A),t.intersect=function(F){return ht.polygon(t,C,F)},n}p(ep,"rect_left_inv_arrow");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Fr(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(be(Wt())){const F=h.children[0],X=It(h);u=F.getBoundingClientRect(),X.attr("width",u.width),X.attr("height",u.height)}z.info("Text 2",l);const g=l||[],d=h.getBBox(),m=await Fr(n,Array.isArray(g)?g.join("<br/>"):g,t.labelStyle,!0,!0),y=m.children[0],x=It(m);u=y.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;It(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),It(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-C+3)+")");const k=u.width+(t.padding||0),S=u.height+(t.padding||0),w=-u.width/2-C,v=-u.height/2-C;let _,A;if(t.look==="handDrawn"){const F=pt.svg(a),X=dt(t,{}),N=F.path(He(w,v,k,S,t.rx||0),X),W=F.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,X);A=a.insert(()=>(z.debug("Rough node insert CXC",N),W),":first-child"),_=a.insert(()=>(z.debug("Rough node insert CXC",N),N),":first-child")}else _=o.insert("rect",":first-child"),A=o.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),A.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return Ct(t,_),t.intersect=function(F){return ht.rect(t,F)},a}p(rp,"rectWithTitle");async function ip(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ri(e,t,s)}p(ip,"roundedRect");var Pr=8;async function sp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Pr:Pr*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-Pr,g=h,d=Pr-c/2,m=-h/2,{cssStyles:y}=t,x=pt.svg(o),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+g},{x:d-Pr,y:m+g},{x:d-Pr,y:m},{x:d,y:m},{x:d,y:m+g}],S=x.polygon(k.map(v=>[v.x,v.y]),C),w=o.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path").attr("style",oe(y)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${Pr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,w),t.intersect=function(v){return ht.rect(t,v)},o}p(sp,"shadedProcess");async function ap(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,g=h,d=u/1.5,m=-g/2,y=-d/2,{cssStyles:x}=t,C=pt.svg(n),k=dt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+d},{x:m+g,y:y+d},{x:m+g,y:y-d/2}],w=jt(S),v=C.path(w,k),_=n.insert(()=>v,":first-child");return _.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-g/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Ct(t,_),t.intersect=function(A){return ht.polygon(t,S,A)},n}p(ap,"slopedRect");async function op(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Ri(e,t,a)}p(op,"squareRect");async function np(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:g}=t,d=pt.svg(n),m=dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...ir(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...ir(h/2-u,0,u,50,270,450)],x=jt(y),C=d.path(x,m),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ct(t,k),t.intersect=function(S){return ht.polygon(t,y,S)},n}p(np,"stadium");async function lp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ri(e,t,r)}p(lp,"state");function hp(e,t,{config:{themeVariables:r}}){var k,S;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=pt.svg(h),g=dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const d=u.circle(0,0,t.width,{...g,stroke:o,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,x=u.circle(0,0,y,{...g,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>d,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((S=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:S.id)??"",v=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${v})`)}return Ct(t,C),t.intersect=function(w){return ht.circle(t,(t.width??0)/2,w)},h}p(hp,"stateEnd");function cp(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=pt.svg(a).circle(0,0,t.width,h0(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return Ct(t,o),t.intersect=function(c){return ht.circle(t,(t.width??7)/2,c)},a}p(cp,"stateStart");var ni=8;async function up(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.width+2*ni+a,t.width??0),h=Math.max(l.height+o,t.height??0),u=c-2*ni,g=h,d=-c/2,m=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){const x=pt.svg(n),C=dt(t,{}),k=x.rectangle(d,m,u+16,g,C),S=x.line(d+ni,m,d+ni,m+g,C),w=x.line(d+ni+u,m,d+ni+u,m+g,C);n.insert(()=>S,":first-child"),n.insert(()=>w,":first-child");const v=n.insert(()=>k,":first-child"),{cssStyles:_}=t;v.attr("class","basic label-container").attr("style",oe(_)),Ct(t,v)}else{const x=hr(n,u,g,y);i&&x.attr("style",i),Ct(t,x)}return t.intersect=function(x){return ht.polygon(t,y,x)},n}p(up,"subroutine");var yo=.2;async function dp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-yo*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=yo*c,u=yo*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,m=c,y=-d/2,x=-m/2,{cssStyles:C}=t,k=pt.svg(n),S=dt(t,{}),w=[{x:y-h/2,y:x},{x:y+d+h/2,y:x},{x:y+d+h/2,y:x+m},{x:y-h/2,y:x+m}],v=[{x:y+d-h/2,y:x+m},{x:y+d+h/2,y:x+m},{x:y+d+h/2,y:x+m-u}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=jt(w),A=k.path(_,S),F=jt(v),X=k.path(F,{...S,fillStyle:"solid"}),N=n.insert(()=>X,":first-child");return N.insert(()=>A,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),Ct(t,N),t.intersect=function(W){return ht.polygon(t,w,W)},n}p(dp,"taggedRect");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,g=l+c,{cssStyles:d}=t,m=pt.svg(s),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:g/2},...$r(-n/2-n/2*.1,g/2,n/2+n/2*.1,g/2,c,.8),{x:n/2+n/2*.1,y:-g/2},{x:-n/2-n/2*.1,y:-g/2}],C=-n/2+n/2*.1,k=-g/2-u*.4,S=[{x:C+n-h,y:(k+l)*1.3},{x:C+n,y:k+l-u},{x:C+n,y:(k+l)*.9},...$r(C+n,(k+l)*1.25,C+n-h,(k+l)*1.3,-l*.02,.5)],w=jt(x),v=m.path(w,y),_=jt(S),A=m.path(_,{...y,fillStyle:"solid"}),F=s.insert(()=>A,":first-child");return F.insert(()=>v,":first-child"),F.attr("class","basic label-container outer-path"),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)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,x,X)},s}p(gp,"taggedWaveEdgedRectangle");async function pp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await St(e,t,wt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),Ct(t,h),t.intersect=function(u){return ht.rect(t,u)},s}p(pp,"text");var ck=p((e,t,r,i,s,a)=>`M${e},${t}
202
+ a${s},${a} 0,0,1 0,${-i}
203
+ l${r},0
204
+ a${s},${a} 0,0,1 0,${i}
205
+ M${r},${-i}
206
+ a${s},${a} 0,0,0 0,${i}
207
+ l${-r},0`,"createCylinderPathD"),uk=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dk=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),gc=5,pc=10;async function fp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,o=t.height??0;if(t.height&&(t.height=t.height-a,t.height<gc&&(t.height=gc)),t.width){const C=o/2/(2.5+o/50);t.width=t.width-a-C*3,t.width<pc&&(t.width=pc)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=Math.max(t.height??0,l.height)+a,u=h/2,g=u/(2.5+h/50),d=Math.max(t.width??0,l.width)+g+a,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=pt.svg(n),C=uk(0,0,d,h,g,u),k=dk(0,0,d,h,g,u),S=x.path(C,dt(t,{})),w=x.path(k,dt(t,{fill:"none"}));y=n.insert(()=>w,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=ck(0,0,d,h,g,u);y=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",oe(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",g),y.attr("transform",`translate(${-d/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-g-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,y),t.intersect=function(x){const C=ht.rect(t,x),k=C.y-(t.y??0);if(u!=0&&(Math.abs(k)<(t.height??0)/2||Math.abs(k)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-g)){let S=g*g*(1-k*k/(u*u));S!=0&&(S=Math.sqrt(Math.abs(S))),S=g-S,x.x-(t.x??0)>0&&(S=-S),C.x+=S}return C},n}p(fp,"tiltedCylinder");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let g;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=pt.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&g.attr("style",d)}else g=hr(n,h,c,u);return i&&g.attr("style",i),t.width=h,t.height=c,Ct(t,g),t.intersect=function(m){return ht.polygon(t,u,m)},n}p(mp,"trapezoid");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<l&&(t.height=l),t.width=(t.width??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2,g=(t!=null&&t.height?t==null?void 0:t.height:h.height)+o*2,{cssStyles:d}=t,m=pt.svg(c),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-u/2*.8,y:-g/2},{x:u/2*.8,y:-g/2},{x:u/2,y:-g/2*.6},{x:u/2,y:g/2},{x:-u/2,y:g/2},{x:-u/2,y:-g/2*.6}],C=jt(x),k=m.path(C,y),S=c.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),Ct(t,S),t.intersect=function(w){return ht.polygon(t,x,w)},c}p(yp,"trapezoidalPentagon");var fc=10,mc=10;async function Cp(e,t){var w;const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<mc&&(t.width=mc),t.height=(t==null?void 0:t.height)??0,t.height<fc&&(t.height=fc));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=lr((w=Wt().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+a,u=t!=null&&t.height?t==null?void 0:t.height:h+n.height,g=u,d=[{x:0,y:0},{x:g,y:0},{x:g/2,y:-u}],{cssStyles:m}=t,y=pt.svg(o),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=jt(d),k=y.path(C,x),S=o.insert(()=>k,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=u,Ct(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(v){return z.info("Triangle intersect",t,d,v),ht.polygon(t,d,v)},o}p(Cp,"triangle");async function xp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(o??0)*2,d=t.look==="neo"?g/4:g/8,m=g+(n?d:-d),{cssStyles:y}=t,C=14-u,k=C>0?C/2:0,S=pt.svg(l),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=[{x:-u/2-k,y:m/2},...$r(-u/2-k,m/2,u/2+k,m/2,d,.8),{x:u/2+k,y:-m/2},{x:-u/2-k,y:-m/2}],_=jt(v),A=S.path(_,w),F=l.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))},${-g/2+(t.padding??0)-d-(c.y-(c.top??0))})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,v,X)},l}p(xp,"waveEdgedRectangle");async function bp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o,u=h/8,g=h+u*2,{cssStyles:d}=t,m=pt.svg(n),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-c/2,y:g/2},...$r(-c/2,g/2,c/2,g/2,u,1),{x:c/2,y:-g/2},...$r(c/2,-g/2,-c/2,-g/2,u,-1)],C=jt(x),k=m.path(C,y),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),Ct(t,S),t.intersect=function(w){return ht.polygon(t,x,w)},n}p(bp,"waveRectangle");var re=10;async function kp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-re,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-re,10));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+re,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+a*2+re,u=c-re,g=h-re,d=-u/2,m=-g/2,{cssStyles:y}=t,x=pt.svg(o),C=dt(t,{}),k=[{x:d-re,y:m-re},{x:d-re,y:m+g},{x:d+u,y:m+g},{x:d+u,y:m-re}],S=`M${d-re},${m-re} L${d+u},${m-re} L${d+u},${m+g} L${d-re},${m+g} L${d-re},${m-re}
208
+ M${d-re},${m} L${d+u},${m}
209
+ M${d},${m-re} L${d},${m+g}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=x.path(S,C),v=o.insert(()=>w,":first-child");return v.attr("transform",`translate(${re/2}, ${re/2})`),v.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+re/2-(n.x-(n.left??0))}, ${-(n.height/2)+re/2-(n.y-(n.top??0))})`),Ct(t,v),t.intersect=function(_){return ht.polygon(t,k,_)},o}p(kp,"windowPane");var yc=new Set(["redux-color","redux-dark-color"]),gk=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function hl(e,t){var Et,_t,qt,Lt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=te(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:lt}=te(),{background:ft}=lt,At={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ft}`]};await hl(e,At)}const c=te();t.useHtmlLabels=c.htmlLabels;let h=((Et=c.er)==null?void 0:Et.diagramPadding)??10,u=((_t=c.er)==null?void 0:_t.entityPadding)??6;const{cssStyles:g}=t,{labelStyles:d,nodeStyles:m}=xt(t);if(r.attributes.length===0&&t.label){const lt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};br(t.label,c)+lt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const ft=await Ri(e,t,lt);if(i!=null&&yc.has(i)){const At=r.colorIndex??0;ft.attr("data-color-id",`color-${At%l.length}`)}if(!lr(c.htmlLabels)){const At=ft.select("text"),Rt=(qt=At.node())==null?void 0:qt.getBBox();At.attr("transform",`translate(${-Rt.width/2}, 0)`)}return ft}c.htmlLabels||(h*=1.25,u*=1.25);let y=wt(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await hi(x,t.label??"",c,0,0,["name"],d);C.height+=u;let k=0;const S=[],w=[];let v=0,_=0,A=0,F=0,X=!0,N=!0;for(const lt of r.attributes){const ft=await hi(x,lt.type,c,0,k,["attribute-type"],d);v=Math.max(v,ft.width+h);const At=await hi(x,lt.name,c,0,k,["attribute-name"],d);_=Math.max(_,At.width+h);const Rt=await hi(x,lt.keys.join(),c,0,k,["attribute-keys"],d);A=Math.max(A,Rt.width+h);const Ut=await hi(x,lt.comment,c,0,k,["attribute-comment"],d);F=Math.max(F,Ut.width+h);const D=Math.max(ft.height,At.height,Rt.height,Ut.height)+u;w.push({yOffset:k,rowHeight:D}),k+=D}let W=4;A<=h&&(X=!1,A=0,W--),F<=h&&(N=!1,F=0,W--);const at=x.node().getBBox();if(C.width+h*2-(v+_+A+F)>0){const lt=C.width+h*2-(v+_+A+F);v+=lt/W,_+=lt/W,A>0&&(A+=lt/W),F>0&&(F+=lt/W)}const j=v+_+A+F,E=pt.svg(x),O=dt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let L=0;w.length>0&&(L=w.reduce((lt,ft)=>lt+((ft==null?void 0:ft.rowHeight)??0),0));const R=Math.max(at.width+h*2,(t==null?void 0:t.width)||0,j),I=Math.max((L??0)+C.height,(t==null?void 0:t.height)||0),H=-R/2,Z=-I/2;if(x.selectAll("g:not(:first-child)").each((lt,ft,At)=>{const Rt=It(At[ft]),Ut=Rt.attr("transform");let D=0,Ft=0;if(Ut){const we=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ut);we&&(D=parseFloat(we[1]),Ft=parseFloat(we[2]),Rt.attr("class").includes("attribute-name")?D+=v:Rt.attr("class").includes("attribute-keys")?D+=v+_:Rt.attr("class").includes("attribute-comment")&&(D+=v+_+A))}Rt.attr("transform",`translate(${H+h/2+D}, ${Ft+Z+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(Z+u/2)+")"),i!=null&&yc.has(i)){const lt=r.colorIndex??0;x.attr("data-color-id",`color-${lt%l.length}`)}const ut=E.rectangle(H,Z,R,I,O),gt=x.insert(()=>ut,":first-child").attr("class","outer-path").attr("style",g.join(""));S.push(0);for(const[lt,ft]of w.entries()){const Rt=(lt+1)%2===0&&ft.yOffset!==0,Ut=E.rectangle(H,C.height+Z+(ft==null?void 0:ft.yOffset),R,ft==null?void 0:ft.rowHeight,{...O,fill:Rt?a:o,stroke:n});x.insert(()=>Ut,"g.label").attr("style",g.join("")).attr("class",`row-rect-${Rt?"even":"odd"}`)}const bt=1e-4;let Tt=ci(H,C.height+Z,R+H,C.height+Z,bt),nt=E.polygon(Tt.map(lt=>[lt.x,lt.y]),O);if(x.insert(()=>nt).attr("class","divider"),Tt=ci(v+H,C.height+Z,v+H,I+Z,bt),nt=E.polygon(Tt.map(lt=>[lt.x,lt.y]),O),x.insert(()=>nt).attr("class","divider"),X){const lt=v+_+H;Tt=ci(lt,C.height+Z,lt,I+Z,bt),nt=E.polygon(Tt.map(ft=>[ft.x,ft.y]),O),x.insert(()=>nt).attr("class","divider")}if(N){const lt=v+_+A+H;Tt=ci(lt,C.height+Z,lt,I+Z,bt),nt=E.polygon(Tt.map(ft=>[ft.x,ft.y]),O),x.insert(()=>nt).attr("class","divider")}for(const lt of S){const ft=C.height+Z+lt;Tt=ci(H,ft,R+H,ft,bt),nt=E.polygon(Tt.map(At=>[At.x,At.y]),O),x.insert(()=>nt).attr("class","divider")}if(Ct(t,gt),m&&t.look!=="handDrawn")if(i!=null&&gk.has(i))x.selectAll("path").attr("style",m);else{const lt=m.split(";"),ft=(Lt=lt==null?void 0:lt.filter(At=>At.includes("stroke")))==null?void 0:Lt.map(At=>`${At}`).join("; ");x.selectAll("path").attr("style",ft??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(lt){return ht.rect(t,lt)},x}p(hl,"erBox");async function hi(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Bh(t)&&(t=Bh(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Ve(n,t,{width:br(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(lr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=It(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(hi,"addText");function ci(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(ci,"lineToPolygon");async function Tp(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",wt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,g=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await as(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await as(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();g=m.height,c=o.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await as(c,k,y,[k.parseClassifier()]);y+=S+a}d=c.node().getBBox().height,d<=0&&(d=s/2),h=o.insert("g").attr("class","methods-group text");let x=0;for(const k of t.methods){const S=await as(h,k,x,[k.parseClassifier()]);x+=S+a}let C=o.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+g+s*2})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+g+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}p(Tp,"textHelper");async function as(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=te();let o="useHtmlLabels"in t?t.useHtmlLabels:lr(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),ms(n)&&(o=!0);const l=await Ve(s,In(Mr(n)),{width:br(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],g=It(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await al(u),c=u.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}else{i.includes("font-weight: bolder")&&It(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(as,"addText");async function Sp(e,t){var E,O;const r=Wt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??lr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Tp(e,t,r,n,o),{labelStyles:u,nodeStyles:g}=xt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((E=l.styles)==null?void 0:E.join(";"))||g||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((O=r.class)!=null&&O.hideEmptyMembersBox),y=pt.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=o:l.members.length>0&&l.methods.length===0&&(k+=o*2);const w=-C/2,v=-k/2;let _=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;S&&(_=a*2);const A=y.rectangle(w-a,v-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,k+2*a+_,x),F=c.insert(()=>A,":first-child");F.attr("class","basic label-container outer-path");const X=F.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,W=c.select(".label-group").node().getBBox().height-(m?a/2:0)||0,at=c.select(".members-group").node().getBBox().height-(m?a/2:0)||0,j=(N+W+v+a-(v-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((L,R,I)=>{var Tt,nt;const H=It(I[R]),Z=H.attr("transform");let ut=0;if(Z){const _t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Z);_t&&(ut=parseFloat(_t[2]))}let gt=ut+v+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(H.attr("class").includes("methods-group")){const Et=Math.max(at,o/2);S?gt=Math.max(j,N+W+Et+v+o*2+a)+o*2:gt=N+W+Et+v+o*4+a}l.members.length===0&&l.methods.length===0&&((Tt=r.class)!=null&&Tt.hideEmptyMembersBox)&&(l.annotations.length>0?gt=ut-o:gt=ut),n||(gt-=4);let bt=w;(H.attr("class").includes("label-group")||H.attr("class").includes("annotation-group"))&&(bt=-((nt=H.node())==null?void 0:nt.getBBox().width)/2||0,c.selectAll("text").each(function(Et,_t,qt){window.getComputedStyle(qt[_t]).textAnchor==="middle"&&(bt=0)})),H.attr("transform",`translate(${bt}, ${gt})`)}),l.members.length>0||l.methods.length>0||m){const L=N+W+v+a,R=y.line(X.x,L,X.x+X.width,L+.001,x);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const L=N+W+at+v+o*2+a,R=y.line(X.x,S?Math.max(j,L):L,X.x+X.width,(S?Math.max(j,L):L)+.001,x);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),F.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const L=RegExp(/color\s*:\s*([^;]*)/),R=L.exec(d);if(R){const I=R[0].replace("color","fill");c.selectAll("tspan").attr("style",I)}else if(u){const I=L.exec(u);if(I){const H=I[0].replace("color","fill");c.selectAll("tspan").attr("style",H)}}}return Ct(t,F),t.intersect=function(L){return ht.rect(t,L)},c}p(Sp,"classBox");async function wp(e,t){var W,at;const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=wt(t),h=Wt(),{themeVariables:u}=h,{borderColorArray:g,requirementEdgeLabelBackground:d}=u,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await tr(y,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):x=await tr(y,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let C=x;const k=await tr(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+n,l){const j=await tr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=j;const E=await tr(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=E;const O=await tr(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=O,await tr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const j=await tr(y,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,m);C+=j,await tr(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,m)}const S=(((W=y.node())==null?void 0:W.getBBox().width)??200)+o,w=(((at=y.node())==null?void 0:at.getBBox().height)??200)+o,v=-S/2,_=-w/2,A=pt.svg(y),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const X=A.rectangle(v,_,S,w,F),N=y.insert(()=>X,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",i),g!=null&&g.length){const j=t.colorIndex??0;y.attr("data-color-id",`color-${j%g.length}`)}if(y.selectAll(".label").each((j,E,O)=>{const L=It(O[E]),R=L.attr("transform");let I=0,H=0;if(R){const bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);bt&&(I=parseFloat(bt[1]),H=parseFloat(bt[2]))}const Z=H-w/2;let ut=v+o/2;(E===0||E===1)&&(ut=I),L.attr("transform",`translate(${ut}, ${Z+o})`)}),C>x+k+n){const j=_+x+k+n;let E;if(t.look==="neo"){const R=[[v,j],[v+S,j],[v+S,j+.001],[v,j+.001]];E=A.polygon(R,F)}else E=A.line(v,j,v+S,j,F);y.insert(()=>E).attr("class","divider")}return Ct(t,N),t.intersect=function(j){return ht.rect(t,j)},i&&t.look!=="handDrawn"&&(d||g!=null&&g.length)&&y.selectAll("path").attr("style",i),y}p(wp,"requirementBox");async function tr(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=Wt(),n=o.htmlLabels??!0,l=await Ve(a,In(Mr(t)),{width:br(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let c;if(n){const h=l.children[0],u=It(l);s==="start"&&It(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}p(tr,"addText");var pk=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Bp(e,t,{config:r}){var at,j;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=t.padding||10;let u="",g;"ticket"in t&&t.ticket&&((at=r==null?void 0:r.kanban)!=null&&at.ticketBaseUrl)&&(u=(j=r==null?void 0:r.kanban)==null?void 0:j.ticketBaseUrl.replace("#TICKET#",t.ticket),g=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;g?{label:m,bbox:y}=await fo(g,"ticket"in t&&t.ticket||"",d):{label:m,bbox:y}=await fo(n,"ticket"in t&&t.ticket||"",d);const{label:x,bbox:C}=await fo(n,"assigned"in t&&t.assigned||"",d);t.width=o;const k=10,S=(t==null?void 0:t.width)||0,w=Math.max(y.height,C.height)/2,v=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+w,_=-S/2,A=-v/2;c.attr("transform","translate("+(h-S/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-w+l.height/2)+")"),x.attr("transform","translate("+(h+S/2-C.width-2*a)+", "+(-w+l.height/2)+")");let F;const{rx:X,ry:N}=t,{cssStyles:W}=t;if(t.look==="handDrawn"){const E=pt.svg(n),O=dt(t,{}),L=X||N?E.path(He(_,A,S,v,X||0),O):E.rectangle(_,A,S,v,O);F=n.insert(()=>L,":first-child"),F.attr("class","basic label-container").attr("style",W||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",X??5).attr("ry",N??5).attr("x",_).attr("y",A).attr("width",S).attr("height",v);const E="priority"in t&&t.priority;if(E){const O=n.append("line"),L=_+2,R=A+Math.floor((X??0)/2),I=A+v-Math.floor((X??0)/2);O.attr("x1",L).attr("y1",R).attr("x2",L).attr("y2",I).attr("stroke-width","4").attr("stroke",pk(E))}}return Ct(t,F),t.height=v,t.intersect=function(E){return ht.rect(t,E)},n}p(Bp,"kanbanItem");async function vp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,g=a.width+20,d=a.height+20,m=Math.max(l,g),y=Math.max(c,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
210
+ a${h},${h} 1 0,0 ${m*.25},${-1*y*.1}
211
+ a${h},${h} 1 0,0 ${m*.25},0
212
+ a${h},${h} 1 0,0 ${m*.25},0
213
+ a${h},${h} 1 0,0 ${m*.25},${y*.1}
214
+
215
+ a${h},${h} 1 0,0 ${m*.15},${y*.33}
216
+ a${h*.8},${h*.8} 1 0,0 0,${y*.34}
217
+ a${h},${h} 1 0,0 ${-1*m*.15},${y*.33}
218
+
219
+ a${h},${h} 1 0,0 ${-1*m*.25},${y*.15}
220
+ a${h},${h} 1 0,0 ${-1*m*.25},0
221
+ a${h},${h} 1 0,0 ${-1*m*.25},0
222
+ a${h},${h} 1 0,0 ${-1*m*.25},${-1*y*.15}
223
+
224
+ a${h},${h} 1 0,0 ${-1*m*.1},${-1*y*.33}
225
+ a${h*.8},${h*.8} 1 0,0 0,${-1*y*.34}
226
+ a${h},${h} 1 0,0 ${m*.1},${-1*y*.33}
227
+ H0 V0 Z`;if(t.look==="handDrawn"){const k=pt.svg(s),S=dt(t,{}),w=k.path(C,S);x=s.insert(()=>w,":first-child"),x.attr("class","basic label-container").attr("style",oe(u))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),Ct(t,x),t.calcIntersect=function(k,S){return ht.rect(k,S)},t.intersect=function(k){return z.info("Bang intersect",t,k),ht.rect(t,k)},s}p(vp,"bang");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+2*o,c=a.height+2*o,h=.15*l,u=.25*l,g=.35*l,d=.2*l,{cssStyles:m}=t;let y;const x=`M0 0
228
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
229
+ a${g},${g} 1 0,1 ${l*.4},${-1*l*.1}
230
+ a${u},${u} 1 0,1 ${l*.35},${l*.2}
231
+
232
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
233
+ a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
234
+
235
+ a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
236
+ a${g},${g} 1 0,1 ${-1*l*.5},0
237
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
238
+
239
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
240
+ a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
241
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=pt.svg(s),k=dt(t,{}),S=C.path(x,k);y=s.insert(()=>S,":first-child"),y.attr("class","basic label-container").attr("style",oe(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-l/2}, ${-c/2})`),Ct(t,y),t.calcIntersect=function(C,k){return ht.rect(C,k)},t.intersect=function(C){return z.info("Cloud intersect",t,C),ht.rect(t,C)},s}p(Lp,"cloud");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+8*o,c=a.height+2*o,h=5,u=t.look==="neo"?`
242
+ M${-l/2} ${c/2-h}
243
+ v${-c+2*h}
244
+ q0,-${h} ${h},-${h}
245
+ h${l-2*h}
246
+ q${h},0 ${h},${h}
247
+ v${c-h}
248
+ H${-l/2}
249
+ Z
250
+ `:`
251
+ M${-l/2} ${c/2-h}
252
+ v${-c+2*h}
253
+ q0,-${h} ${h},-${h}
254
+ h${l-2*h}
255
+ q${h},0 ${h},${h}
256
+ v${c-2*h}
257
+ q0,${h} ${-h},${h}
258
+ h${-(l-2*h)}
259
+ q${-h},0 ${-h},${-h}
260
+ Z
261
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),Ct(t,g),t.calcIntersect=function(d,m){return ht.rect(d,m)},t.intersect=function(d){return ht.rect(t,d)},s}p(_p,"defaultMindmapNode");async function Fp(e,t){const r={padding:t.padding??0};return ll(e,t,r)}p(Fp,"mindmapCircle");var fk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:op},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ip},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:np},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:up},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:_g},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Fg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:$g},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:gg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:bg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:mg},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Lg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:ll},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:vp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Lp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Pg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Gg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ug},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:mp},{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:jg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Eg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:pp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:yg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:sp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:cp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:hp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Dg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Rg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Sg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:wg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Bg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Xg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:xp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ig},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:fp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Vg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:vg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ag},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Cp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:kp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Mg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:yp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Og},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ap},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Qg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Kg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:dg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Tg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:gp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:dp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:bp},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ep},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Zg}],mk=p(()=>{const t=[...Object.entries({state:lp,choice:Cg,note:Jg,composite:xg,rectWithTitle:rp,labelRect:Yg,block_arrow:fg,collapsedGroup:pg,iconSquare:zg,iconCircle:Ng,icon:qg,iconRounded:Wg,imageSquare:Hg,anchor:cg,kanbanItem:Bp,mindmapCircle:Fp,defaultMindmapNode:_p,classBox:Sp,erBox:hl,requirementBox:wp}),...fk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Ap=mk();function yk(e){return e in Ap}p(yk,"isValidShape");var Ma=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Oa=new Map;async function cl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Ap[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",oe(t.look)),t.tooltip&&s.attr("title",t.tooltip),Oa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(cl,"insertNode");var n_=p((e,t)=>{Oa.set(t.id,e)},"setNodeElem"),Ck=p(()=>{Oa.clear()},"clear"),Cc=p(e=>{const t=Oa.get(e.id);z.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"),xk=p(async(e,t)=>{const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=xt(t),g=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=lr(r.flowchart.htmlLabels),m=t.direction==="LR",y=g.insert("g").attr("class","cluster-label swimlane-label"),x=await Ve(y,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=x.getBBox();if(d){const j=x.children[0],E=It(x);C=j.getBoundingClientRect(),E.attr("width",C.width),E.attr("height",C.height)}const k=t.padding??0,S=t.width<=C.width+k?C.width+k:t.width;t.width<=C.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const w=t.height,v=t.y-w/2,_=t.y+w/2,A=t.x-S/2,F=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:v+w/3,X=m?4:0,N=C.height+2*X;let W,at;if(m){const j=Math.max(N,C.height+2*X),E=A+j,O=Math.max(0,S-j);if(t.look==="handDrawn"){const I=pt.svg(g),H=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Z=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),ut=I.rectangle(A,v,j,w,H);W=g.insert(()=>ut,":first-child");const gt=I.rectangle(E,v,O,w,Z);at=g.insert(()=>gt,":first-child"),W.select("path:nth-child(2)").attr("style",h.join(";")),W.select("path").attr("style",u.join(";").replace("fill","stroke"))}else W=g.insert("rect",":first-child"),at=g.insert("rect",":first-child"),W.attr("class","swimlane-title").attr("style",c).attr("x",A).attr("y",v).attr("width",j).attr("height",w).attr("fill",a).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",E).attr("y",v).attr("width",O).attr("height",w).attr("fill","none").attr("stroke",n);const L=A+j/2,R=t.y;y.attr("transform",`translate(${L}, ${R}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const j=Math.max(0,F-v),E=Math.min(N,j),O=v+E,L=Math.max(0,_-O),R=t.x-S/2;if(t.look==="handDrawn"){const Z=pt.svg(g),ut=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),gt=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),bt=Z.rectangle(R,v,S,E,ut);W=g.insert(()=>bt,":first-child");const Tt=Z.rectangle(R,O,S,L,gt);at=g.insert(()=>Tt,":first-child"),W.select("path:nth-child(2)").attr("style",h.join(";")),W.select("path").attr("style",u.join(";").replace("fill","stroke"))}else W=g.insert("rect",":first-child"),at=g.insert("rect",":first-child"),W.attr("class","swimlane-title").attr("style",c).attr("x",R).attr("y",v).attr("width",S).attr("height",E).attr("fill",a).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",O).attr("width",S).attr("height",L).attr("fill","none").attr("stroke",n);const I=t.x-C.width/2,H=v+(E-C.height)/2;y.attr("transform",`translate(${I}, ${H})`)}if(z.trace("Swimlane data ",t,JSON.stringify(t)),l){const j=y.select("span");j&&j.attr("style",l)}return t.offsetX=0,t.width=S,t.height=w,t.offsetY=C.height-k/2,t.intersect=function(j){return Jr(t,j)},{cluster:g,labelBBox:C}},"swimlane"),Ep=p(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=xt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=be(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):m=await Fr(d,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(be(r)){const A=m.children[0],F=It(m);y=A.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const A=pt.svg(u),F=dt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),X=A.path(He(k,S,x,C,0),F);w=u.insert(()=>(z.debug("Rough node insert CXC",X),X),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:v}=Ma(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const A=d.select("span");A&&A.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return Jr(t,A)},{cluster:u,labelBBox:y}},"rect"),bk=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return Jr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),kk=p(async(e,t)=>{const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let g=c.append("rect");const d=await Fr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(be(r)){const X=d.children[0],N=It(d);m=X.getBoundingClientRect(),N.attr("width",m.width),N.attr("height",m.height)}const y=0*t.padding,x=y/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,w=t.x-C/2,v=t.y-k/2;t.width=C;const _=t.y-t.height/2-x+m.height+2;let A;if(t.look==="handDrawn"){const X=t.cssClasses.includes("statediagram-cluster-alt"),N=pt.svg(c),W=t.rx||t.ry?N.path(He(w,v,C,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(w,v,C,k,{seed:s});A=c.insert(()=>W,":first-child");const at=N.rectangle(w,_,C,S,{fill:X?a:o,fillStyle:X?"hachure":"solid",stroke:l,seed:s});A=c.insert(()=>W,":first-child"),g=c.insert(()=>at)}else A=h.insert("rect",":first-child"),A.attr("class","outer").attr("x",w).attr("y",v).attr("width",C).attr("height",k).attr("data-look",t.look),g.attr("class","inner").attr("x",w).attr("y",_).attr("width",C).attr("height",S);u.attr("transform",`translate(${t.x-m.width/2}, ${v+1-(be(r)?0:3)})`);const F=A.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(X){return Jr(t,X)},{cluster:c,labelBBox:m}},"roundedWithTitle"),Tk=p(async(e,t)=>{z.info("Creating subgraph rect for ",t.id,t);const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=xt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=be(r),d=u.insert("g").attr("class","cluster-label "),m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let y=m.getBBox();if(be(r)){const A=m.children[0],F=It(m);y=A.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;z.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const A=pt.svg(u),F=dt(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),X=A.path(He(k,S,x,C,t.rx),F);w=u.insert(()=>(z.debug("Rough node insert CXC",X),X),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:v}=Ma(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+v})`),n){const A=d.select("span");A&&A.attr("style",n)}const _=w.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return Jr(t,A)},{cluster:u,labelBBox:y}},"kanbanSection"),Sk=p((e,t)=>{const r=Wt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,g=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const x=pt.svg(o).rectangle(u,g,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>x,":first-child")}else{d=n.insert("rect",":first-child");let y="outer";t.look,y="divider",d.attr("class",y).attr("x",u).attr("y",g).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return Jr(t,y)},{cluster:o,labelBBox:{}}},"divider"),wk=Ep,Bk={rect:Ep,squareRect:wk,roundedWithTitle:kk,noteGroup:bk,divider:Sk,kanbanSection:Tk,swimlane:xk},Mp=new Map,Op=p(async(e,t)=>{const r=t.shape||"rect",i=await Bk[r](e,t);return Mp.set(t.id,i),i},"insertCluster"),vk=p(()=>{Mp=new Map},"clear"),Ji=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"),Ce={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},xc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function os(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Jt(e),t=Jt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}p(os,"calculateDeltaAndAngle");var Jt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Lk=p(e=>({x:p(function(t,r,i){let s=0;const a=Jt(i[0]).x<Jt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:d,deltaX:m}=os(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:d,deltaX:m}=os(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),n=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),l=Math.abs(Jt(t).x-Jt(i[0]).x),c=Math.abs(Jt(t).y-Jt(i[0]).y),h=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],g=1;if(o<u&&o>0&&n<u){let d=u+g-o;d*=a==="right"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+g-l;d*=a==="right"?-1:1,s+=d}return Jt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=Jt(i[0]).y<Jt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:d,deltaY:m}=os(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:d,deltaY:m}=os(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),n=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),l=Math.abs(Jt(t).y-Jt(i[0]).y),c=Math.abs(Jt(t).x-Jt(i[0]).x),h=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],g=1;if(o<u&&o>0&&n<u){let d=u+g-o;d*=a==="up"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+g-l;d*=a==="up"?-1:1,s+=d}return Jt(t).y+s},"y")}),"getLineFunctionsWithOffset"),_k=p((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&bc(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&bc(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),Fk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Ak=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],bc=p((e,t,r,i,s,a,o=!1,n)=>{var m;if(!r||r==="none")return;const l=Fk[r],c=l&&Ak.includes(l.type);if(!l){z.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),x=`${d}_${y}`;if(!document.getElementById(x)){const C=document.getElementById(d);if(C){const k=C.cloneNode(!0);k.id=x,k.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),Ek=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Wt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),$i=new Map,se=new Map,Mk=p(()=>{$i.clear(),se.clear()},"clear"),$p=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),ts=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),ul=p(async(e,t)=>{const r=Wt();let i=be(r);const{labelStyles:s}=xt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ve(e,t.label,{style:ts(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),z.info("abc82",t,t.labelType);let h,u;if(i){const d=c.children[0],m=It(c);h=await Xr.measure(()=>d.getBoundingClientRect()),u=h,m.attr("width",h.width),m.attr("height",h.height)}else{const d=It(c).select("text").node();await Xr.measure(()=>{h=c.getBBox(),d&&typeof d.getBBox=="function"?u=d.getBBox():u=h})}o.attr("transform",Ji(u,i)),$i.set(t.id,a),t.width=h.width,t.height=h.height;let g;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelLeft,ts(t.labelStyle)||"",!1,!1);g=y;let x=y.getBBox();if(i){const C=y.children[0],k=It(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",Ji(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startLeft=d,ns(g,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelRight,ts(t.labelStyle)||"",!1,!1);g=y;let x=y.getBBox();if(i){const C=y.children[0],k=It(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",Ji(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startRight=d,ns(g,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(d,t.endLabelLeft,ts(t.labelStyle)||"",!1,!1);g=y;let x=y.getBBox();if(i){const C=y.children[0],k=It(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",Ji(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endLeft=d,ns(g,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(d,t.endLabelRight,ts(t.labelStyle)||"",!1,!1);g=y;let x=y.getBBox();if(i){const C=y.children[0],k=It(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",Ji(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endRight=d,ns(g,t.endLabelRight)}return c},"insertEdgeLabel");function ns(e,t){be(Wt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(ns,"setTerminalWidth");var Ok=p((e,t)=>{z.debug("Moving label abc88 ",e.id,e.label,$i.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Wt(),{subGraphTitleTotalMargin:s}=Ma(i);if(e.label){const a=$i.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=se.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=se.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=se.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=se.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),$k=p((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Dk=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),Ik=p((e,t,r)=>{z.debug(`intersection calc abc89:
262
+ outsidePoint: ${JSON.stringify(t)}
263
+ insidePoint : ${JSON.stringify(r)}
264
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const g={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&&(g.x=t.x,g.y=t.y),h===0&&(g.x=t.x),c===0&&(g.y=t.y),z.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,g),g}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,g=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return z.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:g,_y:d}),n===0&&(g=t.x,d=t.y),h===0&&(g=t.x),c===0&&(d=t.y),{x:g,y:d}}},"intersection"),kc=p((e,t)=>{z.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(z.info("abc88 checking point",a,t),!Dk(t,a)&&!s){const o=Ik(t,i,a);z.debug("abc88 inside",a,i,o),z.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)?z.warn("abc88 no intersect",o,r):r.push(o),s=!0}else z.warn("abc88 outside",a,i),i=a,s||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function Dp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Dp,"extractCornerPoints");var Tc=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),Pk=p(function(e){const{cornerPointPositions:t}=Dp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=Tc(s,o,5),l=Tc(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let g={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?g={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:g={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else z.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(g,l)}else r.push(e[i]);return r},"fixCorners"),Rk=p((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),Ip=p(function(e,t,r,i,s,a,o,n=!1){var I;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Wt();let h=t.points,u=!1;const g=s;var d=a;const m=[];for(const H in t.cssCompiledStyles)hd(H)||m.push(t.cssCompiledStyles[H]);if(c==="swimlane"){if(d.intersect&&g.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[g.intersect(h[0]),d.intersect(h[1])];else{const H=h.slice(1,-1),Z=H[0],ut=H[H.length-1],gt=.5,bt=Math.abs(h[h.length-1].x-ut.x)<gt&&Math.abs(h[h.length-1].y-ut.y)<gt,Tt=g.intersect(Z),nt=bt?ut:d.intersect(ut),Et=Math.abs(nt.x-ut.x)<gt&&Math.abs(nt.y-ut.y)<gt,qt=Math.abs(Tt.x-Z.x)<gt&&Math.abs(Tt.y-Z.y)<gt?[]:[Tt],Lt=Et?[]:[nt];h=[...qt,...H,...Lt]}h=$k(t,h)}else d.intersect&&g.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(g.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(z.info("to cluster abc88",r.get(t.toCluster)),h=kc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(z.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=kc(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let x=h.filter(H=>!Number.isNaN(H.y));const C=Ek(t.curve);C!=="rounded"&&(x=Pk(x));let k=Zs;switch(C){case"linear":k=Zs;break;case"basis":k=Go;break;case"cardinal":k=Iu;break;case"bumpX":k=Ru;break;case"bumpY":k=Pu;break;case"catmullRom":k=Du;break;case"monotoneX":k=$u;break;case"monotoneY":k=Ou;break;case"natural":k=Mu;break;case"step":k=Eu;break;case"stepAfter":k=Au;break;case"stepBefore":k=Fu;break;case"rounded":k=Zs;break;default:k=Go}const{x:S,y:w}=Lk(t),v=ny().x(S).y(w).curve(k);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 A,F=C==="rounded"?Pp(Rp(x,t),5):v(x);const X=Array.isArray(t.style)?t.style:[t.style];let N=X.find(H=>H==null?void 0:H.startsWith("stroke:")),W="";t.animate&&(W="edge-animation-fast"),t.animation&&(W="edge-animation-"+t.animation);let at=!1;if(t.look==="handDrawn"){const H=pt.svg(e);Object.assign([],x);const Z=H.path(F,{roughness:.3,seed:l});_+=" transition",A=It(Z).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(W?" "+W:"")).attr("style",X?X.reduce((gt,bt)=>gt+";"+bt,""):"");let ut=A.attr("d");A.attr("d",ut),e.node().appendChild(A.node())}else{const H=m.join(";"),Z=X?X.reduce((Et,_t)=>Et+_t+";",""):"",ut=(H?H+";"+Z+";":Z)+";"+(X?X.reduce((Et,_t)=>Et+";"+_t,""):"");A=e.append("path").attr("d",F).attr("id",`${o}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(W?" "+W:"")).attr("style",ut),N=(I=ut.match(/stroke:([^;]+)/))==null?void 0:I[1],at=t.animate===!0||!!t.animation||H.includes("animation");const gt=A.node(),bt=typeof gt.getTotalLength=="function"?gt.getTotalLength():0,Tt=xc[t.arrowTypeStart]||0,nt=xc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!at){const _t=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Rk(bt,Tt,nt):`0 ${Tt} ${bt-Tt-nt} ${nt}`}; stroke-dashoffset: 0;`;A.attr("style",_t+A.attr("style"))}}A.attr("data-edge",!0),A.attr("data-et","edge"),A.attr("data-id",t.id),A.attr("data-points",y),A.attr("data-look",oe(t.look)),t.showPoints&&x.forEach(H=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let j="";(Wt().flowchart.arrowMarkerAbsolute||Wt().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",t.arrowTypeStart),z.info("arrowTypeEnd",t.arrowTypeEnd);const E=!at&&(t==null?void 0:t.look)==="neo";_k(A,t,j,o,i,E,N);const O=Math.floor(h.length/2),L=h[O];xe.isLabelCoordinateInPath(L,A.attr("d"))||(u=!0);let R={};return u&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function Pp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,g=l.y-o.y,d=Math.hypot(c,h),m=Math.hypot(u,g);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const y=c/d,x=h/d,C=u/m,k=g/m,S=y*C+x*k,w=Math.max(-1,Math.min(1,S)),v=Math.acos(w);if(v<s||Math.abs(Math.PI-v)<s){r+=`L${o.x},${o.y}`;continue}const _=Math.min(t/Math.sin(v/2),d/2,m/2),A=o.x-y*_,F=o.y-x*_,X=o.x+C*_,N=o.y+k*_;r+=`L${A},${F}`,r+=`Q${o.x},${o.y} ${X},${N}`}}return r}p(Pp,"generateRoundedPath");function Cn(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(Cn,"calculateDeltaAndAngle");function Rp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ce[t.arrowTypeStart]){const s=Ce[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Cn(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Ce[t.arrowTypeEnd]){const s=Ce[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Cn(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(Rp,"applyMarkerOffsetsToPoints");var qk=p((e,t,r,i)=>{t.forEach(s=>{l1[s](e,r,i)})},"insertMarkers"),Nk=p((e,t,r)=>{z.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Wk=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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),zk=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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Hk=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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),jk=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").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Yk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Uk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Gk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Xk=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"),Vk=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Zk=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"),Kk=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 s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Qk=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"),Jk=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 s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),t1=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),e1=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),r1=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),i1=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),s1=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
265
+ L20,10
266
+ M20,10
267
+ L0,20`)},"requirement_arrow"),a1=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
268
+ L20,10
269
+ M20,10
270
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),o1=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"),n1=p((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),l1={extension:Nk,composition:Wk,aggregation:zk,dependency:Hk,lollipop:jk,point:Yk,circle:Uk,cross:Gk,barb:Xk,barbNeo:Vk,only_one:Zk,zero_or_one:Kk,one_or_more:Qk,zero_or_more:Jk,only_one_neo:t1,zero_or_one_neo:e1,one_or_more_neo:r1,zero_or_more_neo:i1,requirement_arrow:s1,requirement_contains:o1,requirement_arrow_neo:a1,requirement_contains_neo:n1},qp=qk,Np=typeof global=="object"&&global&&global.Object===Object&&global,h1=typeof self=="object"&&self&&self.Object===Object&&self,kr=Np||h1||Function("return this")(),ar=kr.Symbol,Wp=Object.prototype,c1=Wp.hasOwnProperty,u1=Wp.toString,es=ar?ar.toStringTag:void 0;function d1(e){var t=c1.call(e,es),r=e[es];try{e[es]=void 0;var i=!0}catch{}var s=u1.call(e);return i&&(t?e[es]=r:delete e[es]),s}var g1=Object.prototype,p1=g1.toString;function f1(e){return p1.call(e)}var m1="[object Null]",y1="[object Undefined]",Sc=ar?ar.toStringTag:void 0;function qi(e){return e==null?e===void 0?y1:m1:Sc&&Sc in Object(e)?d1(e):f1(e)}function Vr(e){return e!=null&&typeof e=="object"}var C1="[object Symbol]";function dl(e){return typeof e=="symbol"||Vr(e)&&qi(e)==C1}function zp(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var Oe=Array.isArray,wc=ar?ar.prototype:void 0,Bc=wc?wc.toString:void 0;function Hp(e){if(typeof e=="string")return e;if(Oe(e))return zp(e,Hp)+"";if(dl(e))return Bc?Bc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function gl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function $a(e){return e}var x1="[object AsyncFunction]",b1="[object Function]",k1="[object GeneratorFunction]",T1="[object Proxy]";function ka(e){if(!gl(e))return!1;var t=qi(e);return t==b1||t==k1||t==x1||t==T1}var Co=kr["__core-js_shared__"],vc=(function(){var e=/[^.]+$/.exec(Co&&Co.keys&&Co.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function S1(e){return!!vc&&vc in e}var w1=Function.prototype,B1=w1.toString;function ti(e){if(e!=null){try{return B1.call(e)}catch{}try{return e+""}catch{}}return""}var v1=/[\\^$.*+?()[\]{}|]/g,L1=/^\[object .+?Constructor\]$/,_1=Function.prototype,F1=Object.prototype,A1=_1.toString,E1=F1.hasOwnProperty,M1=RegExp("^"+A1.call(E1).replace(v1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O1(e){if(!gl(e)||S1(e))return!1;var t=ka(e)?M1:L1;return t.test(ti(e))}function $1(e,t){return e==null?void 0:e[t]}function ei(e,t){var r=$1(e,t);return O1(r)?r:void 0}var xn=ei(kr,"WeakMap");function D1(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function I1(){}var P1=800,R1=16,q1=Date.now;function N1(e){var t=0,r=0;return function(){var i=q1(),s=R1-(i-r);if(r=i,s>0){if(++t>=P1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ls(e){return function(){return e}}var Lc=(function(){try{var e=ei(Object,"defineProperty");return e({},"",{}),e}catch{}})(),W1=Lc?function(e,t){return Lc(e,"toString",{configurable:!0,enumerable:!1,value:ls(t),writable:!0})}:$a,z1=N1(W1);function H1(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function j1(e,t,r,i){for(var s=e.length,a=r+-1;++a<s;)if(t(e[a],a,e))return a;return-1}function Y1(e){return e!==e}function U1(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function G1(e,t,r){return t===t?U1(e,t,r):j1(e,Y1,r)}function X1(e,t){var r=e==null?0:e.length;return!!r&&G1(e,t,0)>-1}var V1=9007199254740991,Z1=/^(?:0|[1-9]\d*)$/;function jp(e,t){var r=typeof e;return t=t??V1,!!t&&(r=="number"||r!="symbol"&&Z1.test(e))&&e>-1&&e%1==0&&e<t}function Yp(e,t){return e===t||e!==e&&t!==t}var _c=Math.max;function K1(e,t,r){return t=_c(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=_c(i.length-t,0),o=Array(a);++s<a;)o[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(o),D1(e,this,n)}}function Q1(e,t){return z1(K1(e,t,$a),e+"")}var J1=9007199254740991;function pl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=J1}function Da(e){return e!=null&&pl(e.length)&&!ka(e)}var t2=Object.prototype;function Up(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||t2;return e===r}function e2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var r2="[object Arguments]";function Fc(e){return Vr(e)&&qi(e)==r2}var Gp=Object.prototype,i2=Gp.hasOwnProperty,s2=Gp.propertyIsEnumerable,Ia=Fc((function(){return arguments})())?Fc:function(e){return Vr(e)&&i2.call(e,"callee")&&!s2.call(e,"callee")};function a2(){return!1}var Xp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ac=Xp&&typeof module=="object"&&module&&!module.nodeType&&module,o2=Ac&&Ac.exports===Xp,Ec=o2?kr.Buffer:void 0,n2=Ec?Ec.isBuffer:void 0,Ta=n2||a2,l2="[object Arguments]",h2="[object Array]",c2="[object Boolean]",u2="[object Date]",d2="[object Error]",g2="[object Function]",p2="[object Map]",f2="[object Number]",m2="[object Object]",y2="[object RegExp]",C2="[object Set]",x2="[object String]",b2="[object WeakMap]",k2="[object ArrayBuffer]",T2="[object DataView]",S2="[object Float32Array]",w2="[object Float64Array]",B2="[object Int8Array]",v2="[object Int16Array]",L2="[object Int32Array]",_2="[object Uint8Array]",F2="[object Uint8ClampedArray]",A2="[object Uint16Array]",E2="[object Uint32Array]",Qt={};Qt[S2]=Qt[w2]=Qt[B2]=Qt[v2]=Qt[L2]=Qt[_2]=Qt[F2]=Qt[A2]=Qt[E2]=!0;Qt[l2]=Qt[h2]=Qt[k2]=Qt[c2]=Qt[T2]=Qt[u2]=Qt[d2]=Qt[g2]=Qt[p2]=Qt[f2]=Qt[m2]=Qt[y2]=Qt[C2]=Qt[x2]=Qt[b2]=!1;function M2(e){return Vr(e)&&pl(e.length)&&!!Qt[qi(e)]}function O2(e){return function(t){return e(t)}}var Vp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ps=Vp&&typeof module=="object"&&module&&!module.nodeType&&module,$2=ps&&ps.exports===Vp,xo=$2&&Np.process,Mc=(function(){try{var e=ps&&ps.require&&ps.require("util").types;return e||xo&&xo.binding&&xo.binding("util")}catch{}})(),Oc=Mc&&Mc.isTypedArray,fl=Oc?O2(Oc):M2,D2=Object.prototype,I2=D2.hasOwnProperty;function P2(e,t){var r=Oe(e),i=!r&&Ia(e),s=!r&&!i&&Ta(e),a=!r&&!i&&!s&&fl(e),o=r||i||s||a,n=o?e2(e.length,String):[],l=n.length;for(var c in e)(t||I2.call(e,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||jp(c,l)))&&n.push(c);return n}function R2(e,t){return function(r){return e(t(r))}}var q2=R2(Object.keys,Object),N2=Object.prototype,W2=N2.hasOwnProperty;function Zp(e){if(!Up(e))return q2(e);var t=[];for(var r in Object(e))W2.call(e,r)&&r!="constructor"&&t.push(r);return t}function rr(e){return Da(e)?P2(e):Zp(e)}var z2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H2=/^\w*$/;function ml(e,t){if(Oe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||dl(e)?!0:H2.test(e)||!z2.test(e)||t!=null&&e in Object(t)}var ys=ei(Object,"create");function j2(){this.__data__=ys?ys(null):{},this.size=0}function Y2(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var U2="__lodash_hash_undefined__",G2=Object.prototype,X2=G2.hasOwnProperty;function V2(e){var t=this.__data__;if(ys){var r=t[e];return r===U2?void 0:r}return X2.call(t,e)?t[e]:void 0}var Z2=Object.prototype,K2=Z2.hasOwnProperty;function Q2(e){var t=this.__data__;return ys?t[e]!==void 0:K2.call(t,e)}var J2="__lodash_hash_undefined__";function tT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ys&&t===void 0?J2:t,this}function Zr(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])}}Zr.prototype.clear=j2;Zr.prototype.delete=Y2;Zr.prototype.get=V2;Zr.prototype.has=Q2;Zr.prototype.set=tT;function eT(){this.__data__=[],this.size=0}function Pa(e,t){for(var r=e.length;r--;)if(Yp(e[r][0],t))return r;return-1}var rT=Array.prototype,iT=rT.splice;function sT(e){var t=this.__data__,r=Pa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():iT.call(t,r,1),--this.size,!0}function aT(e){var t=this.__data__,r=Pa(t,e);return r<0?void 0:t[r][1]}function oT(e){return Pa(this.__data__,e)>-1}function nT(e,t){var r=this.__data__,i=Pa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Tr(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])}}Tr.prototype.clear=eT;Tr.prototype.delete=sT;Tr.prototype.get=aT;Tr.prototype.has=oT;Tr.prototype.set=nT;var Cs=ei(kr,"Map");function lT(){this.size=0,this.__data__={hash:new Zr,map:new(Cs||Tr),string:new Zr}}function hT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ra(e,t){var r=e.__data__;return hT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function cT(e){var t=Ra(this,e).delete(e);return this.size-=t?1:0,t}function uT(e){return Ra(this,e).get(e)}function dT(e){return Ra(this,e).has(e)}function gT(e,t){var r=Ra(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Sr(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])}}Sr.prototype.clear=lT;Sr.prototype.delete=cT;Sr.prototype.get=uT;Sr.prototype.has=dT;Sr.prototype.set=gT;var pT="Expected a function";function yl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pT);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(yl.Cache||Sr),r}yl.Cache=Sr;var fT=500;function mT(e){var t=yl(e,function(i){return r.size===fT&&r.clear(),i}),r=t.cache;return t}var yT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,CT=/\\(\\)?/g,xT=mT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yT,function(r,i,s,a){t.push(s?a.replace(CT,"$1"):i||r)}),t});function bT(e){return e==null?"":Hp(e)}function Kp(e,t){return Oe(e)?e:ml(e,t)?[e]:xT(bT(e))}function qa(e){if(typeof e=="string"||dl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Qp(e,t){t=Kp(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[qa(t[r++])];return r&&r==i?e:void 0}function kT(e,t,r){var i=e==null?void 0:Qp(e,t);return i===void 0?r:i}function Jp(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var $c=ar?ar.isConcatSpreadable:void 0;function TT(e){return Oe(e)||Ia(e)||!!($c&&e&&e[$c])}function ST(e,t,r,i,s){var a=-1,o=e.length;for(r||(r=TT),s||(s=[]);++a<o;){var n=e[a];r(n)?Jp(s,n):i||(s[s.length]=n)}return s}function wT(e,t,r,i){var s=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++s]);++s<a;)r=t(r,e[s],s,e);return r}function BT(){this.__data__=new Tr,this.size=0}function vT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function LT(e){return this.__data__.get(e)}function _T(e){return this.__data__.has(e)}var FT=200;function AT(e,t){var r=this.__data__;if(r instanceof Tr){var i=r.__data__;if(!Cs||i.length<FT-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Sr(i)}return r.set(e,t),this.size=r.size,this}function xr(e){var t=this.__data__=new Tr(e);this.size=t.size}xr.prototype.clear=BT;xr.prototype.delete=vT;xr.prototype.get=LT;xr.prototype.has=_T;xr.prototype.set=AT;function tf(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var o=e[r];t(o,r,e)&&(a[s++]=o)}return a}function ET(){return[]}var MT=Object.prototype,OT=MT.propertyIsEnumerable,Dc=Object.getOwnPropertySymbols,$T=Dc?function(e){return e==null?[]:(e=Object(e),tf(Dc(e),function(t){return OT.call(e,t)}))}:ET;function DT(e,t,r){var i=t(e);return Oe(e)?i:Jp(i,r(e))}function Ic(e){return DT(e,rr,$T)}var bn=ei(kr,"DataView"),kn=ei(kr,"Promise"),fi=ei(kr,"Set"),Pc="[object Map]",IT="[object Object]",Rc="[object Promise]",qc="[object Set]",Nc="[object WeakMap]",Wc="[object DataView]",PT=ti(bn),RT=ti(Cs),qT=ti(kn),NT=ti(fi),WT=ti(xn),yr=qi;(bn&&yr(new bn(new ArrayBuffer(1)))!=Wc||Cs&&yr(new Cs)!=Pc||kn&&yr(kn.resolve())!=Rc||fi&&yr(new fi)!=qc||xn&&yr(new xn)!=Nc)&&(yr=function(e){var t=qi(e),r=t==IT?e.constructor:void 0,i=r?ti(r):"";if(i)switch(i){case PT:return Wc;case RT:return Pc;case qT:return Rc;case NT:return qc;case WT:return Nc}return t});var zc=kr.Uint8Array,zT="__lodash_hash_undefined__";function HT(e){return this.__data__.set(e,zT),this}function jT(e){return this.__data__.has(e)}function xs(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Sr;++t<r;)this.add(e[t])}xs.prototype.add=xs.prototype.push=HT;xs.prototype.has=jT;function YT(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function ef(e,t){return e.has(t)}var UT=1,GT=2;function rf(e,t,r,i,s,a){var o=r&UT,n=e.length,l=t.length;if(n!=l&&!(o&&l>n))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var u=-1,g=!0,d=r&GT?new xs:void 0;for(a.set(e,t),a.set(t,e);++u<n;){var m=e[u],y=t[u];if(i)var x=o?i(y,m,u,t,e,a):i(m,y,u,e,t,a);if(x!==void 0){if(x)continue;g=!1;break}if(d){if(!YT(t,function(C,k){if(!ef(d,k)&&(m===C||s(m,C,r,i,a)))return d.push(k)})){g=!1;break}}else if(!(m===y||s(m,y,r,i,a))){g=!1;break}}return a.delete(e),a.delete(t),g}function XT(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function Cl(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var VT=1,ZT=2,KT="[object Boolean]",QT="[object Date]",JT="[object Error]",tS="[object Map]",eS="[object Number]",rS="[object RegExp]",iS="[object Set]",sS="[object String]",aS="[object Symbol]",oS="[object ArrayBuffer]",nS="[object DataView]",Hc=ar?ar.prototype:void 0,bo=Hc?Hc.valueOf:void 0;function lS(e,t,r,i,s,a,o){switch(r){case nS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oS:return!(e.byteLength!=t.byteLength||!a(new zc(e),new zc(t)));case KT:case QT:case eS:return Yp(+e,+t);case JT:return e.name==t.name&&e.message==t.message;case rS:case sS:return e==t+"";case tS:var n=XT;case iS:var l=i&VT;if(n||(n=Cl),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;i|=ZT,o.set(e,t);var h=rf(n(e),n(t),i,s,a,o);return o.delete(e),h;case aS:if(bo)return bo.call(e)==bo.call(t)}return!1}var hS=1,cS=Object.prototype,uS=cS.hasOwnProperty;function dS(e,t,r,i,s,a){var o=r&hS,n=Ic(e),l=n.length,c=Ic(t),h=c.length;if(l!=h&&!o)return!1;for(var u=l;u--;){var g=n[u];if(!(o?g in t:uS.call(t,g)))return!1}var d=a.get(e),m=a.get(t);if(d&&m)return d==t&&m==e;var y=!0;a.set(e,t),a.set(t,e);for(var x=o;++u<l;){g=n[u];var C=e[g],k=t[g];if(i)var S=o?i(k,C,g,t,e,a):i(C,k,g,e,t,a);if(!(S===void 0?C===k||s(C,k,r,i,a):S)){y=!1;break}x||(x=g=="constructor")}if(y&&!x){var w=e.constructor,v=t.constructor;w!=v&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof v=="function"&&v instanceof v)&&(y=!1)}return a.delete(e),a.delete(t),y}var gS=1,jc="[object Arguments]",Yc="[object Array]",Ys="[object Object]",pS=Object.prototype,Uc=pS.hasOwnProperty;function fS(e,t,r,i,s,a){var o=Oe(e),n=Oe(t),l=o?Yc:yr(e),c=n?Yc:yr(t);l=l==jc?Ys:l,c=c==jc?Ys:c;var h=l==Ys,u=c==Ys,g=l==c;if(g&&Ta(e)){if(!Ta(t))return!1;o=!0,h=!1}if(g&&!h)return a||(a=new xr),o||fl(e)?rf(e,t,r,i,s,a):lS(e,t,l,r,i,s,a);if(!(r&gS)){var d=h&&Uc.call(e,"__wrapped__"),m=u&&Uc.call(t,"__wrapped__");if(d||m){var y=d?e.value():e,x=m?t.value():t;return a||(a=new xr),s(y,x,r,i,a)}}return g?(a||(a=new xr),dS(e,t,r,i,s,a)):!1}function xl(e,t,r,i,s){return e===t?!0:e==null||t==null||!Vr(e)&&!Vr(t)?e!==e&&t!==t:fS(e,t,r,i,xl,s)}var mS=1,yS=2;function CS(e,t,r,i){var s=r.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var o=r[s];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++s<a;){o=r[s];var n=o[0],l=e[n],c=o[1];if(o[2]){if(l===void 0&&!(n in e))return!1}else{var h=new xr,u;if(!(u===void 0?xl(c,l,mS|yS,i,h):u))return!1}}return!0}function sf(e){return e===e&&!gl(e)}function xS(e){for(var t=rr(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,sf(s)]}return t}function af(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function bS(e){var t=xS(e);return t.length==1&&t[0][2]?af(t[0][0],t[0][1]):function(r){return r===e||CS(r,e,t)}}function kS(e,t){return e!=null&&t in Object(e)}function TS(e,t,r){t=Kp(t,e);for(var i=-1,s=t.length,a=!1;++i<s;){var o=qa(t[i]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++i!=s?a:(s=e==null?0:e.length,!!s&&pl(s)&&jp(o,s)&&(Oe(e)||Ia(e)))}function SS(e,t){return e!=null&&TS(e,t,kS)}var wS=1,BS=2;function vS(e,t){return ml(e)&&sf(t)?af(qa(e),t):function(r){var i=kT(r,e);return i===void 0&&i===t?SS(r,e):xl(t,i,wS|BS)}}function LS(e){return function(t){return t==null?void 0:t[e]}}function _S(e){return function(t){return Qp(t,e)}}function FS(e){return ml(e)?LS(qa(e)):_S(e)}function of(e){return typeof e=="function"?e:e==null?$a:typeof e=="object"?Oe(e)?vS(e[0],e[1]):bS(e):FS(e)}function AS(e){return function(t,r,i){for(var s=-1,a=Object(t),o=i(t),n=o.length;n--;){var l=o[++s];if(r(a[l],l,a)===!1)break}return t}}var ES=AS();function MS(e,t){return e&&ES(e,t,rr)}function OS(e,t){return function(r,i){if(r==null)return r;if(!Da(r))return e(r,i);for(var s=r.length,a=-1,o=Object(r);++a<s&&i(o[a],a,o)!==!1;);return r}}var bl=OS(MS);function $S(e){return Vr(e)&&Da(e)}function DS(e){return typeof e=="function"?e:$a}function Rr(e,t){var r=Oe(e)?H1:bl;return r(e,DS(t))}function IS(e,t){var r=[];return bl(e,function(i,s,a){t(i,s,a)&&r.push(i)}),r}function Us(e,t){var r=Oe(e)?tf:IS;return r(e,of(t))}function PS(e,t){return zp(t,function(r){return e[r]})}function ko(e){return e==null?[]:PS(e,rr(e))}var RS="[object Map]",qS="[object Set]",NS=Object.prototype,WS=NS.hasOwnProperty;function Gc(e){if(e==null)return!0;if(Da(e)&&(Oe(e)||typeof e=="string"||typeof e.splice=="function"||Ta(e)||fl(e)||Ia(e)))return!e.length;var t=yr(e);if(t==RS||t==qS)return!e.size;if(Up(e))return!Zp(e).length;for(var r in e)if(WS.call(e,r))return!1;return!0}function ui(e){return e===void 0}function zS(e,t,r,i,s){return s(e,function(a,o,n){r=i?(i=!1,a):t(r,a,o,n)}),r}function HS(e,t,r){var i=Oe(e)?wT:zS,s=arguments.length<3;return i(e,of(t),r,s,bl)}var jS=1/0,YS=fi&&1/Cl(new fi([,-0]))[1]==jS?function(e){return new fi(e)}:I1,US=200;function GS(e,t,r){var i=-1,s=X1,a=e.length,o=!0,n=[],l=n;if(a>=US){var c=YS(e);if(c)return Cl(c);o=!1,s=ef,l=new xs}else l=n;t:for(;++i<a;){var h=e[i],u=h;if(h=h!==0?h:0,o&&u===u){for(var g=l.length;g--;)if(l[g]===u)continue t;n.push(h)}else s(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var XS=Q1(function(e){return GS(ST(e,1,$S,!0))}),VS="\0",qr="\0",Xc="";class Na{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ls(void 0),this._defaultEdgeLabelFn=ls(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[qr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return ka(t)||(t=ls(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return rr(this._nodes)}sources(){var t=this;return Us(this.nodes(),function(r){return Gc(t._in[r])})}sinks(){var t=this;return Us(this.nodes(),function(r){return Gc(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return Rr(t,function(a){i.length>1?s.setNode(a,r):s.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=qr,this._children[t]={},this._children[qr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Rr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Rr(rr(this._in[t]),r),delete this._in[t],delete this._preds[t],Rr(rr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ui(r))r=qr;else{r+="";for(var i=r;!ui(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==qr)return r}}children(t){if(ui(t)&&(t=qr),this._isCompound){var r=this._children[t];if(r)return rr(r)}else{if(t===qr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return rr(r)}successors(t){var r=this._sucs[t];if(r)return rr(r)}neighbors(t){var r=this.predecessors(t);if(r)return XS(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Rr(this._nodes,function(o,n){t(n)&&r.setNode(n,o)}),Rr(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var s={};function a(o){var n=i.parent(o);return n===void 0||r.hasNode(n)?(s[o]=n,n):n in s?s[n]:a(n)}return this._isCompound&&Rr(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return ka(t)||(t=ls(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return ko(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return HS(t,function(a,o){return s.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,s,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(s=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,r=""+r,ui(i)||(i=""+i);var n=hs(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),this;if(!ui(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=a?s:this._defaultEdgeLabelFn(t,r,i);var l=ZS(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Vc(this._preds[r],t),Vc(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?To(this._isDirected,arguments[0]):hs(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?To(this._isDirected,arguments[0]):hs(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?To(this._isDirected,arguments[0]):hs(this._isDirected,t,r,i),a=this._edgeObjs[s];return a&&(t=a.v,r=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Zc(this._preds[r],t),Zc(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=ko(i);return r?Us(s,function(a){return a.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=ko(i);return r?Us(s,function(a){return a.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Na.prototype._nodeCount=0;Na.prototype._edgeCount=0;function Vc(e,t){e[t]?e[t]++:e[t]=1}function Zc(e,t){--e[t]||delete e[t]}function hs(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}return s+Xc+a+Xc+(ui(i)?VS:i)}function ZS(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}var n={v:s,w:a};return i&&(n.name=i),n}function To(e,t){return hs(e,t.v,t.w,t.name)}function nf(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:a,nodes:o,rootGroups:r}}p(nf,"createLayoutElementGroups");async function lf(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await St(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}p(lf,"measureGroupLabel");async function hf(e,t,r){var a;const i=await cl(e,t,r),s=((a=i.node())==null?void 0:a.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}p(hf,"insertMeasuredNode");async function cf(e,t){const r=new Na({multigraph:!0,compound:!0}),i=[...t.edges],s=Wt(),a=nf(e),{edgeLabels:o,nodes:n}=a,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await lf(n,h),r.setNode(h.id,{...h});else{if(c){const u=await hf(n,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&$p(h)&&await ul(o,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(g=>g.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Pt(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-INFHLROL-e9akerky.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);h(e,t)}return{graph:r,groups:a,nodeElements:l}}p(cf,"createGraphWithElements");var Ht=new Map,Hr=new Map,uf=new Map,KS=p(()=>{Hr.clear(),uf.clear(),Ht.clear()},"clear"),bs=p((e,t)=>{const r=Hr.get(t)||[];return z.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),QS=p((e,t)=>{const r=Hr.get(t)||[];return z.info("Descendants of ",t," is ",r),z.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||bs(e.v,t)||bs(e.w,t)||r.includes(e.w):(z.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),df=p((e,t,r,i)=>{z.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),z.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)df(a,t,r,i);else{const o=t.node(a);z.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(z.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(z.debug("Setting parent",a,e),r.setParent(a,e)):(z.info("In copy ",e,"root",i,"data",t.node(e),i),z.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));const n=t.edges(a);z.debug("Copying Edges",n),n.forEach(l=>{z.info("Edge",l);const c=t.edge(l.v,l.w,l.name);z.info("Edge data",c,i);try{QS(l,i)?(z.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),z.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):z.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){z.error(h)}})}z.debug("Removing node",a),t.removeNode(a)})},"copy"),gf=p((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)uf.set(s,e),i=[...i,...gf(s,t)];return i},"extractDescendants"),JS=p((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),o=s.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),Sa=p((e,t,r)=>{const i=t.children(e);if(z.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const a of i){const o=Sa(a,t,r),n=JS(t,r,o);if(o)if(n.length>0)s=o;else return o}return s},"findNonClusterChild"),Kc=p(e=>!Ht.has(e)||!Ht.get(e).externalConnections?e:Ht.has(e)?Ht.get(e).id:e,"getAnchorId"),l_=p((e,t)=>{var r;if(!e||t>10){z.debug("Opting out, no graph ");return}else z.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(z.debug("Cluster identified",i," Replacement id in edges: ",Sa(i,e,i)),Hr.set(i,gf(i,e)),Ht.set(i,{id:Sa(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),a=e.edges();s.length>0?(z.debug("Cluster identified",i,Hr),a.forEach(o=>{const n=bs(o.v,i),l=bs(o.w,i);n^l&&(z.debug("Edge: ",o," leaves cluster ",i),z.debug("Descendants of XXX ",i,": ",Hr.get(i)),Ht.get(i).externalConnections=!0)})):z.debug("Not a cluster ",i,Hr)});for(let i of Ht.keys()){const s=Ht.get(i).id,a=e.parent(s);a!==i&&Ht.has(a)&&!Ht.get(a).externalConnections&&(Ht.get(i).id=a);const o=e.edges().some(n=>n.v===i);if(s&&((r=Ht.get(i))!=null&&r.externalConnections)&&o&&mf(e,s,i)){const n=tw(e,i,e.parent(s));n&&(Ht.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);z.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),z.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let a=i.v,o=i.w;if(z.debug("Fix XXX",Ht,"ids:",i.v,i.w,"Translating: ",Ht.get(i.v)," --- ",Ht.get(i.w)),Ht.get(i.v)||Ht.get(i.w)){if(z.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),a=Kc(i.v),o=Kc(i.w),e.removeEdge(i.v,i.w,i.name),a!==i.v){const n=e.parent(a);Ht.get(n).externalConnections=!0,s.fromCluster=i.v}if(o!==i.w){const n=e.parent(o);Ht.get(n).externalConnections=!0,s.toCluster=i.w}z.debug("Fix Replacing with XXX",a,o,i.name),e.setEdge(a,o,s,i.name)}}),pf(e,0),z.trace(Ht)},"adjustClustersAndEdges"),pf=p((e,t)=>{var s,a;if(t>10){z.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const n=e.children(o);i=i||n.length>0}if(!i){z.debug("Done, no node has children",e.nodes());return}z.debug("Nodes = ",r,t);for(const o of r)if(z.debug("Extracting node",o,Ht,Ht.has(o)&&!Ht.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Ht.has(o))z.debug("Not a cluster",o,t);else if(!Ht.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){z.debug("Cluster without external connections, without a parent and with children",o,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(s=Ht.get(o))==null?void 0:s.clusterData)!=null&&a.dir&&(l=Ht.get(o).clusterData.dir,z.debug("Fixing dir",Ht.get(o).clusterData.dir,l));const c=new Na({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});df(o,e,c,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Ht.get(o).clusterData,label:Ht.get(o).label,graph:c})}else z.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Ht.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),z.debug(Ht);r=e.nodes(),z.debug("New list of nodes",r);for(const o of r){const n=e.node(o);z.debug(" Now next level",o,n),n!=null&&n.clusterNode&&pf(n.graph,t+1)}},"extractor"),ff=p((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),a=ff(e,s);r=[...r,...a]}),r},"sorter"),h_=p(e=>ff(e,e.children()),"sortNodesByHierarchy"),mf=p((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ht.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),tw=p((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||bs(s,r))continue;const a=Sa(s,e,t);if(a&&!mf(e,a,t))return a}return null},"findSafeAnchorNode");function yf({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:a}){const o=t??Tl;return p(async function(l,c,h,u){const g=c.select("g");((h==null?void 0:h.insertMarkers)??qp)(g,l.markers,l.type,l.diagramId),kl();const d={element:g,helpers:h,options:u};d.preparedLayout=await(e==null?void 0:e(l,d));const m=await o(l,d),y=await r(l,d),x={...d,measure:m};i?await i(l,x,y):await Sl(l,x,a),await(s==null?void 0:s(l,x,y))},"render")}p(yf,"createCommonLayoutRenderer");function kl(){Ck(),Mk(),vk(),KS()}p(kl,"clearLayoutRenderState");async function Tl(e,{element:t}){return await cf(t,e)}p(Tl,"defaultMeasureLayout");async function Sl(e,t,r={}){var o,n;const{measure:i}=t,{groups:s}=i;for(const l of((o=r.getNodes)==null?void 0:o.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await Cf(s,l,t,r);const a=bf(e.nodes);for(const l of e.edges)kf(l,r)||await Tf(s,l,a,e,r,t)}p(Sl,"paintLayoutData");async function Cf(e,t,r,i){t.clusterNode?Cc(t):xf(t,r,i)?await Op(e.clusters,t):Cc(t)}p(Cf,"paintLayoutNode");function xf(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}p(xf,"shouldPaintAsCluster");function bf(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}p(bf,"buildNodeLookup");function kf(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}p(kf,"shouldSkipPaintEdge");async function Tf(e,t,r,i,s,a){const o=Ip(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Tn(t.start,t,r,a,s),Tn(t.end,t,r,a,s),i.diagramId,Sf(t,s));$p(t)&&($i.has(t.id)||await ul(e.edgeLabels,t),wf(t,o))}p(Tf,"paintLayoutEdge");function Tn(e,t,r,i,s){var a;return((a=s.getEdgeNode)==null?void 0:a.call(s,e,t,i))??(e?r.get(e)??{}:{})}p(Tn,"getRenderedNode");function Sf(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}p(Sf,"shouldSkipIntersect");function wf(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=te(),{subGraphTitleTotalMargin:s}=Ma({flowchart:i.flowchart??{}});if(e.label){const a=$i.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);z.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const a=se.get(e.id).startLeft;let o=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=se.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=se.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=se.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}}p(wf,"positionRenderedEdgeLabel");function Bf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(Bf,"getDefaultExportFromCjs");var fe={},Gs={},Lr={},Qc;function Ni(){if(Qc)return Lr;Qc=1;function e(o){return typeof o>"u"||o===null}p(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}p(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}p(r,"toArray");function i(o,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];o[u]=n[u]}}return o}p(i,"extend");function s(o,n){let l="";for(let c=0;c<n;c+=1)l+=o;return l}p(s,"repeat");function a(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return p(a,"isNegativeZero"),Lr.isNothing=e,Lr.isObject=t,Lr.toArray=r,Lr.repeat=s,Lr.isNegativeZero=a,Lr.extend=i,Lr}p(Ni,"requireCommon");var So,Jc;function Wi(){if(Jc)return So;Jc=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
271
+
272
+ `+r.mark.snippet),a+" "+s):a}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),So=t,So}p(Wi,"requireException");var wo,tu;function vf(){if(tu)return wo;tu=1;const e=Ni();function t(s,a,o,n,l){let c="",h="";const u=Math.floor(l/2)-1;return n-a>u&&(c=" ... ",a=n-u+c.length),o-n>u&&(h=" ...",o=n+u-h.length),{str:c+s.slice(a,o).replace(/\t/g,"→")+h,pos:n-a+c.length}}p(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}p(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const o=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=o.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let u="";const g=Math.min(s.line+a.linesAfter,l.length).toString().length,d=a.maxLength-(a.indent+g+3);for(let y=1;y<=a.linesBefore&&!(h-y<0);y++){const x=t(s.buffer,n[h-y],l[h-y],s.position-(n[h]-n[h-y]),d);u=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),g)+" | "+x.str+`
273
+ `+u}const m=t(s.buffer,n[h],l[h],s.position,d);u+=e.repeat(" ",a.indent)+r((s.line+1).toString(),g)+" | "+m.str+`
274
+ `,u+=e.repeat("-",a.indent+g+3+m.pos)+`^
275
+ `;for(let y=1;y<=a.linesAfter&&!(h+y>=l.length);y++){const x=t(s.buffer,n[h+y],l[h+y],s.position-(n[h]-n[h+y]),d);u+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),g)+" | "+x.str+`
276
+ `}return u.replace(/\n$/,"")}return p(i,"makeSnippet"),wo=i,wo}p(vf,"requireSnippet");var Bo,eu;function ke(){if(eu)return Bo;eu=1;const e=Wi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const o={};return a!==null&&Object.keys(a).forEach(function(n){a[n].forEach(function(l){o[String(l)]=n})}),o}p(i,"compileStyleAliases");function s(a,o){if(o=o||{},Object.keys(o).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=o,this.tag=a,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=i(o.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return p(s,"Type2"),Bo=s,Bo}p(ke,"requireType");var vo,ru;function wl(){if(ru)return vo;ru=1;const e=Wi(),t=ke();function r(a,o){const n=[];return a[o].forEach(function(l){let c=n.length;n.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),n[c]=l}),n}p(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(n){n.multi?(a.multi[n.kind].push(n),a.multi.fallback.push(n)):a[n.kind][n.tag]=a.fallback[n.tag]=n}p(o,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(o);return a}p(i,"compileMap");function s(a){return this.extend(a)}return p(s,"Schema2"),s.prototype.extend=p(function(o){let n=[],l=[];if(o instanceof t)l.push(o);else if(Array.isArray(o))l=l.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(n=n.concat(o.implicit)),o.explicit&&(l=l.concat(o.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),vo=s,vo}p(wl,"requireSchema");var Lo,iu;function Bl(){if(iu)return Lo;iu=1;const e=ke();return Lo=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),Lo}p(Bl,"requireStr");var _o,su;function vl(){if(su)return _o;su=1;const e=ke();return _o=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),_o}p(vl,"requireSeq");var Fo,au;function Ll(){if(au)return Fo;au=1;const e=ke();return Fo=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),Fo}p(Ll,"requireMap");var Ao,ou;function _l(){if(ou)return Ao;ou=1;const e=wl();return Ao=new e({explicit:[Bl(),vl(),Ll()]}),Ao}p(_l,"requireFailsafe");var Eo,nu;function Fl(){if(nu)return Eo;nu=1;const e=ke();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),Eo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),Eo}p(Fl,"require_null");var Mo,lu;function Al(){if(lu)return Mo;lu=1;const e=ke();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),Mo=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),Mo}p(Al,"requireBool");var Oo,hu;function El(){if(hu)return Oo;hu=1;const e=Ni(),t=ke();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}p(r,"isHexCode");function i(c){return c>=48&&c<=55}p(i,"isOctCode");function s(c){return c>=48&&c<=57}p(s,"isDecCode");function a(c){if(c===null)return!1;const h=c.length;let u=0,g=!1;if(!h)return!1;let d=c[u];if((d==="-"||d==="+")&&(d=c[++u]),d==="0"){if(u+1===h)return!0;if(d=c[++u],d==="b"){for(u++;u<h;u++){if(d=c[u],d!=="0"&&d!=="1")return!1;g=!0}return g&&isFinite(o(c))}if(d==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;g=!0}return g&&isFinite(o(c))}if(d==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;g=!0}return g&&isFinite(o(c))}}for(;u<h;u++){if(!s(c.charCodeAt(u)))return!1;g=!0}return g?isFinite(o(c)):!1}p(a,"resolveYamlInteger");function o(c){let h=c,u=1,g=h[0];if((g==="-"||g==="+")&&(g==="-"&&(u=-1),h=h.slice(1),g=h[0]),h==="0")return 0;if(g==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}p(o,"parseYamlInteger");function n(c){return o(c)}p(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return p(l,"isInteger"),Oo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:l,represent:{binary:p(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:p(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:p(function(c){return c.toString(10)},"decimal"),hexadecimal:p(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Oo}p(El,"requireInt");var $o,cu;function Ml(){if(cu)return $o;cu=1;const e=Ni(),t=ke(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}p(s,"resolveYamlFloat");function a(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}p(a,"constructYamlFloat");const o=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return o.test(u)?u.replace("e",".e"):u}p(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return p(l,"isFloat"),$o=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:n,defaultStyle:"lowercase"}),$o}p(Ml,"requireFloat");var Do,uu;function Ol(){return uu||(uu=1,Do=_l().extend({implicit:[Fl(),Al(),El(),Ml()]})),Do}p(Ol,"requireJson");var Io,du;function $l(){return du||(du=1,Io=Ol()),Io}p($l,"requireCore");var Po,gu;function Dl(){if(gu)return Po;gu=1;const e=ke(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(o){return o===null?!1:t.exec(o)!==null||r.exec(o)!==null}p(i,"resolveYamlTimestamp");function s(o){let n=0,l=null,c=t.exec(o);if(c===null&&(c=r.exec(o)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,g=+c[3];if(!c[4])return new Date(Date.UTC(h,u,g));const d=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const C=+c[10],k=+(c[11]||0);l=(C*60+k)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,u,g,d,m,y,n));return l&&x.setTime(x.getTime()-l),x}p(s,"constructYamlTimestamp");function a(o){return o.toISOString()}return p(a,"representYamlTimestamp"),Po=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),Po}p(Dl,"requireTimestamp");var Ro,pu;function Il(){if(pu)return Ro;pu=1;const e=ke();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),Ro=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Ro}p(Il,"requireMerge");var qo,fu;function Pl(){if(fu)return qo;fu=1;const e=ke(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
277
+ \r`;function r(o){if(o===null)return!1;let n=0;const l=o.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(o.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}p(r,"resolveYamlBinary");function i(o){const n=o.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let d=0;d<l;d++)d%4===0&&d&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(d));const g=l%4*6;return g===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):g===18?(u.push(h>>10&255),u.push(h>>2&255)):g===12&&u.push(h>>4&255),new Uint8Array(u)}p(i,"constructYamlBinary");function s(o){let n="",l=0;const c=o.length,h=t;for(let g=0;g<c;g++)g%3===0&&g&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+o[g];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}p(s,"representYamlBinary");function a(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return p(a,"isBinary"),qo=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),qo}p(Pl,"requireBinary");var No,mu;function Rl(){if(mu)return No;mu=1;const e=ke(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const o=[],n=a;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let g;for(g in h)if(t.call(h,g))if(!u)u=!0;else return!1;if(!u)return!1;if(o.indexOf(g)===-1)o.push(g);else return!1}return!0}p(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return p(s,"constructYamlOmap"),No=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),No}p(Rl,"requireOmap");var Wo,yu;function ql(){if(yu)return Wo;yu=1;const e=ke(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;o[n]=[h[0],c[h[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n],h=Object.keys(c);o[n]=[h[0],c[h[0]]]}return o}return p(i,"constructYamlPairs"),Wo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Wo}p(ql,"requirePairs");var zo,Cu;function Nl(){if(Cu)return zo;Cu=1;const e=ke(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const o in a)if(t.call(a,o)&&a[o]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),zo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),zo}p(Nl,"requireSet");var Ho,xu;function Wa(){return xu||(xu=1,Ho=$l().extend({implicit:[Dl(),Il()],explicit:[Pl(),Rl(),ql(),Nl()]})),Ho}p(Wa,"require_default");var bu;function Lf(){if(bu)return Gs;bu=1;const e=Ni(),t=Wi(),r=vf(),i=Wa(),s=Object.prototype.hasOwnProperty,a=1,o=2,n=3,l=4,c=1,h=2,u=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(f){return Object.prototype.toString.call(f)}p(C,"_class");function k(f){return f===10||f===13}p(k,"isEol");function S(f){return f===9||f===32}p(S,"isWhiteSpace");function w(f){return f===9||f===32||f===10||f===13}p(w,"isWsOrEol");function v(f){return f===44||f===91||f===93||f===123||f===125}p(v,"isFlowIndicator");function _(f){if(f>=48&&f<=57)return f-48;const $=f|32;return $>=97&&$<=102?$-97+10:-1}p(_,"fromHexCode");function A(f){return f===120?2:f===117?4:f===85?8:0}p(A,"escapedHexLen");function F(f){return f>=48&&f<=57?f-48:-1}p(F,"fromDecimalCode");function X(f){switch(f){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
278
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(X,"simpleEscapeSequence");function N(f){return f<=65535?String.fromCharCode(f):String.fromCharCode((f-65536>>10)+55296,(f-65536&1023)+56320)}p(N,"charFromCodepoint");function W(f,$,V){$==="__proto__"?Object.defineProperty(f,$,{configurable:!0,enumerable:!0,writable:!0,value:V}):f[$]=V}p(W,"setProperty");const at=new Array(256),j=new Array(256);for(let f=0;f<256;f++)at[f]=X(f)?1:0,j[f]=X(f);function E(f,$){this.input=f,this.filename=$.filename||null,this.schema=$.schema||i,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth=="number"?$.maxDepth:100,this.maxTotalMergeKeys=typeof $.maxTotalMergeKeys=="number"?$.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=f.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(E,"State");function O(f,$){const V={name:f.filename,buffer:f.input.slice(0,-1),position:f.position,line:f.line,column:f.position-f.lineStart};return V.snippet=r(V),new t($,V)}p(O,"generateError");function L(f,$){throw O(f,$)}p(L,"throwError");function R(f,$){f.onWarning&&f.onWarning.call(null,O(f,$))}p(R,"throwWarning");function I(f,$,V){const Q=f.anchorMapTransactions;if(Q.length!==0){const G=Q[Q.length-1];s.call(G,$)||(G[$]={existed:s.call(f.anchorMap,$),value:f.anchorMap[$]})}f.anchorMap[$]=V}p(I,"storeAnchor");function H(f){f.anchorMapTransactions.push(Object.create(null))}p(H,"beginAnchorTransaction");function Z(f){const $=f.anchorMapTransactions.pop(),V=f.anchorMapTransactions;if(V.length===0)return;const Q=V[V.length-1],G=Object.keys($);for(let st=0,T=G.length;st<T;st+=1){const q=G[st];s.call(Q,q)||(Q[q]=$[q])}}p(Z,"commitAnchorTransaction");function ut(f){const $=f.anchorMapTransactions.pop(),V=Object.keys($);for(let Q=V.length-1;Q>=0;Q-=1){const G=$[V[Q]];G.existed?f.anchorMap[V[Q]]=G.value:delete f.anchorMap[V[Q]]}}p(ut,"rollbackAnchorTransaction");function gt(f){return{position:f.position,line:f.line,lineStart:f.lineStart,lineIndent:f.lineIndent,firstTabInLine:f.firstTabInLine,tag:f.tag,anchor:f.anchor,kind:f.kind,result:f.result}}p(gt,"snapshotState");function bt(f,$){f.position=$.position,f.line=$.line,f.lineStart=$.lineStart,f.lineIndent=$.lineIndent,f.firstTabInLine=$.firstTabInLine,f.tag=$.tag,f.anchor=$.anchor,f.kind=$.kind,f.result=$.result}p(bt,"restoreState");const Tt={YAML:p(function($,V,Q){$.version!==null&&L($,"duplication of %YAML directive"),Q.length!==1&&L($,"YAML directive accepts exactly one argument");const G=/^([0-9]+)\.([0-9]+)$/.exec(Q[0]);G===null&&L($,"ill-formed argument of the YAML directive");const st=parseInt(G[1],10),T=parseInt(G[2],10);st!==1&&L($,"unacceptable YAML version of the document"),$.version=Q[0],$.checkLineBreaks=T<2,T!==1&&T!==2&&R($,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function($,V,Q){let G;Q.length!==2&&L($,"TAG directive accepts exactly two arguments");const st=Q[0];G=Q[1],y.test(st)||L($,"ill-formed tag handle (first argument) of the TAG directive"),s.call($.tagMap,st)&&L($,'there is a previously declared suffix for "'+st+'" tag handle'),x.test(G)||L($,"ill-formed tag prefix (second argument) of the TAG directive");try{G=decodeURIComponent(G)}catch{L($,"tag prefix is malformed: "+G)}$.tagMap[st]=G},"handleTagDirective")};function nt(f,$,V,Q){if($<V){const G=f.input.slice($,V);if(Q)for(let st=0,T=G.length;st<T;st+=1){const q=G.charCodeAt(st);q===9||q>=32&&q<=1114111||L(f,"expected valid JSON character")}else g.test(G)&&L(f,"the stream contains non-printable characters");f.result+=G}}p(nt,"captureSegment");function Et(f,$,V,Q){e.isObject(V)||L(f,"cannot merge mappings; the provided source object is unacceptable");const G=Object.keys(V);for(let st=0,T=G.length;st<T;st+=1){const q=G[st];f.maxTotalMergeKeys!==-1&&++f.totalMergeKeys>f.maxTotalMergeKeys&&L(f,"merge keys exceeded maxTotalMergeKeys ("+f.maxTotalMergeKeys+")"),s.call($,q)||(W($,q,V[q]),Q[q]=!0)}}p(Et,"mergeMappings");function _t(f,$,V,Q,G,st,T,q,et){if(Array.isArray(G)){G=Array.prototype.slice.call(G);for(let K=0,J=G.length;K<J;K+=1)Array.isArray(G[K])&&L(f,"nested arrays are not supported inside keys"),typeof G=="object"&&C(G[K])==="[object Object]"&&(G[K]="[object Object]")}if(typeof G=="object"&&C(G)==="[object Object]"&&(G="[object Object]"),G=String(G),$===null&&($={}),Q==="tag:yaml.org,2002:merge")if(Array.isArray(st))for(let K=0,J=st.length;K<J;K+=1)Et(f,$,st[K],V);else Et(f,$,st,V);else!f.json&&!s.call(V,G)&&s.call($,G)&&(f.line=T||f.line,f.lineStart=q||f.lineStart,f.position=et||f.position,L(f,"duplicated mapping key")),W($,G,st),delete V[G];return $}p(_t,"storeMappingPair");function qt(f){const $=f.input.charCodeAt(f.position);$===10?f.position++:$===13?(f.position++,f.input.charCodeAt(f.position)===10&&f.position++):L(f,"a line break is expected"),f.line+=1,f.lineStart=f.position,f.firstTabInLine=-1}p(qt,"readLineBreak");function Lt(f,$,V){let Q=0,G=f.input.charCodeAt(f.position);for(;G!==0;){for(;S(G);)G===9&&f.firstTabInLine===-1&&(f.firstTabInLine=f.position),G=f.input.charCodeAt(++f.position);if($&&G===35)do G=f.input.charCodeAt(++f.position);while(G!==10&&G!==13&&G!==0);if(k(G))for(qt(f),G=f.input.charCodeAt(f.position),Q++,f.lineIndent=0;G===32;)f.lineIndent++,G=f.input.charCodeAt(++f.position);else break}return V!==-1&&Q!==0&&f.lineIndent<V&&R(f,"deficient indentation"),Q}p(Lt,"skipSeparationSpace");function lt(f){let $=f.position,V=f.input.charCodeAt($);return!!((V===45||V===46)&&V===f.input.charCodeAt($+1)&&V===f.input.charCodeAt($+2)&&($+=3,V=f.input.charCodeAt($),V===0||w(V)))}p(lt,"testDocumentSeparator");function ft(f,$){$===1?f.result+=" ":$>1&&(f.result+=e.repeat(`
279
+ `,$-1))}p(ft,"writeFoldedLines");function At(f,$,V){let Q,G,st,T,q,et;const K=f.kind,J=f.result;let it=f.input.charCodeAt(f.position);if(w(it)||v(it)||it===35||it===38||it===42||it===33||it===124||it===62||it===39||it===34||it===37||it===64||it===96)return!1;if(it===63||it===45){const tt=f.input.charCodeAt(f.position+1);if(w(tt)||V&&v(tt))return!1}for(f.kind="scalar",f.result="",Q=G=f.position,st=!1;it!==0;){if(it===58){const tt=f.input.charCodeAt(f.position+1);if(w(tt)||V&&v(tt))break}else if(it===35){const tt=f.input.charCodeAt(f.position-1);if(w(tt))break}else{if(f.position===f.lineStart&&lt(f)||V&&v(it))break;if(k(it))if(T=f.line,q=f.lineStart,et=f.lineIndent,Lt(f,!1,-1),f.lineIndent>=$){st=!0,it=f.input.charCodeAt(f.position);continue}else{f.position=G,f.line=T,f.lineStart=q,f.lineIndent=et;break}}st&&(nt(f,Q,G,!1),ft(f,f.line-T),Q=G=f.position,st=!1),S(it)||(G=f.position+1),it=f.input.charCodeAt(++f.position)}return nt(f,Q,G,!1),f.result?!0:(f.kind=K,f.result=J,!1)}p(At,"readPlainScalar");function Rt(f,$){let V,Q,G=f.input.charCodeAt(f.position);if(G!==39)return!1;for(f.kind="scalar",f.result="",f.position++,V=Q=f.position;(G=f.input.charCodeAt(f.position))!==0;)if(G===39)if(nt(f,V,f.position,!0),G=f.input.charCodeAt(++f.position),G===39)V=f.position,f.position++,Q=f.position;else return!0;else k(G)?(nt(f,V,Q,!0),ft(f,Lt(f,!1,$)),V=Q=f.position):f.position===f.lineStart&&lt(f)?L(f,"unexpected end of the document within a single quoted scalar"):(f.position++,S(G)||(Q=f.position));L(f,"unexpected end of the stream within a single quoted scalar")}p(Rt,"readSingleQuotedScalar");function Ut(f,$){let V,Q,G,st=f.input.charCodeAt(f.position);if(st!==34)return!1;for(f.kind="scalar",f.result="",f.position++,V=Q=f.position;(st=f.input.charCodeAt(f.position))!==0;){if(st===34)return nt(f,V,f.position,!0),f.position++,!0;if(st===92){if(nt(f,V,f.position,!0),st=f.input.charCodeAt(++f.position),k(st))Lt(f,!1,$);else if(st<256&&at[st])f.result+=j[st],f.position++;else if((G=A(st))>0){let T=G,q=0;for(;T>0;T--)st=f.input.charCodeAt(++f.position),(G=_(st))>=0?q=(q<<4)+G:L(f,"expected hexadecimal character");f.result+=N(q),f.position++}else L(f,"unknown escape sequence");V=Q=f.position}else k(st)?(nt(f,V,Q,!0),ft(f,Lt(f,!1,$)),V=Q=f.position):f.position===f.lineStart&&lt(f)?L(f,"unexpected end of the document within a double quoted scalar"):(f.position++,S(st)||(Q=f.position))}L(f,"unexpected end of the stream within a double quoted scalar")}p(Ut,"readDoubleQuotedScalar");function D(f,$){let V=!0,Q,G,st;const T=f.tag;let q;const et=f.anchor;let K,J,it,tt;const mt=Object.create(null);let ct,kt,vt,Nt=f.input.charCodeAt(f.position);if(Nt===91)K=93,tt=!1,q=[];else if(Nt===123)K=125,tt=!0,q={};else return!1;for(f.anchor!==null&&I(f,f.anchor,q),Nt=f.input.charCodeAt(++f.position);Nt!==0;){if(Lt(f,!0,$),Nt=f.input.charCodeAt(f.position),Nt===K)return f.position++,f.tag=T,f.anchor=et,f.kind=tt?"mapping":"sequence",f.result=q,!0;if(V?Nt===44&&L(f,"expected the node content, but found ','"):L(f,"missed comma between flow collection entries"),kt=ct=vt=null,J=it=!1,Nt===63){const Vt=f.input.charCodeAt(f.position+1);w(Vt)&&(J=it=!0,f.position++,Lt(f,!0,$))}Q=f.line,G=f.lineStart,st=f.position,ve(f,$,a,!1,!0),kt=f.tag,ct=f.result,Lt(f,!0,$),Nt=f.input.charCodeAt(f.position),(it||f.line===Q)&&Nt===58&&(J=!0,Nt=f.input.charCodeAt(++f.position),Lt(f,!0,$),ve(f,$,a,!1,!0),vt=f.result),tt?_t(f,q,mt,kt,ct,vt,Q,G,st):J?q.push(_t(f,null,mt,kt,ct,vt,Q,G,st)):q.push(ct),Lt(f,!0,$),Nt=f.input.charCodeAt(f.position),Nt===44?(V=!0,Nt=f.input.charCodeAt(++f.position)):V=!1}L(f,"unexpected end of the stream within a flow collection")}p(D,"readFlowCollection");function Ft(f,$){let V,Q=c,G=!1,st=!1,T=$,q=0,et=!1,K,J=f.input.charCodeAt(f.position);if(J===124)V=!1;else if(J===62)V=!0;else return!1;for(f.kind="scalar",f.result="";J!==0;)if(J=f.input.charCodeAt(++f.position),J===43||J===45)c===Q?Q=J===43?u:h:L(f,"repeat of a chomping mode identifier");else if((K=F(J))>=0)K===0?L(f,"bad explicit indentation width of a block scalar; it cannot be less than one"):st?L(f,"repeat of an indentation width identifier"):(T=$+K-1,st=!0);else break;if(S(J)){do J=f.input.charCodeAt(++f.position);while(S(J));if(J===35)do J=f.input.charCodeAt(++f.position);while(!k(J)&&J!==0)}for(;J!==0;){for(qt(f),f.lineIndent=0,J=f.input.charCodeAt(f.position);(!st||f.lineIndent<T)&&J===32;)f.lineIndent++,J=f.input.charCodeAt(++f.position);if(!st&&f.lineIndent>T&&(T=f.lineIndent),k(J)){q++;continue}if(!st&&T===0&&L(f,"missing indentation for block scalar"),f.lineIndent<T){Q===u?f.result+=e.repeat(`
280
+ `,G?1+q:q):Q===c&&G&&(f.result+=`
281
+ `);break}V?S(J)?(et=!0,f.result+=e.repeat(`
282
+ `,G?1+q:q)):et?(et=!1,f.result+=e.repeat(`
283
+ `,q+1)):q===0?G&&(f.result+=" "):f.result+=e.repeat(`
284
+ `,q):f.result+=e.repeat(`
285
+ `,G?1+q:q),G=!0,st=!0,q=0;const it=f.position;for(;!k(J)&&J!==0;)J=f.input.charCodeAt(++f.position);nt(f,it,f.position,!1)}return!0}p(Ft,"readBlockScalar");function zt(f,$){const V=f.tag,Q=f.anchor,G=[];let st=!1;if(f.firstTabInLine!==-1)return!1;f.anchor!==null&&I(f,f.anchor,G);let T=f.input.charCodeAt(f.position);for(;T!==0&&(f.firstTabInLine!==-1&&(f.position=f.firstTabInLine,L(f,"tab characters must not be used in indentation")),T===45);){const q=f.input.charCodeAt(f.position+1);if(!w(q))break;if(st=!0,f.position++,Lt(f,!0,-1)&&f.lineIndent<=$){G.push(null),T=f.input.charCodeAt(f.position);continue}const et=f.line;if(ve(f,$,n,!1,!0),G.push(f.result),Lt(f,!0,-1),T=f.input.charCodeAt(f.position),(f.line===et||f.lineIndent>$)&&T!==0)L(f,"bad indentation of a sequence entry");else if(f.lineIndent<$)break}return st?(f.tag=V,f.anchor=Q,f.kind="sequence",f.result=G,!0):!1}p(zt,"readBlockSequence");function we(f,$,V){let Q,G,st,T;const q=f.tag,et=f.anchor,K={},J=Object.create(null);let it=null,tt=null,mt=null,ct=!1,kt=!1;if(f.firstTabInLine!==-1)return!1;f.anchor!==null&&I(f,f.anchor,K);let vt=f.input.charCodeAt(f.position);for(;vt!==0;){!ct&&f.firstTabInLine!==-1&&(f.position=f.firstTabInLine,L(f,"tab characters must not be used in indentation"));const Nt=f.input.charCodeAt(f.position+1),Vt=f.line;if((vt===63||vt===58)&&w(Nt))vt===63?(ct&&(_t(f,K,J,it,tt,null,G,st,T),it=tt=mt=null),kt=!0,ct=!0,Q=!0):ct?(ct=!1,Q=!0):L(f,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),f.position+=1,vt=Nt;else{if(G=f.line,st=f.lineStart,T=f.position,!ve(f,V,o,!1,!0))break;if(f.line===Vt){for(vt=f.input.charCodeAt(f.position);S(vt);)vt=f.input.charCodeAt(++f.position);if(vt===58)vt=f.input.charCodeAt(++f.position),w(vt)||L(f,"a whitespace character is expected after the key-value separator within a block mapping"),ct&&(_t(f,K,J,it,tt,null,G,st,T),it=tt=mt=null),kt=!0,ct=!1,Q=!1,it=f.tag,tt=f.result;else if(kt)L(f,"can not read an implicit mapping pair; a colon is missed");else return f.tag=q,f.anchor=et,!0}else if(kt)L(f,"can not read a block mapping entry; a multiline key may not be an implicit key");else return f.tag=q,f.anchor=et,!0}if((f.line===Vt||f.lineIndent>$)&&(ct&&(G=f.line,st=f.lineStart,T=f.position),ve(f,$,l,!0,Q)&&(ct?tt=f.result:mt=f.result),ct||(_t(f,K,J,it,tt,mt,G,st,T),it=tt=mt=null),Lt(f,!0,-1),vt=f.input.charCodeAt(f.position)),(f.line===Vt||f.lineIndent>$)&&vt!==0)L(f,"bad indentation of a mapping entry");else if(f.lineIndent<$)break}return ct&&_t(f,K,J,it,tt,null,G,st,T),kt&&(f.tag=q,f.anchor=et,f.kind="mapping",f.result=K),kt}p(we,"readBlockMapping");function pe(f){let $=!1,V=!1,Q,G,st=f.input.charCodeAt(f.position);if(st!==33)return!1;f.tag!==null&&L(f,"duplication of a tag property"),st=f.input.charCodeAt(++f.position),st===60?($=!0,st=f.input.charCodeAt(++f.position)):st===33?(V=!0,Q="!!",st=f.input.charCodeAt(++f.position)):Q="!";let T=f.position;if($){do st=f.input.charCodeAt(++f.position);while(st!==0&&st!==62);f.position<f.length?(G=f.input.slice(T,f.position),st=f.input.charCodeAt(++f.position)):L(f,"unexpected end of the stream within a verbatim tag")}else{for(;st!==0&&!w(st);)st===33&&(V?L(f,"tag suffix cannot contain exclamation marks"):(Q=f.input.slice(T-1,f.position+1),y.test(Q)||L(f,"named tag handle cannot contain such characters"),V=!0,T=f.position+1)),st=f.input.charCodeAt(++f.position);G=f.input.slice(T,f.position),m.test(G)&&L(f,"tag suffix cannot contain flow indicator characters")}G&&!x.test(G)&&L(f,"tag name cannot contain such characters: "+G);try{G=decodeURIComponent(G)}catch{L(f,"tag name is malformed: "+G)}return $?f.tag=G:s.call(f.tagMap,Q)?f.tag=f.tagMap[Q]+G:Q==="!"?f.tag="!"+G:Q==="!!"?f.tag="tag:yaml.org,2002:"+G:L(f,'undeclared tag handle "'+Q+'"'),!0}p(pe,"readTagProperty");function Re(f){let $=f.input.charCodeAt(f.position);if($!==38)return!1;f.anchor!==null&&L(f,"duplication of an anchor property"),$=f.input.charCodeAt(++f.position);const V=f.position;for(;$!==0&&!w($)&&!v($);)$=f.input.charCodeAt(++f.position);return f.position===V&&L(f,"name of an anchor node must contain at least one character"),f.anchor=f.input.slice(V,f.position),!0}p(Re,"readAnchorProperty");function cr(f){let $=f.input.charCodeAt(f.position);if($!==42)return!1;$=f.input.charCodeAt(++f.position);const V=f.position;for(;$!==0&&!w($)&&!v($);)$=f.input.charCodeAt(++f.position);f.position===V&&L(f,"name of an alias node must contain at least one character");const Q=f.input.slice(V,f.position);return s.call(f.anchorMap,Q)||L(f,'unidentified alias "'+Q+'"'),f.result=f.anchorMap[Q],Lt(f,!0,-1),!0}p(cr,"readAlias");function Be(f,$,V,Q){const G=gt(f);return H(f),bt(f,$),f.tag=null,f.anchor=null,f.kind=null,f.result=null,we(f,V,Q)&&f.kind==="mapping"?(Z(f),!0):(ut(f),bt(f,G),!1)}p(Be,"tryReadBlockMappingFromProperty");function ve(f,$,V,Q,G){let st,T,q=1,et=!1,K=!1,J=null,it,tt,mt;f.depth>=f.maxDepth&&L(f,"nesting exceeded maxDepth ("+f.maxDepth+")"),f.depth+=1,f.listener!==null&&f.listener("open",f),f.tag=null,f.anchor=null,f.kind=null,f.result=null;const ct=st=T=l===V||n===V;if(Q&&Lt(f,!0,-1)&&(et=!0,f.lineIndent>$?q=1:f.lineIndent===$?q=0:f.lineIndent<$&&(q=-1)),q===1)for(;;){const kt=f.input.charCodeAt(f.position),vt=gt(f);if(et&&(kt===33&&f.tag!==null||kt===38&&f.anchor!==null)||!pe(f)&&!Re(f))break;J===null&&(J=vt),Lt(f,!0,-1)?(et=!0,T=ct,f.lineIndent>$?q=1:f.lineIndent===$?q=0:f.lineIndent<$&&(q=-1)):T=!1}if(T&&(T=et||G),q===1||l===V)if(a===V||o===V?tt=$:tt=$+1,mt=f.position-f.lineStart,q===1)if(T&&(zt(f,mt)||we(f,mt,tt))||D(f,tt))K=!0;else{const kt=f.input.charCodeAt(f.position);J!==null&&ct&&!T&&kt!==124&&kt!==62&&Be(f,J,J.position-J.lineStart,tt)||st&&Ft(f,tt)||Rt(f,tt)||Ut(f,tt)?K=!0:cr(f)?(K=!0,(f.tag!==null||f.anchor!==null)&&L(f,"alias node should not have any properties")):At(f,tt,a===V)&&(K=!0,f.tag===null&&(f.tag="?")),f.anchor!==null&&I(f,f.anchor,f.result)}else q===0&&(K=T&&zt(f,mt));if(f.tag===null)f.anchor!==null&&I(f,f.anchor,f.result);else if(f.tag==="?"){f.result!==null&&f.kind!=="scalar"&&L(f,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+f.kind+'"');for(let kt=0,vt=f.implicitTypes.length;kt<vt;kt+=1)if(it=f.implicitTypes[kt],it.resolve(f.result)){f.result=it.construct(f.result),f.tag=it.tag,f.anchor!==null&&I(f,f.anchor,f.result);break}}else if(f.tag!=="!"){if(s.call(f.typeMap[f.kind||"fallback"],f.tag))it=f.typeMap[f.kind||"fallback"][f.tag];else{it=null;const kt=f.typeMap.multi[f.kind||"fallback"];for(let vt=0,Nt=kt.length;vt<Nt;vt+=1)if(f.tag.slice(0,kt[vt].tag.length)===kt[vt].tag){it=kt[vt];break}}it||L(f,"unknown tag !<"+f.tag+">"),f.result!==null&&it.kind!==f.kind&&L(f,"unacceptable node kind for !<"+f.tag+'> tag; it should be "'+it.kind+'", not "'+f.kind+'"'),it.resolve(f.result,f.tag)?(f.result=it.construct(f.result,f.tag),f.anchor!==null&&I(f,f.anchor,f.result)):L(f,"cannot resolve a node with !<"+f.tag+"> explicit tag")}return f.listener!==null&&f.listener("close",f),f.depth-=1,f.tag!==null||f.anchor!==null||K}p(ve,"composeNode");function ur(f){const $=f.position;let V=!1,Q;for(f.version=null,f.checkLineBreaks=f.legacy,f.tagMap=Object.create(null),f.anchorMap=Object.create(null);(Q=f.input.charCodeAt(f.position))!==0&&(Lt(f,!0,-1),Q=f.input.charCodeAt(f.position),!(f.lineIndent>0||Q!==37));){V=!0,Q=f.input.charCodeAt(++f.position);let G=f.position;for(;Q!==0&&!w(Q);)Q=f.input.charCodeAt(++f.position);const st=f.input.slice(G,f.position),T=[];for(st.length<1&&L(f,"directive name must not be less than one character in length");Q!==0;){for(;S(Q);)Q=f.input.charCodeAt(++f.position);if(Q===35){do Q=f.input.charCodeAt(++f.position);while(Q!==0&&!k(Q));break}if(k(Q))break;for(G=f.position;Q!==0&&!w(Q);)Q=f.input.charCodeAt(++f.position);T.push(f.input.slice(G,f.position))}Q!==0&&qt(f),s.call(Tt,st)?Tt[st](f,st,T):R(f,'unknown document directive "'+st+'"')}if(Lt(f,!0,-1),f.lineIndent===0&&f.input.charCodeAt(f.position)===45&&f.input.charCodeAt(f.position+1)===45&&f.input.charCodeAt(f.position+2)===45?(f.position+=3,Lt(f,!0,-1)):V&&L(f,"directives end mark is expected"),ve(f,f.lineIndent-1,l,!1,!0),Lt(f,!0,-1),f.checkLineBreaks&&d.test(f.input.slice($,f.position))&&R(f,"non-ASCII line breaks are interpreted as content"),f.documents.push(f.result),f.position===f.lineStart&&lt(f)){f.input.charCodeAt(f.position)===46&&(f.position+=3,Lt(f,!0,-1));return}f.position<f.length-1&&L(f,"end of the stream or a document separator is expected")}p(ur,"readDocument");function dr(f,$){f=String(f),$=$||{},f.length!==0&&(f.charCodeAt(f.length-1)!==10&&f.charCodeAt(f.length-1)!==13&&(f+=`
286
+ `),f.charCodeAt(0)===65279&&(f=f.slice(1)));const V=new E(f,$),Q=f.indexOf("\0");for(Q!==-1&&(V.position=Q,L(V,"null byte is not allowed in input")),V.input+="\0";V.input.charCodeAt(V.position)===32;)V.lineIndent+=1,V.position+=1;for(;V.position<V.length-1;)ur(V);return V.documents}p(dr,"loadDocuments");function gr(f,$,V){$!==null&&typeof $=="object"&&typeof V>"u"&&(V=$,$=null);const Q=dr(f,V);if(typeof $!="function")return Q;for(let G=0,st=Q.length;G<st;G+=1)$(Q[G])}p(gr,"loadAll2");function Le(f,$){const V=dr(f,$);if(V.length!==0){if(V.length===1)return V[0];throw new t("expected a single document in the stream, but found more")}}return p(Le,"load2"),Gs.loadAll=gr,Gs.load=Le,Gs}p(Lf,"requireLoader");var jo={},ku;function _f(){if(ku)return jo;ku=1;const e=Ni(),t=Wi(),r=Wa(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,o=9,n=10,l=13,c=32,h=33,u=34,g=35,d=37,m=38,y=39,x=42,C=44,k=45,S=58,w=61,v=62,_=63,A=64,F=91,X=93,N=96,W=123,at=124,j=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const O=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],L=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(T,q){if(q===null)return{};const et={},K=Object.keys(q);for(let J=0,it=K.length;J<it;J+=1){let tt=K[J],mt=String(q[tt]);tt.slice(0,2)==="!!"&&(tt="tag:yaml.org,2002:"+tt.slice(2));const ct=T.compiledTypeMap.fallback[tt];ct&&s.call(ct.styleAliases,mt)&&(mt=ct.styleAliases[mt]),et[tt]=mt}return et}p(R,"compileStyleMap");function I(T){let q,et;const K=T.toString(16).toUpperCase();if(T<=255)q="x",et=2;else if(T<=65535)q="u",et=4;else if(T<=4294967295)q="U",et=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+q+e.repeat("0",et-K.length)+K}p(I,"encodeHex");const H=1,Z=2;function ut(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=R(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?Z:H,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(ut,"State");function gt(T,q){const et=e.repeat(" ",q);let K=0,J="";const it=T.length;for(;K<it;){let tt;const mt=T.indexOf(`
287
+ `,K);mt===-1?(tt=T.slice(K),K=it):(tt=T.slice(K,mt+1),K=mt+1),tt.length&&tt!==`
288
+ `&&(J+=et),J+=tt}return J}p(gt,"indentString");function bt(T,q){return`
289
+ `+e.repeat(" ",T.indent*q)}p(bt,"generateNextLine");function Tt(T,q){for(let et=0,K=T.implicitTypes.length;et<K;et+=1)if(T.implicitTypes[et].resolve(q))return!0;return!1}p(Tt,"testImplicitResolving");function nt(T){return T===c||T===o}p(nt,"isWhitespace");function Et(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==a||T>=65536&&T<=1114111}p(Et,"isPrintable");function _t(T){return Et(T)&&T!==a&&T!==l&&T!==n}p(_t,"isNsCharOrWhitespace");function qt(T,q,et){const K=_t(T),J=K&&!nt(T);return(et?K:K&&T!==C&&T!==F&&T!==X&&T!==W&&T!==j)&&T!==g&&!(q===S&&!J)||_t(q)&&!nt(q)&&T===g||q===S&&J}p(qt,"isPlainSafe");function Lt(T){return Et(T)&&T!==a&&!nt(T)&&T!==k&&T!==_&&T!==S&&T!==C&&T!==F&&T!==X&&T!==W&&T!==j&&T!==g&&T!==m&&T!==x&&T!==h&&T!==at&&T!==w&&T!==v&&T!==y&&T!==u&&T!==d&&T!==A&&T!==N}p(Lt,"isPlainSafeFirst");function lt(T){return!nt(T)&&T!==S}p(lt,"isPlainSafeLast");function ft(T,q){const et=T.charCodeAt(q);let K;return et>=55296&&et<=56319&&q+1<T.length&&(K=T.charCodeAt(q+1),K>=56320&&K<=57343)?(et-55296)*1024+K-56320+65536:et}p(ft,"codePointAt");function At(T){return/^\n* /.test(T)}p(At,"needIndentIndicator");const Rt=1,Ut=2,D=3,Ft=4,zt=5;function we(T,q,et,K,J,it,tt,mt){let ct,kt=0,vt=null,Nt=!1,Vt=!1;const Hi=K!==-1;let wr=-1,Ze=Lt(ft(T,0))&&lt(ft(T,T.length-1));if(q||tt)for(ct=0;ct<T.length;kt>=65536?ct+=2:ct++){if(kt=ft(T,ct),!Et(kt))return zt;Ze=Ze&&qt(kt,vt,mt),vt=kt}else{for(ct=0;ct<T.length;kt>=65536?ct+=2:ct++){if(kt=ft(T,ct),kt===n)Nt=!0,Hi&&(Vt=Vt||ct-wr-1>K&&T[wr+1]!==" ",wr=ct);else if(!Et(kt))return zt;Ze=Ze&&qt(kt,vt,mt),vt=kt}Vt=Vt||Hi&&ct-wr-1>K&&T[wr+1]!==" "}return!Nt&&!Vt?Ze&&!tt&&!J(T)?Rt:it===Z?zt:Ut:et>9&&At(T)?zt:tt?it===Z?zt:Ut:Vt?Ft:D}p(we,"chooseScalarStyle");function pe(T,q,et,K,J){T.dump=(function(){if(q.length===0)return T.quotingType===Z?'""':"''";if(!T.noCompatMode&&(O.indexOf(q)!==-1||L.test(q)))return T.quotingType===Z?'"'+q+'"':"'"+q+"'";const it=T.indent*Math.max(1,et),tt=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-it),mt=K||T.flowLevel>-1&&et>=T.flowLevel;function ct(kt){return Tt(T,kt)}switch(p(ct,"testAmbiguity"),we(q,mt,T.indent,tt,ct,T.quotingType,T.forceQuotes&&!K,J)){case Rt:return q;case Ut:return"'"+q.replace(/'/g,"''")+"'";case D:return"|"+Re(q,T.indent)+cr(gt(q,it));case Ft:return">"+Re(q,T.indent)+cr(gt(Be(q,tt),it));case zt:return'"'+ur(q)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(pe,"writeScalar");function Re(T,q){const et=At(T)?String(q):"",K=T[T.length-1]===`
290
+ `,it=K&&(T[T.length-2]===`
291
+ `||T===`
292
+ `)?"+":K?"":"-";return et+it+`
293
+ `}p(Re,"blockHeader");function cr(T){return T[T.length-1]===`
294
+ `?T.slice(0,-1):T}p(cr,"dropEndingNewline");function Be(T,q){const et=/(\n+)([^\n]*)/g;let K=(function(){let mt=T.indexOf(`
295
+ `);return mt=mt!==-1?mt:T.length,et.lastIndex=mt,ve(T.slice(0,mt),q)})(),J=T[0]===`
296
+ `||T[0]===" ",it,tt;for(;tt=et.exec(T);){const mt=tt[1],ct=tt[2];it=ct[0]===" ",K+=mt+(!J&&!it&&ct!==""?`
297
+ `:"")+ve(ct,q),J=it}return K}p(Be,"foldString");function ve(T,q){if(T===""||T[0]===" ")return T;const et=/ [^ ]/g;let K,J=0,it,tt=0,mt=0,ct="";for(;K=et.exec(T);)mt=K.index,mt-J>q&&(it=tt>J?tt:mt,ct+=`
298
+ `+T.slice(J,it),J=it+1),tt=mt;return ct+=`
299
+ `,T.length-J>q&&tt>J?ct+=T.slice(J,tt)+`
300
+ `+T.slice(tt+1):ct+=T.slice(J),ct.slice(1)}p(ve,"foldLine");function ur(T){let q="",et=0;for(let K=0;K<T.length;et>=65536?K+=2:K++){et=ft(T,K);const J=E[et];!J&&Et(et)?(q+=T[K],et>=65536&&(q+=T[K+1])):q+=J||I(et)}return q}p(ur,"escapeString");function dr(T,q,et){let K="";const J=T.tag;for(let it=0,tt=et.length;it<tt;it+=1){let mt=et[it];T.replacer&&(mt=T.replacer.call(et,String(it),mt)),(V(T,q,mt,!1,!1)||typeof mt>"u"&&V(T,q,null,!1,!1))&&(K!==""&&(K+=","+(T.condenseFlow?"":" ")),K+=T.dump)}T.tag=J,T.dump="["+K+"]"}p(dr,"writeFlowSequence");function gr(T,q,et,K){let J="";const it=T.tag;for(let tt=0,mt=et.length;tt<mt;tt+=1){let ct=et[tt];T.replacer&&(ct=T.replacer.call(et,String(tt),ct)),(V(T,q+1,ct,!0,!0,!1,!0)||typeof ct>"u"&&V(T,q+1,null,!0,!0,!1,!0))&&((!K||J!=="")&&(J+=bt(T,q)),T.dump&&n===T.dump.charCodeAt(0)?J+="-":J+="- ",J+=T.dump)}T.tag=it,T.dump=J||"[]"}p(gr,"writeBlockSequence");function Le(T,q,et){let K="";const J=T.tag,it=Object.keys(et);for(let tt=0,mt=it.length;tt<mt;tt+=1){let ct="";K!==""&&(ct+=", "),T.condenseFlow&&(ct+='"');const kt=it[tt];let vt=et[kt];T.replacer&&(vt=T.replacer.call(et,kt,vt)),V(T,q,kt,!1,!1)&&(T.dump.length>1024&&(ct+="? "),ct+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),V(T,q,vt,!1,!1)&&(ct+=T.dump,K+=ct))}T.tag=J,T.dump="{"+K+"}"}p(Le,"writeFlowMapping");function f(T,q,et,K){let J="";const it=T.tag,tt=Object.keys(et);if(T.sortKeys===!0)tt.sort();else if(typeof T.sortKeys=="function")tt.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let mt=0,ct=tt.length;mt<ct;mt+=1){let kt="";(!K||J!=="")&&(kt+=bt(T,q));const vt=tt[mt];let Nt=et[vt];if(T.replacer&&(Nt=T.replacer.call(et,vt,Nt)),!V(T,q+1,vt,!0,!0,!0))continue;const Vt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Vt&&(T.dump&&n===T.dump.charCodeAt(0)?kt+="?":kt+="? "),kt+=T.dump,Vt&&(kt+=bt(T,q)),V(T,q+1,Nt,!0,Vt)&&(T.dump&&n===T.dump.charCodeAt(0)?kt+=":":kt+=": ",kt+=T.dump,J+=kt)}T.tag=it,T.dump=J||"{}"}p(f,"writeBlockMapping");function $(T,q,et){const K=et?T.explicitTypes:T.implicitTypes;for(let J=0,it=K.length;J<it;J+=1){const tt=K[J];if((tt.instanceOf||tt.predicate)&&(!tt.instanceOf||typeof q=="object"&&q instanceof tt.instanceOf)&&(!tt.predicate||tt.predicate(q))){if(et?tt.multi&&tt.representName?T.tag=tt.representName(q):T.tag=tt.tag:T.tag="?",tt.represent){const mt=T.styleMap[tt.tag]||tt.defaultStyle;let ct;if(i.call(tt.represent)==="[object Function]")ct=tt.represent(q,mt);else if(s.call(tt.represent,mt))ct=tt.represent[mt](q,mt);else throw new t("!<"+tt.tag+'> tag resolver accepts not "'+mt+'" style');T.dump=ct}return!0}}return!1}p($,"detectType");function V(T,q,et,K,J,it,tt){T.tag=null,T.dump=et,$(T,et,!1)||$(T,et,!0);const mt=i.call(T.dump),ct=K;K&&(K=T.flowLevel<0||T.flowLevel>q);const kt=mt==="[object Object]"||mt==="[object Array]";let vt,Nt;if(kt&&(vt=T.duplicates.indexOf(et),Nt=vt!==-1),(T.tag!==null&&T.tag!=="?"||Nt||T.indent!==2&&q>0)&&(J=!1),Nt&&T.usedDuplicates[vt])T.dump="*ref_"+vt;else{if(kt&&Nt&&!T.usedDuplicates[vt]&&(T.usedDuplicates[vt]=!0),mt==="[object Object]")K&&Object.keys(T.dump).length!==0?(f(T,q,T.dump,J),Nt&&(T.dump="&ref_"+vt+T.dump)):(Le(T,q,T.dump),Nt&&(T.dump="&ref_"+vt+" "+T.dump));else if(mt==="[object Array]")K&&T.dump.length!==0?(T.noArrayIndent&&!tt&&q>0?gr(T,q-1,T.dump,J):gr(T,q,T.dump,J),Nt&&(T.dump="&ref_"+vt+T.dump)):(dr(T,q,T.dump),Nt&&(T.dump="&ref_"+vt+" "+T.dump));else if(mt==="[object String]")T.tag!=="?"&&pe(T,T.dump,q,it,ct);else{if(mt==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+mt)}if(T.tag!==null&&T.tag!=="?"){let Vt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Vt="!"+Vt:Vt.slice(0,18)==="tag:yaml.org,2002:"?Vt="!!"+Vt.slice(18):Vt="!<"+Vt+">",T.dump=Vt+" "+T.dump}}return!0}p(V,"writeNode");function Q(T,q){const et=[],K=[];G(T,et,K);const J=K.length;for(let it=0;it<J;it+=1)q.duplicates.push(et[K[it]]);q.usedDuplicates=new Array(J)}p(Q,"getDuplicateReferences");function G(T,q,et){if(T!==null&&typeof T=="object"){const K=q.indexOf(T);if(K!==-1)et.indexOf(K)===-1&&et.push(K);else if(q.push(T),Array.isArray(T))for(let J=0,it=T.length;J<it;J+=1)G(T[J],q,et);else{const J=Object.keys(T);for(let it=0,tt=J.length;it<tt;it+=1)G(T[J[it]],q,et)}}}p(G,"inspectNode");function st(T,q){q=q||{};const et=new ut(q);et.noRefs||Q(T,et);let K=T;return et.replacer&&(K=et.replacer.call({"":K},"",K)),V(et,0,K,!0,!0)?et.dump+`
301
+ `:""}return p(st,"dump2"),jo.dump=st,jo}p(_f,"requireDumper");var Tu;function Ff(){if(Tu)return fe;Tu=1;const e=Lf(),t=_f();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return p(r,"renamed"),fe.Type=ke(),fe.Schema=wl(),fe.FAILSAFE_SCHEMA=_l(),fe.JSON_SCHEMA=Ol(),fe.CORE_SCHEMA=$l(),fe.DEFAULT_SCHEMA=Wa(),fe.load=e.load,fe.loadAll=e.loadAll,fe.dump=t.dump,fe.YAMLException=Wi(),fe.types={binary:Pl(),float:Ml(),map:Ll(),null:Fl(),pairs:ql(),set:Nl(),timestamp:Dl(),bool:Al(),int:El(),merge:Il(),omap:Rl(),seq:vl(),str:Bl()},fe.safeLoad=r("safeLoad","load"),fe.safeLoadAll=r("safeLoadAll","loadAll"),fe.safeDump=r("safeDump","dump"),fe}p(Ff,"requireJsYaml");var ew=Ff(),rw=Bf(ew),{Type:c_,Schema:u_,FAILSAFE_SCHEMA:d_,JSON_SCHEMA:iw,CORE_SCHEMA:g_,DEFAULT_SCHEMA:p_,load:sw,loadAll:f_,dump:m_,YAMLException:y_,types:C_,safeLoad:x_,safeLoadAll:b_,safeDump:k_}=rw,aw={common:Bs,getConfig:te,insertCluster:Op,insertEdge:Ip,insertEdgeLabel:ul,insertMarkers:qp,insertNode:cl,interpolateToCurve:Wn,labelHelper:St,log:z,positionEdgeLabel:Ok},ks={},Af=p(e=>{for(const t of e)ks[t.name]=t},"registerLayoutLoaders"),ow=p(()=>{Af([{name:"dagre",loader:p(async()=>await Pt(()=>import("./dagre-GXQ25YYZ-QPjECY_W.js"),__vite__mapDeps([6,7,1,2,3,4,5]),import.meta.url),"loader")},{name:"swimlane",loader:p(async()=>await Pt(()=>import("./swimlanes-42K2YHIH-ILKBiMPk.js"),__vite__mapDeps([8,5,1,2,3,4]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await Pt(()=>import("./cose-bilkent-JH36ORCC-Dr_WUhVB.js"),__vite__mapDeps([9,10,2,3,5,1,4]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");ow();var T_=p(async(e,t)=>{if(!(e.layoutAlgorithm in ks))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=ks[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,aw,{algorithm:r.algorithm})},"render"),S_=p((e="",{fallback:t="dagre"}={})=>{if(e in ks)return e;if(t in ks)return z.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"),Wl="comm",Ef="rule",Mf="decl",nw="@media",lw="@import",hw="@supports",cw="@namespace",Sn="@keyframes",Of="@layer",uw="@scope",dw=Math.abs,fs=String.fromCharCode;function $f(e){return e.trim()}function wn(e,t,r){return e.replace(t,r)}function mi(e,t){return e.charCodeAt(t)|0}function Di(e,t,r){return e.slice(t,r)}function er(e){return e.length}function Df(e){return e.length}function Xs(e,t){return t.push(e),e}var za=1,Ii=1,If=0,ze=0,ae=0,zi="";function zl(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:za,column:Ii,length:o,return:"",siblings:n}}function gw(){return ae}function pw(){return ae=ze>0?mi(zi,--ze):0,Ii--,ae===10&&(Ii=1,za--),ae}function Ge(){return ae=ze<If?mi(zi,ze++):0,Ii++,ae===10&&(Ii=1,za++),ae}function Ar(){return mi(zi,ze)}function aa(){return ze}function Ha(e,t){return Di(zi,e,t)}function Ts(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 fw(e){return za=Ii=1,If=er(zi=e),ze=0,[]}function mw(e){return zi="",e}function Yo(e){return $f(Ha(ze-1,Bn(e===91?e+2:e===40?e+1:e)))}function yw(e){for(;(ae=Ar())&&ae<33;)Ge();return Ts(e)>2||Ts(ae)>3?"":" "}function Cw(e,t){for(;--t&&Ge()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return Ha(e,aa()+(t<6&&Ar()==32&&Ge()==32))}function Bn(e){for(;Ge();)switch(ae){case e:return ze;case 34:case 39:e!==34&&e!==39&&Bn(ae);break;case 40:e===41&&Bn(e);break;case 92:Ge();break}return ze}function xw(e,t){for(;Ge()&&e+ae!==57;)if(e+ae===84&&Ar()===47)break;return"/*"+Ha(t,ze-1)+"*"+fs(e===47?e:Ge())}function bw(e){for(;!Ts(Ar());)Ge();return Ha(e,ze)}function kw(e){return mw(oa("",null,null,null,[""],e=fw(e),0,[0],e))}function oa(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,g=0,d=0,m=0,y=1,x=1,C=1,k=0,S=0,w="",v=s,_=a,A=i,F=w;x;)switch(m=S,S=Ge()){case 40:m!=108&&mi(F,u-1)==58?(k++,F+="("):F+=Yo(S);break;case 41:k--,F+=")";break;case 34:case 39:case 91:F+=Yo(S);break;case 9:case 10:case 13:case 32:if(k>0){F+=fs(S);break}F+=yw(m);break;case 92:F+=Cw(aa()-1,7);continue;case 47:switch(Ar()){case 42:case 47:Xs(Tw(xw(Ge(),aa()),t,r,l),l),(Ts(m||1)==5||Ts(Ar()||1)==5)&&er(F)&&Di(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:n[c++]=er(F)*C;case 125*y:case 59:case 0:if(k>0&&S){F+=fs(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(F=wn(F,/\f/g,"")),d>0&&(er(F)-u||y===0)&&Xs(d>32?wu(F+";",i,r,u-1,l):wu(wn(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(Xs(A=Su(F,t,r,c,h,s,n,w,v=[],_=[],u,a),a),S===123)if(h===0)oa(F,t,A,A,v,a,u,n,_);else{switch(g){case 99:if(mi(F,3)===110)break;case 108:if(mi(F,2)===97)break;default:h=0;case 100:case 109:case 115:}h?oa(e,A,A,i&&Xs(Su(e,A,A,0,0,s,n,w,s,v=[],u,_),_),s,_,u,n,i?v:_):oa(F,A,A,A,[""],_,0,n,_)}}c=h=d=0,y=C=1,w=F="",u=o;break;case 58:u=1+er(F),d=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&pw()==125)continue}switch(F+=fs(S),S*y){case 38:C=h>0?1:(F+="\f",-1);break;case 44:if(k>0)break;n[c++]=(er(F)-1)*C,C=1;break;case 64:Ar()===45&&(F+=Yo(Ge())),g=Ar(),h=u=er(w=F+=bw(aa())),S++;break;case 45:m===45&&er(F)==2&&(y=0)}}return a}function Su(e,t,r,i,s,a,o,n,l,c,h,u){for(var g=s-1,d=s===0?a:[""],m=Df(d),y=0,x=0,C=0;y<i;++y)for(var k=0,S=Di(e,g+1,g=dw(x=o[y])),w=e;k<m;++k)(w=$f(x>0?d[k]+" "+S:wn(S,/&\f/g,d[k])))&&(l[C++]=w);return zl(e,t,r,s===0?Ef:n,l,c,h,u)}function Tw(e,t,r,i){return zl(e,t,r,Wl,fs(gw()),Di(e,2,-2),0,i)}function wu(e,t,r,i,s){return zl(e,t,r,Mf,Di(e,0,i),Di(e,i+1,-1),i,s)}function vn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Sw(e,t,r,i){switch(e.type){case Of:if(e.children.length)break;case lw:case cw:case Mf:return e.return=e.return||e.value;case Wl:return"";case Sn:return e.return=e.value+"{"+vn(e.children,i)+"}";case Ef:if(!er(e.value=e.props.join(",")))return""}return er(r=vn(e.children,i))?e.return=e.value+"{"+r+"}":""}function ww(e){var t=Df(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var Pf="c4",Bw=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),vw=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-DXh9Ebug.js");return{diagram:t}},__vite__mapDeps([11,12,5,1,2,3,4]),import.meta.url);return{id:Pf,diagram:e}},"loader"),Lw={id:Pf,detector:Bw,loader:vw},_w=Lw,Rf="flowchart",Fw=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),Aw=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D2o5XxIm.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,16,12,17]),import.meta.url);return{id:Rf,diagram:e}},"loader"),Ew={id:Rf,detector:Fw,loader:Aw},Mw=Ew,qf="flowchart-v2",Ow=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),$w=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D2o5XxIm.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,16,12,17]),import.meta.url);return{id:qf,diagram:e}},"loader"),Dw={id:qf,detector:Ow,loader:$w},Iw=Dw,Nf="swimlane",Pw=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Rw=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-D-ke9u7H.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,5,16,12,17,1,2,3,4]),import.meta.url);return{id:Nf,diagram:e}},"loader"),qw={id:Nf,detector:Pw,loader:Rw},Nw=qw,Wf="er",Ww=p(e=>/^\s*erDiagram/.test(e),"detector"),zw=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-TcPkrxxF.js");return{diagram:t}},__vite__mapDeps([19,15,5,16,17,1,2,3,4]),import.meta.url);return{id:Wf,diagram:e}},"loader"),Hw={id:Wf,detector:Ww,loader:zw},jw=Hw,zf="gitGraph",Yw=p(e=>/^\s*gitGraph/.test(e),"detector"),Uw=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-DoayvLMW.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,1,2,3,4,5]),import.meta.url);return{id:zf,diagram:e}},"loader"),Gw={id:zf,detector:Yw,loader:Uw},Xw=Gw,Hf="gantt",Vw=p(e=>/^\s*gantt/.test(e),"detector"),Zw=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-D36iMZvH.js");return{diagram:t}},__vite__mapDeps([24,2,3,5,25,26,27,28,1,4]),import.meta.url);return{id:Hf,diagram:e}},"loader"),Kw={id:Hf,detector:Vw,loader:Zw},Qw=Kw,jf="info",Jw=p(e=>/^\s*info/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-DbMBXMvx.js");return{diagram:t}},__vite__mapDeps([29,23,1,2,3,4,5]),import.meta.url);return{id:jf,diagram:e}},"loader"),eB={id:jf,detector:Jw,loader:tB},Yf="pie",rB=p(e=>/^\s*pie/.test(e),"detector"),iB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-Btcl-uz0.js");return{diagram:t}},__vite__mapDeps([30,22,23,1,2,3,4,5,31,32,27,33]),import.meta.url);return{id:Yf,diagram:e}},"loader"),sB={id:Yf,detector:rB,loader:iB},Uf="quadrantChart",aB=p(e=>/^\s*quadrantChart/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-CA7HBTBO.js");return{diagram:t}},__vite__mapDeps([34,5,26,27,28,1,2,3,4]),import.meta.url);return{id:Uf,diagram:e}},"loader"),nB={id:Uf,detector:aB,loader:oB},lB=nB,Gf="xychart",hB=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-CHtC3u6M.js");return{diagram:t}},__vite__mapDeps([35,5,36,27,32,26,28,1,2,3,4]),import.meta.url);return{id:Gf,diagram:e}},"loader"),uB={id:Gf,detector:hB,loader:cB},dB=uB,Xf="requirement",gB=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),pB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-C70GJhMZ.js");return{diagram:t}},__vite__mapDeps([37,15,5,16,1,2,3,4]),import.meta.url);return{id:Xf,diagram:e}},"loader"),fB={id:Xf,detector:gB,loader:pB},mB=fB,Vf="sequence",yB=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),CB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-DtmTM2Q1.js");return{diagram:t}},__vite__mapDeps([38,21,12,5,1,2,3,4]),import.meta.url);return{id:Vf,diagram:e}},"loader"),xB={id:Vf,detector:yB,loader:CB},bB=xB,Zf="class",kB=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),TB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-Cjli-tvb.js");return{diagram:t}},__vite__mapDeps([39,40,14,15,5,16,12,1,2,3,4]),import.meta.url);return{id:Zf,diagram:e}},"loader"),SB={id:Zf,detector:kB,loader:TB},wB=SB,Kf="classDiagram",BB=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),vB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-Cjli-tvb.js");return{diagram:t}},__vite__mapDeps([41,40,14,15,5,16,12,1,2,3,4]),import.meta.url);return{id:Kf,diagram:e}},"loader"),LB={id:Kf,detector:BB,loader:vB},_B=LB,Qf="state",FB=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),AB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-Dc057ccO.js");return{diagram:t}},__vite__mapDeps([42,43,15,5,16,12,7,1,2,3,4]),import.meta.url);return{id:Qf,diagram:e}},"loader"),EB={id:Qf,detector:FB,loader:AB},MB=EB,Jf="stateDiagram",OB=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),$B=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-D6iIkIH3.js");return{diagram:t}},__vite__mapDeps([44,43,15,5,16,12,1,2,3,4]),import.meta.url);return{id:Jf,diagram:e}},"loader"),DB={id:Jf,detector:OB,loader:$B},IB=DB,tm="journey",PB=p(e=>/^\s*journey/.test(e),"detector"),RB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-C3h3msUP.js");return{diagram:t}},__vite__mapDeps([45,14,12,5,31,1,2,3,4]),import.meta.url);return{id:tm,diagram:e}},"loader"),qB={id:tm,detector:PB,loader:RB},NB=qB,WB=p((e,t,r)=>{z.debug(`rendering svg for syntax error
302
+ `);const i=l0(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),nd(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),em={draw:WB},zB=em,HB={db:{},renderer:em,parser:{parse:p(()=>{},"parse")}},jB=HB,rm="flowchart-elk",YB=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),UB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-D2o5XxIm.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,16,12,17]),import.meta.url);return{id:rm,diagram:e}},"loader"),GB={id:rm,detector:YB,loader:UB},XB=GB,im="timeline",VB=p(e=>/^\s*timeline/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-BckRkRye.js");return{diagram:t}},__vite__mapDeps([46,5,31,1,2,3,4]),import.meta.url);return{id:im,diagram:e}},"loader"),KB={id:im,detector:VB,loader:ZB},QB=KB,sm="mindmap",JB=p(e=>/^\s*mindmap/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-Dz0JwUgH.js");return{diagram:t}},__vite__mapDeps([47,15,5,16,1,2,3,4]),import.meta.url);return{id:sm,diagram:e}},"loader"),ev={id:sm,detector:JB,loader:tv},rv=ev,am="kanban",iv=p(e=>/^\s*kanban/.test(e),"detector"),sv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-C1b6cL5N.js");return{diagram:t}},__vite__mapDeps([48,14,1,2,3,4,5]),import.meta.url);return{id:am,diagram:e}},"loader"),av={id:am,detector:iv,loader:sv},ov=av,om="sankey",nv=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-BJl2AqaQ.js");return{diagram:t}},__vite__mapDeps([49,5,32,27,50,1,2,3,4]),import.meta.url);return{id:om,diagram:e}},"loader"),hv={id:om,detector:nv,loader:lv},cv=hv,nm="packet",uv=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-DsT5qGVe.js");return{diagram:t}},__vite__mapDeps([51,22,23,1,2,3,4,5]),import.meta.url);return{id:nm,diagram:e}},"loader"),gv={id:nm,detector:uv,loader:dv},lm="radar",pv=p(e=>/^\s*radar-beta/.test(e),"detector"),fv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-Bo8gzrdx.js");return{diagram:t}},__vite__mapDeps([52,22,23,1,2,3,4,5]),import.meta.url);return{id:lm,diagram:e}},"loader"),mv={id:lm,detector:pv,loader:fv},hm="block",yv=p(e=>/^\s*block(-beta)?/.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-Dx9xiTwp.js");return{diagram:t}},__vite__mapDeps([53,14,5,17,1,2,3,4]),import.meta.url);return{id:hm,diagram:e}},"loader"),xv={id:hm,detector:yv,loader:Cv},bv=xv,cm="treeView",kv=p(e=>/^\s*treeView-beta/.test(e),"detector"),Tv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-CwZRApeF.js");return{diagram:t}},__vite__mapDeps([54,21,22,23,1,2,3,4,5]),import.meta.url);return{id:cm,diagram:e}},"loader"),Sv={id:cm,detector:kv,loader:Tv},wv=Sv,um="architecture",Bv=p(e=>/^\s*architecture/.test(e),"detector"),vv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-DCEYr1uX.js");return{diagram:t}},__vite__mapDeps([55,22,23,1,2,3,4,10,5]),import.meta.url);return{id:um,diagram:e}},"loader"),Lv={id:um,detector:Bv,loader:vv},_v=Lv,dm="eventmodeling",Fv=p(e=>/^\s*eventmodeling/.test(e),"detector"),Av=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-0w4db5zY.js");return{diagram:t}},__vite__mapDeps([56,22,23,1,2,3,4,5]),import.meta.url);return{id:dm,diagram:e}},"loader"),Ev={id:dm,detector:Fv,loader:Av},Mv=Ev,gm="ishikawa",Ov=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),$v=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-j9THtiQE.js");return{diagram:t}},__vite__mapDeps([57,1,2,3,4,5]),import.meta.url);return{id:gm,diagram:e}},"loader"),Dv={id:gm,detector:Ov,loader:$v},pm="venn",Iv=p(e=>/^\s*venn-beta/.test(e),"detector"),Pv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-Bxkq0y0p.js");return{diagram:t}},__vite__mapDeps([58,5,1,2,3,4]),import.meta.url);return{id:pm,diagram:e}},"loader"),Rv={id:pm,detector:Iv,loader:Pv},qv=Rv,fm="treemap",Nv=p(e=>/^\s*treemap/.test(e),"detector"),Wv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-DJvH_pmt.js");return{diagram:t}},__vite__mapDeps([59,22,16,23,1,2,3,4,5,28,32,27,60]),import.meta.url);return{id:fm,diagram:e}},"loader"),zv={id:fm,detector:Nv,loader:Wv},mm="wardley",Hv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),jv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-CaTbamBI.js");return{diagram:t}},__vite__mapDeps([61,22,23,1,2,3,4,5]),import.meta.url);return{id:mm,diagram:e}},"loader"),Yv={id:mm,detector:Hv,loader:jv},Uv=Yv,ym="cynefin",Gv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Xv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-BLqywzF8.js");return{diagram:t}},__vite__mapDeps([62,22,23,1,2,3,4,5]),import.meta.url);return{id:ym,diagram:e}},"loader"),Vv={id:ym,detector:Gv,loader:Xv},Cm="railroad",Zv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Kv=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-B7dkMwzi.js");return{diagram:t}},__vite__mapDeps([63,64,22,5,23,1,2,3,4]),import.meta.url);return{id:Cm,diagram:e}},"loader"),Qv={id:Cm,detector:Zv,loader:Kv},xm="railroadEbnf",Jv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),tL=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-BoB0yBxV.js");return{diagram:t}},__vite__mapDeps([65,64,22,5,23,1,2,3,4]),import.meta.url);return{id:xm,diagram:e}},"loader"),eL={id:xm,detector:Jv,loader:tL},bm="railroadAbnf",rL=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),iL=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-Ca-5zS8J.js");return{diagram:t}},__vite__mapDeps([66,64,22,5,23,1,2,3,4]),import.meta.url);return{id:bm,diagram:e}},"loader"),sL={id:bm,detector:rL,loader:iL},km="railroadPeg",aL=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),oL=p(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BEOg8IHd.js");return{diagram:t}},__vite__mapDeps([67,64,22,5,23,1,2,3,4]),import.meta.url);return{id:km,diagram:e}},"loader"),nL={id:km,detector:aL,loader:oL},Bu=!1,ja=p(()=>{Bu||(Bu=!0,ua("error",jB,e=>e.toLowerCase().trim()==="error"),ua("---",{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("---")),Ko(XB,rv,_v),Ko(_w,ov,_B,wB,jw,Qw,eB,sB,mB,bB,Nw,Iw,Mw,QB,Xw,IB,MB,NB,lB,cv,gv,dB,bv,Mv,wv,mv,Dv,zv,Qv,eL,sL,nL,qv,Uv,Vv))},"addDiagrams"),lL=p(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Ur).map(async([r,{detector:i,loader:s}])=>{if(s)try{en(r)}catch{try{const{diagram:a,id:o}=await s();ua(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ur[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),hL="graphics-document document";function Tm(e,t){e.attr("role",hL),t!==""&&e.attr("aria-roledescription",t)}p(Tm,"setA11yDiagramInfo");function Sm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(Sm,"addSVGa11yTitleDescription");var jr,Ln=(jr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=te(),s=En(t,i);t=Ax(t)+`
303
+ `;try{en(s)}catch{const u=MC(s);if(!u)throw new ed(`Diagram ${s} not found.`);const{id:g,diagram:d}=await u();ua(g,d)}const{db:a,parser:o,renderer:n,init:l}=en(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new jr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(jr,"Diagram"),jr),vu=[],cL=p(()=>{vu.forEach(e=>{e()}),vu=[]},"attachFunctions"),uL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function wm(e){const t=e.match(td);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
304
+ `).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
305
+ `):t[2];let s=sw(i,{schema:iw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}p(wm,"extractFrontMatter");var dL=p(e=>e.replace(/\r\n?/g,`
306
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),gL=p(e=>{const{text:t,metadata:r}=wm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),pL=p(e=>{const t=xe.detectInit(e)??{},r=xe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:yx(e),directive:t}},"processDirectives");function Hl(e){const t=dL(e),r=gL(t),i=pL(r.text),s=Un(r.config,i.directive);return e=uL(i.text),{code:e,title:r.title,config:s}}p(Hl,"preprocessDiagram");function Bm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Bm,"toBase64");var fL=5e4,mL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",yL="sandbox",CL="loose",xL="http://www.w3.org/2000/svg",bL="http://www.w3.org/1999/xlink",kL="http://www.w3.org/1999/xhtml",TL="100%",SL="100%",wL="border:0;margin:0;",BL="margin:0",vL="allow-top-navigation-by-user-activation allow-popups",LL='The "iframe" tag is not supported by your browser.',_L=["foreignobject"],FL=["dominant-baseline"];function jl(e){const t=Hl(e);return ha(),_C(t.config??{}),t}p(jl,"processAndSetConfigs");async function vm(e,t){ja();try{const{code:r,config:i}=jl(e);return{diagramType:(await _m(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}p(vm,"parse");var Lu=p((e,t,r=[])=>{const i=Vu(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),AL=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=be(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Ih(l.styles)||n.forEach(c=>{r.insertRule(Lu(l.id,c,l.styles),r.cssRules.length)}),Ih(l.textStyles)||r.insertRule(Lu(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=tn(s)+`
307
+ `}else i+=`${e.themeCSS}
308
+ `;return i+tn(r)},"createCssStyles"),EL=p((e,t)=>vn(kw(`${e}{${t}}`),ww([p(function(i,s,a,o){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Sn)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[nw,hw,Of,uw,"@container","@starting-style"],Sn].includes(i.type)||(z.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Wl))},"addNamespace"),Sw])),"compileCSS"),ML=p((e,t,r,i)=>{const s=AL(e,r),a=ZC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return EL(i,a)},"createUserStyles"),OL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Mr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),$L=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":SL,i=Bm(`<body style="${BL}">${e}</body>`);return`<iframe style="width:${TL};height:${r};${wL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${vL}">
309
+ ${LL}
310
+ </iframe>`},"putIntoIFrame"),_u=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",xL);return s&&o.attr("xmlns:xlink",s),o.append("g"),e},"appendDivSvgG");function _n(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(_n,"sandboxedIframe");var DL=p((e,t,r,i)=>{var s,a,o;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),IL=p(async function(e,t,r){var j,E,O,L,R,I;ja();const i=jl(t);t=i.code;const s=te();z.debug(s),t.length>((s==null?void 0:s.maxTextSize)??fL)&&(t=mL);const a=`#${e}`,o="i"+e,n="#"+o,l="d"+e,c="#"+l,h=p(()=>{const Z=It(g?n:c).node();Z&&"remove"in Z&&Z.remove()},"removeTempElements");let u=It(document.body);const g=s.securityLevel===yL,d=s.securityLevel===CL,m=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const H=_n(It(r),o);u=It(H.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=It(r);_u(u,e,l,`font-family: ${m}`,bL)}else{if(DL(document,e,l,o),g){const H=_n(It(document.body),o);u=It(H.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=It("body");_u(u,e,l)}let y,x;try{y=await Ln.fromText(t,{title:i.title})}catch(H){if(s.suppressErrorRendering)throw h(),H;y=await Ln.fromText("error"),x=H}const C=u.select(c).node(),k=y.type,S=C.firstChild,w=S.firstChild,v=(E=(j=y.renderer).getClasses)==null?void 0:E.call(j,t,y),_=ML(s,k,v,a),A=document.createElement("style");A.innerHTML=_,S.insertBefore(A,w);try{await y.renderer.draw(t,e,"11.17.2",y)}catch(H){throw s.suppressErrorRendering?h():zB.draw(t,e,"11.17.2"),H}const F=u.select(`${c} svg`),X=(L=(O=y.db).getAccTitle)==null?void 0:L.call(O),N=(I=(R=y.db).getAccDescription)==null?void 0:I.call(R);Fm(k,F,X,N);const at=p(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",kL);let H=u.select(c).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),H=OL(H,g,lr(s.arrowMarkerAbsolute)),g){const Z=u.select(c+" svg").node();H=$L(H,Z)}else d||(H=Mi.sanitize(H,{ADD_TAGS:_L,ADD_ATTR:FL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return cL(),H},"serializeSvg")();if(x)throw x;return h(),{diagramType:k,svg:at,bindFunctions:y.db.bindFunctions}},"render");function Lm(e={}){var i;const t=ce({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),vC(t),t!=null&&t.theme&&t.theme in Cr?t.themeVariables=Cr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Cr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?BC(t):Zu();An(r.logLevel),ja()}p(Lm,"initialize");var _m=p((e,t={})=>{const{code:r}=Hl(e);return Ln.fromText(r,t)},"getDiagramFromText");function Fm(e,t,r,i){Tm(t,e),Sm(t,r,i,t.attr("id"))}p(Fm,"addA11yInfo");var Kr=Object.freeze({render:IL,parse:vm,getDiagramFromText:_m,initialize:Lm,getConfig:te,setConfig:Ku,getSiteConfig:Zu,updateSiteConfig:LC,reset:p(()=>{ha()},"reset"),globalReset:p(()=>{ha(Oi)},"globalReset"),defaultConfig:Oi});An(te().logLevel);ha(te());var PL=p((e,t,r)=>{z.warn(e),Yn(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"),Am=p(async function(e={querySelector:".mermaid"}){try{await RL(e)}catch(t){if(Yn(t)&&z.error(t.str),Pe.parseError&&Pe.parseError(t),!e.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),t}},"run"),RL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Kr.getConfig();z.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Kr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new xe.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const n=[];for(const l of Array.from(s)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=qd(xe.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=xe.detectInit(o);h&&z.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:g}=await $m(c,o,l);l.innerHTML=u,e&&await e(c),g&&g(l)}catch(u){PL(u,n,Pe.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Em=p(function(e){Kr.initialize(e)},"initialize"),qL=p(async function(e,t,r){z.warn("mermaid.init is deprecated. Please use run instead."),e&&Em(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Am(i)},"init"),NL=p(async(e,{lazyLoad:t=!0}={})=>{ja(),Ko(...e),t===!1&&await lL()},"registerExternalDiagrams"),Mm=p(function(){if(Pe.startOnLoad){const{startOnLoad:e}=Kr.getConfig();e&&Pe.run().catch(t=>z.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Mm,!1);var WL=p(function(e){Pe.parseError=e},"setParseErrorHandler"),wa=[],Uo=!1,Om=p(async()=>{if(!Uo){for(Uo=!0;wa.length>0;){const e=wa.shift();if(e)try{await e()}catch(t){z.error("Error executing queue",t)}}Uo=!1}},"executeQueue"),zL=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,o)=>{Kr.parse(e,t).then(n=>{a(n),r(n)},n=>{var l;z.error("Error parsing",n),(l=Pe.parseError)==null||l.call(Pe,n),o(n),i(n)})}),"performCall");wa.push(s),Om().catch(i)}),"parse"),$m=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((o,n)=>{Kr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;z.error("Error parsing",l),(c=Pe.parseError)==null||c.call(Pe,l),n(l),s(l)})}),"performCall");wa.push(a),Om().catch(s)}),"render"),HL=p(()=>Object.keys(Ur).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Pe={startOnLoad:!0,mermaidAPI:Kr,parse:zL,render:$m,init:qL,run:Am,registerExternalDiagrams:NL,registerLayoutLoaders:Af,initialize:Em,parseError:void 0,contentLoaded:Mm,setParseErrorHandler:WL,detectType:En,registerIconPacks:O0,getRegisteredDiagramsMetadata:HL},jL=Pe;/*! Check if previously processed *//*!
311
+ * Wait for document loaded before starting the execution
312
+ */const w_=Object.freeze(Object.defineProperty({__proto__:null,clearLayoutRenderState:kl,createCommonLayoutRenderer:yf,default:jL,defaultMeasureLayout:Tl,paintLayoutData:Sl},Symbol.toStringTag,{value:"Module"}));export{ld as $,a0 as A,Un as B,sr as C,Xu as D,Tx as E,l0 as F,va as G,aC as H,wb as I,JL as J,sw as K,iw as L,ms as M,QL as N,qC as O,od as P,Mi as Q,Bh as R,Na as S,kx as T,Dt as U,Xe as V,Y as W,U as X,GC as Y,gx as Z,p as _,JC as a,Up as a$,Op as a0,cl as a1,Cc as a2,vs as a3,O0 as a4,jn as a5,pt as a6,xt as a7,hd as a8,h_ as a9,z0 as aA,tx as aB,J0 as aC,Q0 as aD,rx as aE,ex as aF,W0 as aG,md as aH,G0 as aI,Y0 as aJ,j0 as aK,yd as aL,qp as aM,wd as aN,Wu as aO,KL as aP,Ve as aQ,M0 as aR,dy as aS,t_ as aT,dl as aU,gl as aV,Lc as aW,Yp as aX,Da as aY,jp as aZ,Q1 as a_,l_ as aa,yf as ab,Ht as ac,nf as ad,Ct as ae,n_ as af,Sa as ag,hf as ah,Ma as ai,ul as aj,Ip as ak,Ok as al,Ce as am,qn as an,Pn as ao,ta as ap,K0 as aq,Z0 as ar,V0 as as,X0 as at,N0 as au,pd as av,H0 as aw,q0 as ax,U0 as ay,fd as az,QC as b,P2 as b0,ST as b1,z1 as b2,K1 as b3,R2 as b4,Vr as b5,qi as b6,kr as b7,zc as b8,ar as b9,bT as bA,Rr as bB,ls as bC,ui as bD,Us as bE,ko as bF,HS as bG,yk as bH,w_ as bI,yr as ba,O2 as bb,Mc as bc,Ta as bd,xr as be,H1 as bf,Oe as bg,Ic as bh,fl as bi,$S as bj,Ia as bk,ka as bl,ES as bm,of as bn,rr as bo,j1 as bp,bl as bq,zp as br,DS as bs,MS as bt,TS as bu,$a as bv,Kp as bw,qa as bx,Qp as by,SS as bz,Wt as c,nd as d,ce as e,br as f,e0 as g,Ap as h,We as i,Bs as j,vd as k,z as l,ws as m,P0 as n,r0 as o,i0 as p,KC as q,e_ as r,t0 as s,Er as t,ly as u,S_ as v,Bx as w,T_ as x,xe as y,te as z};