@aiquants/markdown 1.6.1 → 1.8.0

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 (237) hide show
  1. package/dist/{abnfDiagram-VRR7QNED-DVICL1SS.cjs → abnfDiagram-VRR7QNED-BKvRUGcR.cjs} +2 -2
  2. package/dist/{abnfDiagram-VRR7QNED-DVICL1SS.cjs.map → abnfDiagram-VRR7QNED-BKvRUGcR.cjs.map} +1 -1
  3. package/dist/{abnfDiagram-VRR7QNED-RZnm_ZZC.js → abnfDiagram-VRR7QNED-C-27Yna6.js} +4 -4
  4. package/dist/{abnfDiagram-VRR7QNED-RZnm_ZZC.js.map → abnfDiagram-VRR7QNED-C-27Yna6.js.map} +1 -1
  5. package/dist/{arc-BmnitkkN.cjs → arc-CUOoCqkh.cjs} +2 -2
  6. package/dist/{arc-BmnitkkN.cjs.map → arc-CUOoCqkh.cjs.map} +1 -1
  7. package/dist/{arc-C-DBDbuo.js → arc-UxDDNW0x.js} +2 -2
  8. package/dist/{arc-C-DBDbuo.js.map → arc-UxDDNW0x.js.map} +1 -1
  9. package/dist/{architectureDiagram-ZJ3FMSHR-_FBgGrSC.js → architectureDiagram-ZJ3FMSHR-Ch5Nf0Ae.js} +3 -3
  10. package/dist/{architectureDiagram-ZJ3FMSHR-_FBgGrSC.js.map → architectureDiagram-ZJ3FMSHR-Ch5Nf0Ae.js.map} +1 -1
  11. package/dist/{architectureDiagram-ZJ3FMSHR-CCAJeMnU.cjs → architectureDiagram-ZJ3FMSHR-kO8dZQKK.cjs} +2 -2
  12. package/dist/{architectureDiagram-ZJ3FMSHR-CCAJeMnU.cjs.map → architectureDiagram-ZJ3FMSHR-kO8dZQKK.cjs.map} +1 -1
  13. package/dist/{blockDiagram-677ZJIJ3-W3Ryiu2c.cjs → blockDiagram-677ZJIJ3-BbjxBeAD.cjs} +2 -2
  14. package/dist/{blockDiagram-677ZJIJ3-W3Ryiu2c.cjs.map → blockDiagram-677ZJIJ3-BbjxBeAD.cjs.map} +1 -1
  15. package/dist/{blockDiagram-677ZJIJ3-CLkOcrVQ.js → blockDiagram-677ZJIJ3-CuCBVVNa.js} +4 -4
  16. package/dist/{blockDiagram-677ZJIJ3-CLkOcrVQ.js.map → blockDiagram-677ZJIJ3-CuCBVVNa.js.map} +1 -1
  17. package/dist/{c4Diagram-LMCZKHZV-FhSkJ7-q.js → c4Diagram-LMCZKHZV-BdJV5ivG.js} +3 -3
  18. package/dist/{c4Diagram-LMCZKHZV-FhSkJ7-q.js.map → c4Diagram-LMCZKHZV-BdJV5ivG.js.map} +1 -1
  19. package/dist/{c4Diagram-LMCZKHZV-B--cDHXw.cjs → c4Diagram-LMCZKHZV-BgTfc_W8.cjs} +2 -2
  20. package/dist/{c4Diagram-LMCZKHZV-B--cDHXw.cjs.map → c4Diagram-LMCZKHZV-BgTfc_W8.cjs.map} +1 -1
  21. package/dist/channel-BaZK7NhX.js +6 -0
  22. package/dist/{channel-B6gYWXtQ.js.map → channel-BaZK7NhX.js.map} +1 -1
  23. package/dist/channel-DcZBUEY6.cjs +2 -0
  24. package/dist/{channel-CZceKK2b.cjs.map → channel-DcZBUEY6.cjs.map} +1 -1
  25. package/dist/{chunk-2Q5K7J3B-CLA9LZQs.js → chunk-2Q5K7J3B-CSlHTmMh.js} +2 -2
  26. package/dist/{chunk-2Q5K7J3B-CLA9LZQs.js.map → chunk-2Q5K7J3B-CSlHTmMh.js.map} +1 -1
  27. package/dist/{chunk-2Q5K7J3B-UoZ4tiIj.cjs → chunk-2Q5K7J3B-D9s6eCoM.cjs} +2 -2
  28. package/dist/{chunk-2Q5K7J3B-UoZ4tiIj.cjs.map → chunk-2Q5K7J3B-D9s6eCoM.cjs.map} +1 -1
  29. package/dist/{chunk-32BRIVSS-CrDpazxa.js → chunk-32BRIVSS-CXH5EQUk.js} +2 -2
  30. package/dist/{chunk-32BRIVSS-CrDpazxa.js.map → chunk-32BRIVSS-CXH5EQUk.js.map} +1 -1
  31. package/dist/{chunk-32BRIVSS-CyUS1-2x.cjs → chunk-32BRIVSS-D2F2B9TZ.cjs} +2 -2
  32. package/dist/{chunk-32BRIVSS-CyUS1-2x.cjs.map → chunk-32BRIVSS-D2F2B9TZ.cjs.map} +1 -1
  33. package/dist/{chunk-5VM5RSS4-DnTlok-Z.js → chunk-5VM5RSS4-BhTMtA9l.js} +2 -2
  34. package/dist/{chunk-5VM5RSS4-DnTlok-Z.js.map → chunk-5VM5RSS4-BhTMtA9l.js.map} +1 -1
  35. package/dist/{chunk-5VM5RSS4-DCM2evxn.cjs → chunk-5VM5RSS4-CxjaLXsB.cjs} +2 -2
  36. package/dist/{chunk-5VM5RSS4-DCM2evxn.cjs.map → chunk-5VM5RSS4-CxjaLXsB.cjs.map} +1 -1
  37. package/dist/{chunk-EX3LRPZG-CDcYLfTb.cjs → chunk-EX3LRPZG-BCQ_eMbL.cjs} +2 -2
  38. package/dist/{chunk-EX3LRPZG-CDcYLfTb.cjs.map → chunk-EX3LRPZG-BCQ_eMbL.cjs.map} +1 -1
  39. package/dist/{chunk-EX3LRPZG-BXZN3BP6.js → chunk-EX3LRPZG-BOcBE4jP.js} +5 -5
  40. package/dist/{chunk-EX3LRPZG-BXZN3BP6.js.map → chunk-EX3LRPZG-BOcBE4jP.js.map} +1 -1
  41. package/dist/{chunk-JWPE2WC7-BOZsBb5v.js → chunk-JWPE2WC7-C20BXRVN.js} +2 -2
  42. package/dist/{chunk-JWPE2WC7-BOZsBb5v.js.map → chunk-JWPE2WC7-C20BXRVN.js.map} +1 -1
  43. package/dist/{chunk-JWPE2WC7-u2Y2E01t.cjs → chunk-JWPE2WC7-CLCAyxUO.cjs} +2 -2
  44. package/dist/{chunk-JWPE2WC7-u2Y2E01t.cjs.map → chunk-JWPE2WC7-CLCAyxUO.cjs.map} +1 -1
  45. package/dist/{chunk-MOJQB5TN-CODLoYka.js → chunk-MOJQB5TN-B_C5dwTy.js} +2 -2
  46. package/dist/{chunk-MOJQB5TN-CODLoYka.js.map → chunk-MOJQB5TN-B_C5dwTy.js.map} +1 -1
  47. package/dist/{chunk-MOJQB5TN-D9XmnzfN.cjs → chunk-MOJQB5TN-Bbpbi357.cjs} +2 -2
  48. package/dist/{chunk-MOJQB5TN-D9XmnzfN.cjs.map → chunk-MOJQB5TN-Bbpbi357.cjs.map} +1 -1
  49. package/dist/{chunk-PUDLZKDR-Vzafz0p_.js → chunk-PUDLZKDR-C0EKSRvH.js} +7 -7
  50. package/dist/{chunk-PUDLZKDR-Vzafz0p_.js.map → chunk-PUDLZKDR-C0EKSRvH.js.map} +1 -1
  51. package/dist/{chunk-PUDLZKDR-DIlJh7gW.cjs → chunk-PUDLZKDR-Cpp-nasK.cjs} +2 -2
  52. package/dist/{chunk-PUDLZKDR-DIlJh7gW.cjs.map → chunk-PUDLZKDR-Cpp-nasK.cjs.map} +1 -1
  53. package/dist/{chunk-RYQCIY6F-D7RgZ_ri.js → chunk-RYQCIY6F-BuIkG6A2.js} +2 -2
  54. package/dist/{chunk-RYQCIY6F-D7RgZ_ri.js.map → chunk-RYQCIY6F-BuIkG6A2.js.map} +1 -1
  55. package/dist/{chunk-RYQCIY6F-BgbNR_-2.cjs → chunk-RYQCIY6F-he5fUSYo.cjs} +2 -2
  56. package/dist/{chunk-RYQCIY6F-BgbNR_-2.cjs.map → chunk-RYQCIY6F-he5fUSYo.cjs.map} +1 -1
  57. package/dist/{chunk-V7JOEXUC-BtRbpCVo.cjs → chunk-V7JOEXUC-BcBXzffo.cjs} +2 -2
  58. package/dist/{chunk-V7JOEXUC-BtRbpCVo.cjs.map → chunk-V7JOEXUC-BcBXzffo.cjs.map} +1 -1
  59. package/dist/{chunk-V7JOEXUC-Csiot9oO.js → chunk-V7JOEXUC-DWnZRQBl.js} +6 -6
  60. package/dist/{chunk-V7JOEXUC-Csiot9oO.js.map → chunk-V7JOEXUC-DWnZRQBl.js.map} +1 -1
  61. package/dist/{chunk-VR4S4FIN-DH6f42Mu.js → chunk-VR4S4FIN-BWCLM0a0.js} +2 -2
  62. package/dist/{chunk-VR4S4FIN-DH6f42Mu.js.map → chunk-VR4S4FIN-BWCLM0a0.js.map} +1 -1
  63. package/dist/{chunk-VR4S4FIN-y0SDmoh2.cjs → chunk-VR4S4FIN-Bd3wwAe8.cjs} +2 -2
  64. package/dist/{chunk-VR4S4FIN-y0SDmoh2.cjs.map → chunk-VR4S4FIN-Bd3wwAe8.cjs.map} +1 -1
  65. package/dist/{chunk-XXDRQBXY-rC42S5QT.cjs → chunk-XXDRQBXY-C2UaLfce.cjs} +2 -2
  66. package/dist/{chunk-XXDRQBXY-rC42S5QT.cjs.map → chunk-XXDRQBXY-C2UaLfce.cjs.map} +1 -1
  67. package/dist/{chunk-XXDRQBXY-Csac6tCf.js → chunk-XXDRQBXY-qt9x9red.js} +2 -2
  68. package/dist/{chunk-XXDRQBXY-Csac6tCf.js.map → chunk-XXDRQBXY-qt9x9red.js.map} +1 -1
  69. package/dist/{classDiagram-OUVF2IWQ-Dd9EcDqY.js → classDiagram-OUVF2IWQ-B0lJPbAq.js} +3 -3
  70. package/dist/{classDiagram-OUVF2IWQ-Dd9EcDqY.js.map → classDiagram-OUVF2IWQ-B0lJPbAq.js.map} +1 -1
  71. package/dist/{classDiagram-OUVF2IWQ-Vq3KKBUy.cjs → classDiagram-OUVF2IWQ-BoGCNSIO.cjs} +2 -2
  72. package/dist/{classDiagram-OUVF2IWQ-Vq3KKBUy.cjs.map → classDiagram-OUVF2IWQ-BoGCNSIO.cjs.map} +1 -1
  73. package/dist/{classDiagram-v2-EOCWNBFH-Dd9EcDqY.js → classDiagram-v2-EOCWNBFH-B0lJPbAq.js} +3 -3
  74. package/dist/{classDiagram-v2-EOCWNBFH-Dd9EcDqY.js.map → classDiagram-v2-EOCWNBFH-B0lJPbAq.js.map} +1 -1
  75. package/dist/{classDiagram-v2-EOCWNBFH-Vq3KKBUy.cjs → classDiagram-v2-EOCWNBFH-BoGCNSIO.cjs} +2 -2
  76. package/dist/{classDiagram-v2-EOCWNBFH-Vq3KKBUy.cjs.map → classDiagram-v2-EOCWNBFH-BoGCNSIO.cjs.map} +1 -1
  77. package/dist/{cose-bilkent-JH36ORCC-BAYFBSur.js → cose-bilkent-JH36ORCC-BXH9dl_0.js} +2 -2
  78. package/dist/{cose-bilkent-JH36ORCC-BAYFBSur.js.map → cose-bilkent-JH36ORCC-BXH9dl_0.js.map} +1 -1
  79. package/dist/{cose-bilkent-JH36ORCC-CsHaaKi1.cjs → cose-bilkent-JH36ORCC-DRBzHIcA.cjs} +2 -2
  80. package/dist/{cose-bilkent-JH36ORCC-CsHaaKi1.cjs.map → cose-bilkent-JH36ORCC-DRBzHIcA.cjs.map} +1 -1
  81. package/dist/{cynefinDiagram-TSTJHNR4-CSZqIj_l.js → cynefinDiagram-TSTJHNR4-2jnqksgG.js} +3 -3
  82. package/dist/{cynefinDiagram-TSTJHNR4-CSZqIj_l.js.map → cynefinDiagram-TSTJHNR4-2jnqksgG.js.map} +1 -1
  83. package/dist/{cynefinDiagram-TSTJHNR4-BEPBV57_.cjs → cynefinDiagram-TSTJHNR4-Ge9B88rS.cjs} +2 -2
  84. package/dist/{cynefinDiagram-TSTJHNR4-BEPBV57_.cjs.map → cynefinDiagram-TSTJHNR4-Ge9B88rS.cjs.map} +1 -1
  85. package/dist/{dagre-VKFMJZFB-D9fBL_yM.js → dagre-VKFMJZFB-BqLynzOx.js} +3 -3
  86. package/dist/{dagre-VKFMJZFB-D9fBL_yM.js.map → dagre-VKFMJZFB-BqLynzOx.js.map} +1 -1
  87. package/dist/{dagre-VKFMJZFB-BlRE-U3S.cjs → dagre-VKFMJZFB-C7QheUvc.cjs} +2 -2
  88. package/dist/{dagre-VKFMJZFB-BlRE-U3S.cjs.map → dagre-VKFMJZFB-C7QheUvc.cjs.map} +1 -1
  89. package/dist/{diagram-FQU43EPY-Di26xB9f.cjs → diagram-FQU43EPY-CSPyECaU.cjs} +2 -2
  90. package/dist/{diagram-FQU43EPY-Di26xB9f.cjs.map → diagram-FQU43EPY-CSPyECaU.cjs.map} +1 -1
  91. package/dist/{diagram-FQU43EPY-DPR8KMs9.js → diagram-FQU43EPY-DUwsAw4u.js} +3 -3
  92. package/dist/{diagram-FQU43EPY-DPR8KMs9.js.map → diagram-FQU43EPY-DUwsAw4u.js.map} +1 -1
  93. package/dist/{diagram-G47NLZAW-71hjWkYs.cjs → diagram-G47NLZAW-BaP0Lyg0.cjs} +2 -2
  94. package/dist/{diagram-G47NLZAW-71hjWkYs.cjs.map → diagram-G47NLZAW-BaP0Lyg0.cjs.map} +1 -1
  95. package/dist/{diagram-G47NLZAW-BfL1Ut0H.js → diagram-G47NLZAW-h09HILJg.js} +4 -4
  96. package/dist/{diagram-G47NLZAW-BfL1Ut0H.js.map → diagram-G47NLZAW-h09HILJg.js.map} +1 -1
  97. package/dist/{diagram-NH7WQ7WH-BjJctDxT.js → diagram-NH7WQ7WH-BE3XRcGY.js} +3 -3
  98. package/dist/{diagram-NH7WQ7WH-BjJctDxT.js.map → diagram-NH7WQ7WH-BE3XRcGY.js.map} +1 -1
  99. package/dist/{diagram-NH7WQ7WH-B4uTamuE.cjs → diagram-NH7WQ7WH-DyJw7-Gl.cjs} +2 -2
  100. package/dist/{diagram-NH7WQ7WH-B4uTamuE.cjs.map → diagram-NH7WQ7WH-DyJw7-Gl.cjs.map} +1 -1
  101. package/dist/{diagram-OA4YK3LP-BoFOwiXF.js → diagram-OA4YK3LP-BfAM9MZv.js} +4 -4
  102. package/dist/{diagram-OA4YK3LP-BoFOwiXF.js.map → diagram-OA4YK3LP-BfAM9MZv.js.map} +1 -1
  103. package/dist/{diagram-OA4YK3LP-C1ORbLEL.cjs → diagram-OA4YK3LP-DqYpt5F6.cjs} +2 -2
  104. package/dist/{diagram-OA4YK3LP-C1ORbLEL.cjs.map → diagram-OA4YK3LP-DqYpt5F6.cjs.map} +1 -1
  105. package/dist/{diagram-WEI45ONY-COXEDGCZ.js → diagram-WEI45ONY-DtFOpBM4.js} +3 -3
  106. package/dist/{diagram-WEI45ONY-COXEDGCZ.js.map → diagram-WEI45ONY-DtFOpBM4.js.map} +1 -1
  107. package/dist/{diagram-WEI45ONY-BzuHWp9D.cjs → diagram-WEI45ONY-fz5dqgqy.cjs} +2 -2
  108. package/dist/{diagram-WEI45ONY-BzuHWp9D.cjs.map → diagram-WEI45ONY-fz5dqgqy.cjs.map} +1 -1
  109. package/dist/{ebnfDiagram-CCIWWBDH-N0w7QwtK.js → ebnfDiagram-CCIWWBDH-CyKVhKIb.js} +4 -4
  110. package/dist/{ebnfDiagram-CCIWWBDH-N0w7QwtK.js.map → ebnfDiagram-CCIWWBDH-CyKVhKIb.js.map} +1 -1
  111. package/dist/{ebnfDiagram-CCIWWBDH-DE7OPvSn.cjs → ebnfDiagram-CCIWWBDH-Haez4su4.cjs} +2 -2
  112. package/dist/{ebnfDiagram-CCIWWBDH-DE7OPvSn.cjs.map → ebnfDiagram-CCIWWBDH-Haez4su4.cjs.map} +1 -1
  113. package/dist/{erDiagram-Q63AITRT-CqsM_S0E.js → erDiagram-Q63AITRT-9hM3kPUW.js} +5 -5
  114. package/dist/{erDiagram-Q63AITRT-CqsM_S0E.js.map → erDiagram-Q63AITRT-9hM3kPUW.js.map} +1 -1
  115. package/dist/{erDiagram-Q63AITRT-KvBvwG4T.cjs → erDiagram-Q63AITRT-BGEWGa_b.cjs} +2 -2
  116. package/dist/{erDiagram-Q63AITRT-KvBvwG4T.cjs.map → erDiagram-Q63AITRT-BGEWGa_b.cjs.map} +1 -1
  117. package/dist/{extractHeadings-BiNpEj-K.js → extractHeadings-BH0T7P4n.js} +3834 -3824
  118. package/dist/{extractHeadings-BiNpEj-K.js.map → extractHeadings-BH0T7P4n.js.map} +1 -1
  119. package/dist/{extractHeadings-vnYM8Eet.cjs → extractHeadings-BsiIYa_e.cjs} +62 -62
  120. package/dist/{extractHeadings-vnYM8Eet.cjs.map → extractHeadings-BsiIYa_e.cjs.map} +1 -1
  121. package/dist/flowDiagram-23GEKE2U-B9LX4RXy.cjs +2 -0
  122. package/dist/flowDiagram-23GEKE2U-B9LX4RXy.cjs.map +1 -0
  123. package/dist/flowDiagram-23GEKE2U-Dk7STu-u.js +8 -0
  124. package/dist/flowDiagram-23GEKE2U-Dk7STu-u.js.map +1 -0
  125. package/dist/{ganttDiagram-NO4QXBWP-DvdToLYa.cjs → ganttDiagram-NO4QXBWP-4BbeHi64.cjs} +2 -2
  126. package/dist/{ganttDiagram-NO4QXBWP-DvdToLYa.cjs.map → ganttDiagram-NO4QXBWP-4BbeHi64.cjs.map} +1 -1
  127. package/dist/{ganttDiagram-NO4QXBWP-C2P9ON6O.js → ganttDiagram-NO4QXBWP-DtM5HL0C.js} +3 -3
  128. package/dist/{ganttDiagram-NO4QXBWP-C2P9ON6O.js.map → ganttDiagram-NO4QXBWP-DtM5HL0C.js.map} +1 -1
  129. package/dist/{gitGraphDiagram-IHSO6WYX-BkZsK9Hm.cjs → gitGraphDiagram-IHSO6WYX-D1NSh545.cjs} +2 -2
  130. package/dist/{gitGraphDiagram-IHSO6WYX-BkZsK9Hm.cjs.map → gitGraphDiagram-IHSO6WYX-D1NSh545.cjs.map} +1 -1
  131. package/dist/{gitGraphDiagram-IHSO6WYX-DVSslxqP.js → gitGraphDiagram-IHSO6WYX-DFSd1OPO.js} +4 -4
  132. package/dist/{gitGraphDiagram-IHSO6WYX-DVSslxqP.js.map → gitGraphDiagram-IHSO6WYX-DFSd1OPO.js.map} +1 -1
  133. package/dist/index.cjs +1 -1
  134. package/dist/index.client.cjs +1 -1
  135. package/dist/index.client.js +1 -1
  136. package/dist/index.js +1 -1
  137. package/dist/{infoDiagram-FWYZ7A6U-Cd3TPtAG.cjs → infoDiagram-FWYZ7A6U-4wrBBE6X.cjs} +2 -2
  138. package/dist/{infoDiagram-FWYZ7A6U-Cd3TPtAG.cjs.map → infoDiagram-FWYZ7A6U-4wrBBE6X.cjs.map} +1 -1
  139. package/dist/{infoDiagram-FWYZ7A6U-vPnKgn2w.js → infoDiagram-FWYZ7A6U-ZRUjO8nW.js} +2 -2
  140. package/dist/{infoDiagram-FWYZ7A6U-vPnKgn2w.js.map → infoDiagram-FWYZ7A6U-ZRUjO8nW.js.map} +1 -1
  141. package/dist/{ishikawaDiagram-FXEZZL3T-CR9ySQXh.cjs → ishikawaDiagram-FXEZZL3T-DE9GPbED.cjs} +2 -2
  142. package/dist/{ishikawaDiagram-FXEZZL3T-CR9ySQXh.cjs.map → ishikawaDiagram-FXEZZL3T-DE9GPbED.cjs.map} +1 -1
  143. package/dist/{ishikawaDiagram-FXEZZL3T-BkgUhFd7.js → ishikawaDiagram-FXEZZL3T-DNgqlFhZ.js} +2 -2
  144. package/dist/{ishikawaDiagram-FXEZZL3T-BkgUhFd7.js.map → ishikawaDiagram-FXEZZL3T-DNgqlFhZ.js.map} +1 -1
  145. package/dist/{journeyDiagram-5HDEW3XC-CeLukjGs.js → journeyDiagram-5HDEW3XC-BXlXmDhR.js} +5 -5
  146. package/dist/{journeyDiagram-5HDEW3XC-CeLukjGs.js.map → journeyDiagram-5HDEW3XC-BXlXmDhR.js.map} +1 -1
  147. package/dist/{journeyDiagram-5HDEW3XC-C_kouMqJ.cjs → journeyDiagram-5HDEW3XC-jcXDYbA9.cjs} +2 -2
  148. package/dist/{journeyDiagram-5HDEW3XC-C_kouMqJ.cjs.map → journeyDiagram-5HDEW3XC-jcXDYbA9.cjs.map} +1 -1
  149. package/dist/{kanban-definition-HUTT4EX6-B7sK7KKo.js → kanban-definition-HUTT4EX6-C9IdgWIg.js} +3 -3
  150. package/dist/{kanban-definition-HUTT4EX6-B7sK7KKo.js.map → kanban-definition-HUTT4EX6-C9IdgWIg.js.map} +1 -1
  151. package/dist/{kanban-definition-HUTT4EX6-C72m9SkW.cjs → kanban-definition-HUTT4EX6-D5_pDh9h.cjs} +2 -2
  152. package/dist/{kanban-definition-HUTT4EX6-C72m9SkW.cjs.map → kanban-definition-HUTT4EX6-D5_pDh9h.cjs.map} +1 -1
  153. package/dist/{linear-DA8CNisd.js → linear-CTibpBci.js} +2 -2
  154. package/dist/{linear-DA8CNisd.js.map → linear-CTibpBci.js.map} +1 -1
  155. package/dist/{linear-BgdXLHZt.cjs → linear-DDWdtbxq.cjs} +2 -2
  156. package/dist/{linear-BgdXLHZt.cjs.map → linear-DDWdtbxq.cjs.map} +1 -1
  157. package/dist/{mindmap-definition-LN4V7U3C-C7YrqUCf.js → mindmap-definition-LN4V7U3C-CXaKAu6n.js} +4 -4
  158. package/dist/{mindmap-definition-LN4V7U3C-C7YrqUCf.js.map → mindmap-definition-LN4V7U3C-CXaKAu6n.js.map} +1 -1
  159. package/dist/{mindmap-definition-LN4V7U3C-CirMzlY5.cjs → mindmap-definition-LN4V7U3C-gBn938NF.cjs} +2 -2
  160. package/dist/{mindmap-definition-LN4V7U3C-CirMzlY5.cjs.map → mindmap-definition-LN4V7U3C-gBn938NF.cjs.map} +1 -1
  161. package/dist/{pegDiagram-2B236MQR-DpzcFesN.js → pegDiagram-2B236MQR-BiQyejnD.js} +4 -4
  162. package/dist/{pegDiagram-2B236MQR-DpzcFesN.js.map → pegDiagram-2B236MQR-BiQyejnD.js.map} +1 -1
  163. package/dist/{pegDiagram-2B236MQR-BWo1kluM.cjs → pegDiagram-2B236MQR-fR_9AvHk.cjs} +2 -2
  164. package/dist/{pegDiagram-2B236MQR-BWo1kluM.cjs.map → pegDiagram-2B236MQR-fR_9AvHk.cjs.map} +1 -1
  165. package/dist/{pieDiagram-ENE6RG2P-iRoOiNc4.cjs → pieDiagram-ENE6RG2P-BZtqlfyU.cjs} +2 -2
  166. package/dist/{pieDiagram-ENE6RG2P-iRoOiNc4.cjs.map → pieDiagram-ENE6RG2P-BZtqlfyU.cjs.map} +1 -1
  167. package/dist/{pieDiagram-ENE6RG2P-B6RHvEHE.js → pieDiagram-ENE6RG2P-CZTZpVqy.js} +4 -4
  168. package/dist/{pieDiagram-ENE6RG2P-B6RHvEHE.js.map → pieDiagram-ENE6RG2P-CZTZpVqy.js.map} +1 -1
  169. package/dist/{quadrantDiagram-ABIIQ3AL-9Gb8LEQi.js → quadrantDiagram-ABIIQ3AL-ByHTxHrm.js} +3 -3
  170. package/dist/{quadrantDiagram-ABIIQ3AL-9Gb8LEQi.js.map → quadrantDiagram-ABIIQ3AL-ByHTxHrm.js.map} +1 -1
  171. package/dist/{quadrantDiagram-ABIIQ3AL-DKbTOjNz.cjs → quadrantDiagram-ABIIQ3AL-CC5w4CkE.cjs} +2 -2
  172. package/dist/{quadrantDiagram-ABIIQ3AL-DKbTOjNz.cjs.map → quadrantDiagram-ABIIQ3AL-CC5w4CkE.cjs.map} +1 -1
  173. package/dist/{railroadDiagram-RFXS5EU6-CXgCaCb_.js → railroadDiagram-RFXS5EU6-C99zfAzl.js} +4 -4
  174. package/dist/{railroadDiagram-RFXS5EU6-CXgCaCb_.js.map → railroadDiagram-RFXS5EU6-C99zfAzl.js.map} +1 -1
  175. package/dist/{railroadDiagram-RFXS5EU6-SOxzO7C3.cjs → railroadDiagram-RFXS5EU6-_YckPr2T.cjs} +2 -2
  176. package/dist/{railroadDiagram-RFXS5EU6-SOxzO7C3.cjs.map → railroadDiagram-RFXS5EU6-_YckPr2T.cjs.map} +1 -1
  177. package/dist/{requirementDiagram-TGXJPOKE-B6RQ9Kpp.cjs → requirementDiagram-TGXJPOKE-BCeWSLF4.cjs} +2 -2
  178. package/dist/{requirementDiagram-TGXJPOKE-B6RQ9Kpp.cjs.map → requirementDiagram-TGXJPOKE-BCeWSLF4.cjs.map} +1 -1
  179. package/dist/{requirementDiagram-TGXJPOKE-DbSm2ehr.js → requirementDiagram-TGXJPOKE-DBzuXzE9.js} +4 -4
  180. package/dist/{requirementDiagram-TGXJPOKE-DbSm2ehr.js.map → requirementDiagram-TGXJPOKE-DBzuXzE9.js.map} +1 -1
  181. package/dist/{sankeyDiagram-HTMAVEWB-BNqZ6R3H.js → sankeyDiagram-HTMAVEWB-ChQ2ozXn.js} +2 -2
  182. package/dist/{sankeyDiagram-HTMAVEWB-BNqZ6R3H.js.map → sankeyDiagram-HTMAVEWB-ChQ2ozXn.js.map} +1 -1
  183. package/dist/{sankeyDiagram-HTMAVEWB-DgGDy2eG.cjs → sankeyDiagram-HTMAVEWB-DQOfpr04.cjs} +2 -2
  184. package/dist/{sankeyDiagram-HTMAVEWB-DgGDy2eG.cjs.map → sankeyDiagram-HTMAVEWB-DQOfpr04.cjs.map} +1 -1
  185. package/dist/{sequenceDiagram-DBY2YBRQ-Bf3EtJcL.js → sequenceDiagram-DBY2YBRQ-CCzsdQ__.js} +4 -4
  186. package/dist/{sequenceDiagram-DBY2YBRQ-Bf3EtJcL.js.map → sequenceDiagram-DBY2YBRQ-CCzsdQ__.js.map} +1 -1
  187. package/dist/{sequenceDiagram-DBY2YBRQ-BuKDthxK.cjs → sequenceDiagram-DBY2YBRQ-D2R8WWiq.cjs} +2 -2
  188. package/dist/{sequenceDiagram-DBY2YBRQ-BuKDthxK.cjs.map → sequenceDiagram-DBY2YBRQ-D2R8WWiq.cjs.map} +1 -1
  189. package/dist/{sizeCapture-X5ZJPWSS-CNWx6elV.js → sizeCapture-X5ZJPWSS-9Q2RBacx.js} +2 -2
  190. package/dist/{sizeCapture-X5ZJPWSS-CNWx6elV.js.map → sizeCapture-X5ZJPWSS-9Q2RBacx.js.map} +1 -1
  191. package/dist/{sizeCapture-X5ZJPWSS-NRqA0pmT.cjs → sizeCapture-X5ZJPWSS-CedNWC9b.cjs} +2 -2
  192. package/dist/{sizeCapture-X5ZJPWSS-NRqA0pmT.cjs.map → sizeCapture-X5ZJPWSS-CedNWC9b.cjs.map} +1 -1
  193. package/dist/src/components/MarkdownRenderer.d.ts +31 -1
  194. package/dist/src/components/MarkdownRenderer.d.ts.map +1 -1
  195. package/dist/src/components/MarkdownViewer.d.ts +9 -1
  196. package/dist/src/components/MarkdownViewer.d.ts.map +1 -1
  197. package/dist/src/index.client.d.ts +1 -1
  198. package/dist/src/index.client.d.ts.map +1 -1
  199. package/dist/{stateDiagram-2N3HPSRC-DqhvonPY.cjs → stateDiagram-2N3HPSRC-BFjEDzN5.cjs} +2 -2
  200. package/dist/{stateDiagram-2N3HPSRC-DqhvonPY.cjs.map → stateDiagram-2N3HPSRC-BFjEDzN5.cjs.map} +1 -1
  201. package/dist/{stateDiagram-2N3HPSRC-Bdphi4r-.js → stateDiagram-2N3HPSRC-DVXBUdgS.js} +3 -3
  202. package/dist/{stateDiagram-2N3HPSRC-Bdphi4r-.js.map → stateDiagram-2N3HPSRC-DVXBUdgS.js.map} +1 -1
  203. package/dist/{stateDiagram-v2-6OUMAXLB-p9rvsC9-.cjs → stateDiagram-v2-6OUMAXLB-BpxIqbgw.cjs} +2 -2
  204. package/dist/{stateDiagram-v2-6OUMAXLB-p9rvsC9-.cjs.map → stateDiagram-v2-6OUMAXLB-BpxIqbgw.cjs.map} +1 -1
  205. package/dist/{stateDiagram-v2-6OUMAXLB-DdB47j1a.js → stateDiagram-v2-6OUMAXLB-etkgI8XE.js} +3 -3
  206. package/dist/{stateDiagram-v2-6OUMAXLB-DdB47j1a.js.map → stateDiagram-v2-6OUMAXLB-etkgI8XE.js.map} +1 -1
  207. package/dist/{swimlanes-5IMT3BWC-JZVn9oCR.cjs → swimlanes-5IMT3BWC-ByyaHYdJ.cjs} +2 -2
  208. package/dist/{swimlanes-5IMT3BWC-JZVn9oCR.cjs.map → swimlanes-5IMT3BWC-ByyaHYdJ.cjs.map} +1 -1
  209. package/dist/{swimlanes-5IMT3BWC-BMZk0Lp2.js → swimlanes-5IMT3BWC-CRF_hU5-.js} +4 -4
  210. package/dist/{swimlanes-5IMT3BWC-BMZk0Lp2.js.map → swimlanes-5IMT3BWC-CRF_hU5-.js.map} +1 -1
  211. package/dist/{swimlanesDiagram-G3AALYLV-DxEegQkl.cjs → swimlanesDiagram-G3AALYLV-DmAVTn1y.cjs} +2 -2
  212. package/dist/{swimlanesDiagram-G3AALYLV-DxEegQkl.cjs.map → swimlanesDiagram-G3AALYLV-DmAVTn1y.cjs.map} +1 -1
  213. package/dist/{swimlanesDiagram-G3AALYLV-DNhrqmqB.js → swimlanesDiagram-G3AALYLV-qE56wCfv.js} +3 -3
  214. package/dist/{swimlanesDiagram-G3AALYLV-DNhrqmqB.js.map → swimlanesDiagram-G3AALYLV-qE56wCfv.js.map} +1 -1
  215. package/dist/{timeline-definition-FHXFAJF6-BjxOaDZF.cjs → timeline-definition-FHXFAJF6-CYpydtqC.cjs} +2 -2
  216. package/dist/{timeline-definition-FHXFAJF6-BjxOaDZF.cjs.map → timeline-definition-FHXFAJF6-CYpydtqC.cjs.map} +1 -1
  217. package/dist/{timeline-definition-FHXFAJF6-C4kHuqGr.js → timeline-definition-FHXFAJF6-U6tU13YO.js} +3 -3
  218. package/dist/{timeline-definition-FHXFAJF6-C4kHuqGr.js.map → timeline-definition-FHXFAJF6-U6tU13YO.js.map} +1 -1
  219. package/dist/{vennDiagram-L72KCM5P-nQ40EeIj.cjs → vennDiagram-L72KCM5P-CfbVR5CF.cjs} +2 -2
  220. package/dist/{vennDiagram-L72KCM5P-nQ40EeIj.cjs.map → vennDiagram-L72KCM5P-CfbVR5CF.cjs.map} +1 -1
  221. package/dist/{vennDiagram-L72KCM5P-faE6oCYZ.js → vennDiagram-L72KCM5P-q79Xn7UV.js} +2 -2
  222. package/dist/{vennDiagram-L72KCM5P-faE6oCYZ.js.map → vennDiagram-L72KCM5P-q79Xn7UV.js.map} +1 -1
  223. package/dist/{wardleyDiagram-EHGQE667-COQa-JdJ.js → wardleyDiagram-EHGQE667-BG3W74MX.js} +3 -3
  224. package/dist/{wardleyDiagram-EHGQE667-COQa-JdJ.js.map → wardleyDiagram-EHGQE667-BG3W74MX.js.map} +1 -1
  225. package/dist/{wardleyDiagram-EHGQE667-ByYfznTT.cjs → wardleyDiagram-EHGQE667-CSJ22zfj.cjs} +2 -2
  226. package/dist/{wardleyDiagram-EHGQE667-ByYfznTT.cjs.map → wardleyDiagram-EHGQE667-CSJ22zfj.cjs.map} +1 -1
  227. package/dist/{xychartDiagram-FW5EYKEG-D7FhqNeM.js → xychartDiagram-FW5EYKEG-BISI4a7c.js} +3 -3
  228. package/dist/{xychartDiagram-FW5EYKEG-D7FhqNeM.js.map → xychartDiagram-FW5EYKEG-BISI4a7c.js.map} +1 -1
  229. package/dist/{xychartDiagram-FW5EYKEG-BHBIM0-w.cjs → xychartDiagram-FW5EYKEG-Df8hBgvh.cjs} +2 -2
  230. package/dist/{xychartDiagram-FW5EYKEG-BHBIM0-w.cjs.map → xychartDiagram-FW5EYKEG-Df8hBgvh.cjs.map} +1 -1
  231. package/package.json +1 -1
  232. package/dist/channel-B6gYWXtQ.js +0 -6
  233. package/dist/channel-CZceKK2b.cjs +0 -2
  234. package/dist/flowDiagram-23GEKE2U-BNIQEPQk.cjs +0 -2
  235. package/dist/flowDiagram-23GEKE2U-BNIQEPQk.cjs.map +0 -1
  236. package/dist/flowDiagram-23GEKE2U-Cu3z7Hd2.js +0 -8
  237. package/dist/flowDiagram-23GEKE2U-Cu3z7Hd2.js.map +0 -1
@@ -1,11 +1,11 @@
1
- "use strict";var Iy=Object.create;var ul=Object.defineProperty;var Py=Object.getOwnPropertyDescriptor;var Oy=Object.getOwnPropertyNames;var Ry=Object.getPrototypeOf,Dy=Object.prototype.hasOwnProperty;var Ny=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Oy(t))!Dy.call(e,s)&&s!==r&&ul(e,s,{get:()=>t[s],enumerable:!(i=Py(t,s))||i.enumerable});return e};var qy=(e,t,r)=>(r=e!=null?Iy(Ry(e)):{},Ny(t||!e||!e.__esModule?ul(r,"default",{value:e,enumerable:!0}):r,e));const H=require("react"),ue=require("html-react-parser"),Ya=require("katex"),zy=require("shiki"),er=require("dompurify"),Wy=require("github-slugger"),ps=require("./simple-logger-DZxBpX7v.cjs"),$t=require("unist-util-visit"),jy=require("cheerio");function jh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qi={exports:{}},Qr={};var fl;function Hy(){if(fl)return Qr;fl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var n in s)n!=="key"&&(o[n]=s[n])}else o=s;return s=o.ref,{$$typeof:e,type:i,key:a,ref:s!==void 0?s:null,props:o}}return Qr.Fragment=t,Qr.jsx=r,Qr.jsxs=r,Qr}var Jr={};var gl;function Yy(){return gl||(gl=1,process.env.NODE_ENV!=="production"&&(function(){function e(B){if(B==null)return null;if(typeof B=="function")return B.$$typeof===O?null:B.displayName||B.name||null;if(typeof B=="string")return B;switch(B){case y:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case _:return"Suspense";case F:return"SuspenseList";case P:return"Activity"}if(typeof B=="object")switch(typeof B.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case m:return"Portal";case v:return B.displayName||"Context";case k:return(B._context.displayName||"Context")+".Consumer";case S:var U=B.render;return B=B.displayName,B||(B=U.displayName||U.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case T:return U=B.displayName||null,U!==null?U:e(B.type)||"Memo";case M:U=B._payload,B=B._init;try{return e(B(U))}catch{}}return null}function t(B){return""+B}function r(B){try{t(B);var U=!1}catch{U=!0}if(U){U=console;var W=U.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return W.call(U,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(B)}}function i(B){if(B===y)return"<>";if(typeof B=="object"&&B!==null&&B.$$typeof===M)return"<...>";try{var U=e(B);return U?"<"+U+">":"<...>"}catch{return"<...>"}}function s(){var B=X.A;return B===null?null:B.getOwner()}function o(){return Error("react-stack-top-frame")}function a(B){if(j.call(B,"key")){var U=Object.getOwnPropertyDescriptor(B,"key").get;if(U&&U.isReactWarning)return!1}return B.key!==void 0}function n(B,U){function W(){A||(A=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",U))}W.isReactWarning=!0,Object.defineProperty(B,"key",{get:W,configurable:!0})}function l(){var B=e(this.type);return N[B]||(N[B]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),B=this.props.ref,B!==void 0?B:null}function c(B,U,W,G,V,K){var Z=W.ref;return B={$$typeof:p,type:B,key:U,props:W,_owner:G},(Z!==void 0?Z:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:l}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function h(B,U,W,G,V,K){var Z=U.children;if(Z!==void 0)if(G)if(R(Z)){for(G=0;G<Z.length;G++)d(Z[G]);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(Z);if(j.call(U,"key")){Z=e(B);var st=Object.keys(U).filter(function(dt){return dt!=="key"});G=0<st.length?"{key: someKey, "+st.join(": ..., ")+": ...}":"{key: someKey}",D[Z+G]||(st=0<st.length?"{"+st.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use strict";var Iy=Object.create;var fl=Object.defineProperty;var Oy=Object.getOwnPropertyDescriptor;var Ry=Object.getOwnPropertyNames;var Dy=Object.getPrototypeOf,Ny=Object.prototype.hasOwnProperty;var qy=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ry(t))!Ny.call(e,s)&&s!==r&&fl(e,s,{get:()=>t[s],enumerable:!(i=Oy(t,s))||i.enumerable});return e};var zy=(e,t,r)=>(r=e!=null?Iy(Dy(e)):{},qy(t||!e||!e.__esModule?fl(r,"default",{value:e,enumerable:!0}):r,e));const Y=require("react"),fe=require("html-react-parser"),Ua=require("katex"),Wy=require("shiki"),er=require("dompurify"),jy=require("github-slugger"),ps=require("./simple-logger-DZxBpX7v.cjs"),$t=require("unist-util-visit"),Hy=require("cheerio");function Hh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qi={exports:{}},Qr={};var gl;function Yy(){if(gl)return Qr;gl=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var n in s)n!=="key"&&(o[n]=s[n])}else o=s;return s=o.ref,{$$typeof:e,type:i,key:a,ref:s!==void 0?s:null,props:o}}return Qr.Fragment=t,Qr.jsx=r,Qr.jsxs=r,Qr}var Jr={};var pl;function Uy(){return pl||(pl=1,process.env.NODE_ENV!=="production"&&(function(){function e(B){if(B==null)return null;if(typeof B=="function")return B.$$typeof===O?null:B.displayName||B.name||null;if(typeof B=="string")return B;switch(B){case y:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case _:return"Suspense";case F:return"SuspenseList";case M:return"Activity"}if(typeof B=="object")switch(typeof B.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case m:return"Portal";case v:return B.displayName||"Context";case k:return(B._context.displayName||"Context")+".Consumer";case S:var H=B.render;return B=B.displayName,B||(B=H.displayName||H.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case T:return H=B.displayName||null,H!==null?H:e(B.type)||"Memo";case D:H=B._payload,B=B._init;try{return e(B(H))}catch{}}return null}function t(B){return""+B}function r(B){try{t(B);var H=!1}catch{H=!0}if(H){H=console;var W=H.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return W.call(H,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(B)}}function i(B){if(B===y)return"<>";if(typeof B=="object"&&B!==null&&B.$$typeof===D)return"<...>";try{var H=e(B);return H?"<"+H+">":"<...>"}catch{return"<...>"}}function s(){var B=X.A;return B===null?null:B.getOwner()}function o(){return Error("react-stack-top-frame")}function a(B){if(j.call(B,"key")){var H=Object.getOwnPropertyDescriptor(B,"key").get;if(H&&H.isReactWarning)return!1}return B.key!==void 0}function n(B,H){function W(){A||(A=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",H))}W.isReactWarning=!0,Object.defineProperty(B,"key",{get:W,configurable:!0})}function l(){var B=e(this.type);return N[B]||(N[B]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),B=this.props.ref,B!==void 0?B:null}function c(B,H,W,G,V,Z){var K=W.ref;return B={$$typeof:p,type:B,key:H,props:W,_owner:G},(K!==void 0?K:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:l}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function h(B,H,W,G,V,Z){var K=H.children;if(K!==void 0)if(G)if(I(K)){for(G=0;G<K.length;G++)d(K[G]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(K);if(j.call(H,"key")){K=e(B);var ot=Object.keys(H).filter(function(ut){return ut!=="key"});G=0<ot.length?"{key: someKey, "+ot.join(": ..., ")+": ...}":"{key: someKey}",R[K+G]||(ot=0<ot.length?"{"+ot.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,G,Z,st,Z),D[Z+G]=!0)}if(Z=null,W!==void 0&&(r(W),Z=""+W),a(U)&&(r(U.key),Z=""+U.key),"key"in U){W={};for(var ft in U)ft!=="key"&&(W[ft]=U[ft])}else W=U;return Z&&n(W,typeof B=="function"?B.displayName||B.name||"Unknown":B),c(B,Z,W,s(),V,K)}function d(B){f(B)?B._store&&(B._store.validated=1):typeof B=="object"&&B!==null&&B.$$typeof===M&&(B._payload.status==="fulfilled"?f(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function f(B){return typeof B=="object"&&B!==null&&B.$$typeof===p}var u=H,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),X=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,R=Array.isArray,$=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(B){return B()}};var A,N={},I=u.react_stack_bottom_frame.bind(u,o)(),E=$(i(o)),D={};Jr.Fragment=y,Jr.jsx=function(B,U,W){var G=1e4>X.recentlyCreatedOwnerStacks++;return h(B,U,W,!1,G?Error("react-stack-top-frame"):I,G?$(i(B)):E)},Jr.jsxs=function(B,U,W){var G=1e4>X.recentlyCreatedOwnerStacks++;return h(B,U,W,!0,G?Error("react-stack-top-frame"):I,G?$(i(B)):E)}})()),Jr}var pl;function Uy(){return pl||(pl=1,process.env.NODE_ENV==="production"?qi.exports=Hy():qi.exports=Yy()),qi.exports}var w=Uy();typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),i}));const Xy=typeof document<"u"&&!!document.documentMode;let bo;function Gy(){return bo||(bo=document.createElement("div").style)}const ml=["webkit","moz","ms"],zi={};function Ua(e){if(zi[e])return zi[e];const t=Gy();if(e in t)return zi[e]=e;const r=e[0].toUpperCase()+e.slice(1);let i=ml.length;for(;i--;){const s=`${ml[i]}${r}`;if(s in t)return zi[e]=s}}function Wi(e,t){return parseFloat(t[Ua(e)])||0}function ji(e,t,r=window.getComputedStyle(e)){const i=t==="border"?"Width":"";return{left:Wi(`${t}Left${i}`,r),right:Wi(`${t}Right${i}`,r),top:Wi(`${t}Top${i}`,r),bottom:Wi(`${t}Bottom${i}`,r)}}function mr(e,t,r){e.style[Ua(t)]=r}function Vy(e,t){const r=Ua("transform");mr(e,"transition",`${r} ${t.duration}ms ${t.easing}`)}function Zy(e,{x:t,y:r,scale:i,isSVG:s},o){if(mr(e,"transform",`scale(${i}) translate(${t}px, ${r}px)`),s&&Xy){const a=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",a)}}function ko(e){let t=e.parentNode;(!t||t.nodeType!==1)&&(t=document.documentElement);const r=window.getComputedStyle(e),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:r,width:s.width,height:s.height,top:s.top,bottom:s.bottom,left:s.left,right:s.right,margin:ji(e,"margin",r),border:ji(e,"border",r)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:ji(t,"padding",i),border:ji(t,"border",i)}}}let wi={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?wi={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(wi={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function wo(e,t,r,i){wi[e].split(" ").forEach(s=>{t.addEventListener(s,r,i)})}function vo(e,t,r){wi[e].split(" ").forEach(i=>{t.removeEventListener(i,r)})}function Hh(e,t){let r=e.length;for(;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function zo(e,t){let r;if(t.touches){r=0;for(const i of t.touches)i.pointerId=r++,zo(e,i);return}r=Hh(e,t),r>-1&&e.splice(r,1),e.push(t)}function Ky(e,t){if(t.touches){for(;e.length;)e.pop();return}const r=Hh(e,t);r>-1&&e.splice(r,1)}function yl(e){e=e.slice(0);let t=e.pop(),r;for(;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function So(e){if(e.length<2)return 0;const t=e[0],r=e[1];return Math.sqrt(Math.pow(Math.abs(r.clientX-t.clientX),2)+Math.pow(Math.abs(r.clientY-t.clientY),2))}function Qy(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function Jy(e){return(e.getAttribute("class")||"").trim()}function t0(e,t){return e.nodeType===1&&` ${Jy(e)} `.indexOf(` ${t} `)>-1}function e0(e,t){for(let r=e;r!=null;r=r.parentNode)if(t0(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}const r0=/^http:[\w\.\/]+svg$/;function i0(e){return r0.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function s0(e){const t={};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}const Yh={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:Zy,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Uh(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(e.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!Qy(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...Yh,...t};const r=i0(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,mr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function s(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",mr(e,"transformOrigin","")}function o(E={}){for(const D in E)E.hasOwnProperty(D)&&(t[D]=E[D]);(E.hasOwnProperty("cursor")||E.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),E.hasOwnProperty("overflow")&&(i.style.overflow=E.overflow),E.hasOwnProperty("touchAction")&&(i.style.touchAction=E.touchAction,e.style.touchAction=E.touchAction)}let a=0,n=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{p(t.startX,t.startY,{animate:!1,force:!0})});function h(E,D,B){if(B.silent)return;const U=new CustomEvent(E,{detail:D});e.dispatchEvent(U)}function d(E,D,B){const U={x:a,y:n,scale:l,isSVG:r,originalEvent:B};return requestAnimationFrame(()=>{typeof D.animate=="boolean"&&(D.animate?Vy(e,D):mr(e,"transition","none")),D.setTransform(e,U,D),h(E,U,D),h("panzoomchange",U,D)}),U}function f(E,D,B,U){const W={...t,...U},G={x:a,y:n,opts:W};if(!U?.force&&(W.disablePan||W.panOnlyWhenZoomed&&l===W.startScale))return G;if(E=parseFloat(E),D=parseFloat(D),W.disableXAxis||(G.x=(W.relative?a:0)+E),W.disableYAxis||(G.y=(W.relative?n:0)+D),W.contain){const V=ko(e),K=V.elem.width/l,Z=V.elem.height/l,st=K*B,ft=Z*B,dt=(st-K)/2,pt=(ft-Z)/2;if(W.contain==="inside"){const _t=(-V.elem.margin.left-V.parent.padding.left+dt)/B,zt=(V.parent.width-st-V.parent.padding.left-V.elem.margin.left-V.parent.border.left-V.parent.border.right+dt)/B;G.x=Math.max(Math.min(G.x,zt),_t);const Yt=(-V.elem.margin.top-V.parent.padding.top+pt)/B,We=(V.parent.height-ft-V.parent.padding.top-V.elem.margin.top-V.parent.border.top-V.parent.border.bottom+pt)/B;G.y=Math.max(Math.min(G.y,We),Yt)}else if(W.contain==="outside"){const _t=(-(st-V.parent.width)-V.parent.padding.left-V.parent.border.left-V.parent.border.right+dt)/B,zt=(dt-V.parent.padding.left)/B;G.x=Math.max(Math.min(G.x,zt),_t);const Yt=(-(ft-V.parent.height)-V.parent.padding.top-V.parent.border.top-V.parent.border.bottom+pt)/B,We=(pt-V.parent.padding.top)/B;G.y=Math.max(Math.min(G.y,We),Yt)}}return W.roundPixels&&(G.x=Math.round(G.x),G.y=Math.round(G.y)),G}function u(E,D){const B={...t,...D},U={scale:l,opts:B};if(!D?.force&&B.disableZoom)return U;let W=t.minScale,G=t.maxScale;if(B.contain){const V=ko(e),K=V.elem.width/l,Z=V.elem.height/l;if(K>1&&Z>1){const st=V.parent.width-V.parent.border.left-V.parent.border.right,ft=V.parent.height-V.parent.border.top-V.parent.border.bottom,dt=st/K,pt=ft/Z;t.contain==="inside"?G=Math.min(G,dt,pt):t.contain==="outside"&&(W=Math.max(W,dt,pt))}}return U.scale=Math.min(Math.max(E,W),G),U}function p(E,D,B,U){const W=f(E,D,l,B);return a!==W.x||n!==W.y?(a=W.x,n=W.y,d("panzoompan",W.opts,U)):{x:a,y:n,scale:l,isSVG:r,originalEvent:U}}function m(E,D,B){const U=u(E,D),W=U.opts;if(!D?.force&&W.disableZoom)return;E=U.scale;let G=a,V=n;if(W.focal){const Z=W.focal;G=(Z.x/E-Z.x/l+a*E)/E,V=(Z.y/E-Z.y/l+n*E)/E}const K=f(G,V,E,{relative:!1,force:!0});return a=K.x,n=K.y,l=E,d("panzoomzoom",W,B)}function y(E,D){const B={...t,animate:!0,...D};return m(l*Math.exp((E?1:-1)*B.step),B)}function x(E){return y(!0,E)}function b(E){return y(!1,E)}function k(E,D,B,U){const W=ko(e),G={width:W.parent.width-W.parent.padding.left-W.parent.padding.right-W.parent.border.left-W.parent.border.right,height:W.parent.height-W.parent.padding.top-W.parent.padding.bottom-W.parent.border.top-W.parent.border.bottom};let V=D.clientX-W.parent.left-W.parent.padding.left-W.parent.border.left-W.elem.margin.left,K=D.clientY-W.parent.top-W.parent.padding.top-W.parent.border.top-W.elem.margin.top;r||(V-=W.elem.width/l/2,K-=W.elem.height/l/2);const Z={x:V/G.width*(G.width*E),y:K/G.height*(G.height*E)};return m(E,{...B,animate:!1,focal:Z},U)}function v(E,D){E.preventDefault();const B={...t,...D,animate:!1},W=(E.deltaY===0&&E.deltaX?E.deltaX:E.deltaY)<0?1:-1,G=u(l*Math.exp(W*B.step/3),B).scale;return k(G,E,B,E)}function S(E){const D={...t,animate:!0,force:!0,...E};l=u(D.startScale,D).scale;const B=f(D.startX,D.startY,l,D);return a=B.x,n=B.y,d("panzoomreset",D)}let _,F,T,M,P,O;const X=[];function j(E){if(e0(E.target,t))return;zo(X,E),c=!0,t.handleStartEvent(E),_=a,F=n,h("panzoomstart",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t);const D=yl(X);T=D.clientX,M=D.clientY,P=l,O=So(X)}function R(E){if(!c||_===void 0||F===void 0||T===void 0||M===void 0)return;zo(X,E);const D=yl(X),B=X.length>1;let U=l;if(B){O===0&&(O=So(X));const W=So(X)-O;U=u(W*t.step/80+P).scale,k(U,D,{animate:!1},E)}(!B||t.pinchAndPan)&&p(_+(D.clientX-T)/U,F+(D.clientY-M)/U,{animate:!1},E)}function $(E){X.length===1&&h("panzoomend",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t),Ky(X,E),c&&(c=!1,_=F=T=M=void 0)}let A=!1;function N(){A||(A=!0,wo("down",t.canvas?i:e,j),wo("move",document,R,{passive:!0}),wo("up",document,$,{passive:!0}))}function I(){A=!1,vo("down",t.canvas?i:e,j),vo("move",document,R),vo("up",document,$)}return t.noBind||N(),{bind:N,destroy:I,eventNames:wi,getPan:()=>({x:a,y:n}),getScale:()=>l,getOptions:()=>s0(t),handleDown:j,handleMove:R,handleUp:$,pan:p,reset:S,resetStyle:s,setOptions:o,setStyle:(E,D)=>mr(e,E,D),zoom:m,zoomIn:x,zoomOut:b,zoomToPoint:k,zoomWithWheel:v}}Uh.defaultOptions=Yh;const o0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a0=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),xl=e=>{const t=a0(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xh=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),n0=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var l0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const h0=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:a,...n},l)=>H.createElement("svg",{ref:l,...l0,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Xh("lucide",s),...!o&&!n0(n)&&{"aria-hidden":"true"},...n},[...a.map(([c,h])=>H.createElement(c,h)),...Array.isArray(o)?o:[o]]));const ne=(e,t)=>{const r=H.forwardRef(({className:i,...s},o)=>H.createElement(h0,{ref:o,iconNode:t,className:Xh(`lucide-${o0(xl(e))}`,`lucide-${e}`,i),...s}));return r.displayName=xl(e),r};const c0=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],d0=ne("list",c0);const u0=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],f0=ne("palette",u0);const g0=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],Xa=ne("pin-off",g0);const p0=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Ga=ne("pin",p0);const m0=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],y0=ne("refresh-cw",m0);const x0=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],C0=ne("settings-2",x0);const b0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],k0=ne("text-align-center",b0);const w0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],v0=ne("text-align-end",w0);const S0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],T0=ne("text-align-start",S0);const B0=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],_0=ne("zoom-in",B0);const L0=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],F0=ne("zoom-out",L0);var Gh=Object.defineProperty,g=(e,t)=>Gh(e,"name",{value:t,configurable:!0}),Vh=(e,t)=>{for(var r in t)Gh(e,r,{get:t[r],enumerable:!0})},rs={exports:{}},M0=rs.exports,Cl;function A0(){return Cl||(Cl=1,(function(e,t){(function(r,i){e.exports=i()})(M0,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var $=["th","st","nd","rd"],A=R%100;return"["+R+($[(A-20)%10]||$[A]||$[0])+"]"}},k=function(R,$,A){var N=String(R);return!N||N.length>=$?R:""+Array($+1-N.length).join(A)+R},v={s:k,z:function(R){var $=-R.utcOffset(),A=Math.abs($),N=Math.floor(A/60),I=A%60;return($<=0?"+":"-")+k(N,2,"0")+":"+k(I,2,"0")},m:function R($,A){if($.date()<A.date())return-R(A,$);var N=12*(A.year()-$.year())+(A.month()-$.month()),I=$.clone().add(N,d),E=A-I<0,D=$.clone().add(N+(E?-1:1),d);return+(-(N+(A-I)/(E?I-D:D-I))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:d,y:u,w:h,d:c,D:p,h:l,m:n,s:a,ms:o,Q:f}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},S="en",_={};_[S]=b;var F="$isDayjsObject",T=function(R){return R instanceof X||!(!R||!R[F])},M=function R($,A,N){var I;if(!$)return S;if(typeof $=="string"){var E=$.toLowerCase();_[E]&&(I=E),A&&(_[E]=A,I=E);var D=$.split("-");if(!I&&D.length>1)return R(D[0])}else{var B=$.name;_[B]=$,I=B}return!N&&I&&(S=I),I||!N&&S},P=function(R,$){if(T(R))return R.clone();var A=typeof $=="object"?$:{};return A.date=R,A.args=arguments,new X(A)},O=v;O.l=M,O.i=T,O.w=function(R,$){return P(R,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var X=(function(){function R(A){this.$L=M(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[F]=!0}var $=R.prototype;return $.parse=function(A){this.$d=(function(N){var I=N.date,E=N.utc;if(I===null)return new Date(NaN);if(O.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var D=I.match(y);if(D){var B=D[2]-1||0,U=(D[7]||"0").substring(0,3);return E?new Date(Date.UTC(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,U)):new Date(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,U)}}return new Date(I)})(A),this.init()},$.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},$.$utils=function(){return O},$.isValid=function(){return this.$d.toString()!==m},$.isSame=function(A,N){var I=P(A);return this.startOf(N)<=I&&I<=this.endOf(N)},$.isAfter=function(A,N){return P(A)<this.startOf(N)},$.isBefore=function(A,N){return this.endOf(N)<P(A)},$.$g=function(A,N,I){return O.u(A)?this[N]:this.set(I,A)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(A,N){var I=this,E=!!O.u(N)||N,D=O.p(A),B=function(ft,dt){var pt=O.w(I.$u?Date.UTC(I.$y,dt,ft):new Date(I.$y,dt,ft),I);return E?pt:pt.endOf(c)},U=function(ft,dt){return O.w(I.toDate()[ft].apply(I.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(dt)),I)},W=this.$W,G=this.$M,V=this.$D,K="set"+(this.$u?"UTC":"");switch(D){case u:return E?B(1,0):B(31,11);case d:return E?B(1,G):B(0,G+1);case h:var Z=this.$locale().weekStart||0,st=(W<Z?W+7:W)-Z;return B(E?V-st:V+(6-st),G);case c:case p:return U(K+"Hours",0);case l:return U(K+"Minutes",1);case n:return U(K+"Seconds",2);case a:return U(K+"Milliseconds",3);default:return this.clone()}},$.endOf=function(A){return this.startOf(A,!1)},$.$set=function(A,N){var I,E=O.p(A),D="set"+(this.$u?"UTC":""),B=(I={},I[c]=D+"Date",I[p]=D+"Date",I[d]=D+"Month",I[u]=D+"FullYear",I[l]=D+"Hours",I[n]=D+"Minutes",I[a]=D+"Seconds",I[o]=D+"Milliseconds",I)[E],U=E===c?this.$D+(N-this.$W):N;if(E===d||E===u){var W=this.clone().set(p,1);W.$d[B](U),W.init(),this.$d=W.set(p,Math.min(this.$D,W.daysInMonth())).$d}else B&&this.$d[B](U);return this.init(),this},$.set=function(A,N){return this.clone().$set(A,N)},$.get=function(A){return this[O.p(A)]()},$.add=function(A,N){var I,E=this;A=Number(A);var D=O.p(N),B=function(G){var V=P(E);return O.w(V.date(V.date()+Math.round(G*A)),E)};if(D===d)return this.set(d,this.$M+A);if(D===u)return this.set(u,this.$y+A);if(D===c)return B(1);if(D===h)return B(7);var U=(I={},I[n]=i,I[l]=s,I[a]=r,I)[D]||1,W=this.$d.getTime()+A*U;return O.w(W,this)},$.subtract=function(A,N){return this.add(-1*A,N)},$.format=function(A){var N=this,I=this.$locale();if(!this.isValid())return I.invalidDate||m;var E=A||"YYYY-MM-DDTHH:mm:ssZ",D=O.z(this),B=this.$H,U=this.$m,W=this.$M,G=I.weekdays,V=I.months,K=I.meridiem,Z=function(dt,pt,_t,zt){return dt&&(dt[pt]||dt(N,E))||_t[pt].slice(0,zt)},st=function(dt){return O.s(B%12||12,dt,"0")},ft=K||function(dt,pt,_t){var zt=dt<12?"AM":"PM";return _t?zt.toLowerCase():zt};return E.replace(x,(function(dt,pt){return pt||(function(_t){switch(_t){case"YY":return String(N.$y).slice(-2);case"YYYY":return O.s(N.$y,4,"0");case"M":return W+1;case"MM":return O.s(W+1,2,"0");case"MMM":return Z(I.monthsShort,W,V,3);case"MMMM":return Z(V,W);case"D":return N.$D;case"DD":return O.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(I.weekdaysMin,N.$W,G,2);case"ddd":return Z(I.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(B);case"HH":return O.s(B,2,"0");case"h":return st(1);case"hh":return st(2);case"a":return ft(B,U,!0);case"A":return ft(B,U,!1);case"m":return String(U);case"mm":return O.s(U,2,"0");case"s":return String(N.$s);case"ss":return O.s(N.$s,2,"0");case"SSS":return O.s(N.$ms,3,"0");case"Z":return D}return null})(dt)||D.replace(":","")}))},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(A,N,I){var E,D=this,B=O.p(N),U=P(A),W=(U.utcOffset()-this.utcOffset())*i,G=this-U,V=function(){return O.m(D,U)};switch(B){case u:E=V()/12;break;case d:E=V();break;case f:E=V()/3;break;case h:E=(G-W)/6048e5;break;case c:E=(G-W)/864e5;break;case l:E=G/s;break;case n:E=G/i;break;case a:E=G/r;break;default:E=G}return I?E:O.a(E)},$.daysInMonth=function(){return this.endOf(d).$D},$.$locale=function(){return _[this.$L]},$.locale=function(A,N){if(!A)return this.$L;var I=this.clone(),E=M(A,N,!0);return E&&(I.$L=E),I},$.clone=function(){return O.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},R})(),j=X.prototype;return P.prototype=j,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",p]].forEach((function(R){j[R[1]]=function($){return this.$g($,R[0],R[1])}})),P.extend=function(R,$){return R.$i||(R($,X,P),R.$i=!0),P},P.locale=M,P.isDayjs=T,P.unix=function(R){return P(1e3*R)},P.en=_[S],P.Ls=_,P.p={},P}))})(rs)),rs.exports}var E0=A0();const Zh=jh(E0);var ke={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Y={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Va=g(function(e="fatal"){let t=ke.fatal;typeof e=="string"?e.toLowerCase()in ke&&(t=ke[e]):typeof e=="number"&&(t=e),Y.trace=()=>{},Y.debug=()=>{},Y.info=()=>{},Y.warn=()=>{},Y.error=()=>{},Y.fatal=()=>{},t<=ke.fatal&&(Y.fatal=console.error?console.error.bind(console,Vt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Vt("FATAL"))),t<=ke.error&&(Y.error=console.error?console.error.bind(console,Vt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Vt("ERROR"))),t<=ke.warn&&(Y.warn=console.warn?console.warn.bind(console,Vt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Vt("WARN"))),t<=ke.info&&(Y.info=console.info?console.info.bind(console,Vt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Vt("INFO"))),t<=ke.debug&&(Y.debug=console.debug?console.debug.bind(console,Vt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("DEBUG"))),t<=ke.trace&&(Y.trace=console.debug?console.debug.bind(console,Vt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("TRACE")))},"setLogLevel"),Vt=g(e=>`%c${Zh().format("ss.SSS")} : ${e} : `,"format");const is={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return is.hue2rgb(o,s,e+1/3)*255;case"g":return is.hue2rgb(o,s,e)*255;case"b":return is.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);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}}},$0={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},I0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ht={channel:is,lang:$0,unit:I0},Ee={};for(let e=0;e<=255;e++)Ee[e]=ht.unit.dec2hex(e);const It={ALL:0,RGB:1,HSL:2};class P0{constructor(){this.type=It.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=It.ALL}is(t){return this.type===t}}class O0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new P0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=It.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=ht.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ht.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=ht.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=ht.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ht.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=ht.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(It.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(It.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(It.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(It.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(It.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(It.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(It.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(It.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(It.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(It.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(It.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(It.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xs=new O0({r:0,g:0,b:0,a:0},"transparent"),Cr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Cr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Xs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Ee[Math.round(t)]}${Ee[Math.round(r)]}${Ee[Math.round(i)]}${Ee[Math.round(s*255)]}`:`#${Ee[Math.round(t)]}${Ee[Math.round(r)]}${Ee[Math.round(i)]}`}},Ge={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(Ge.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ht.channel.clamp.h(parseFloat(r)*.9);case"rad":return ht.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ht.channel.clamp.h(parseFloat(r)*360)}}return ht.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ge.re);if(!r)return;const[,i,s,o,a,n]=r;return Xs.set({h:Ge._hue2deg(i),s:ht.channel.clamp.s(parseFloat(s)),l:ht.channel.clamp.l(parseFloat(o)),a:a?ht.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${ht.lang.round(t)}, ${ht.lang.round(r)}%, ${ht.lang.round(i)}%, ${s})`:`hsl(${ht.lang.round(t)}, ${ht.lang.round(r)}%, ${ht.lang.round(i)}%)`}},pi={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=pi.colors[e];if(t)return Cr.parse(t)},stringify:e=>{const t=Cr.stringify(e);for(const r in pi.colors)if(pi.colors[r]===t)return r}},ni={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(ni.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Xs.set({r:ht.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:ht.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:ht.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?ht.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(${ht.lang.round(t)}, ${ht.lang.round(r)}, ${ht.lang.round(i)}, ${ht.lang.round(s)})`:`rgb(${ht.lang.round(t)}, ${ht.lang.round(r)}, ${ht.lang.round(i)})`}},ae={format:{keyword:pi,hex:Cr,rgb:ni,rgba:ni,hsl:Ge,hsla:Ge},parse:e=>{if(typeof e!="string")return e;const t=Cr.parse(e)||ni.parse(e)||Ge.parse(e)||pi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(It.HSL)||e.data.r===void 0?Ge.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ni.stringify(e):Cr.stringify(e)},Kh=(e,t)=>{const r=ae.parse(e);for(const i in t)r[i]=ht.channel.clamp[i](t[i]);return ae.stringify(r)},Be=(e,t,r=0,i=1)=>{if(typeof e!="number")return Kh(e,{a:t});const s=Xs.set({r:ht.channel.clamp.r(e),g:ht.channel.clamp.g(t),b:ht.channel.clamp.b(r),a:ht.channel.clamp.a(i)});return ae.stringify(s)},R0=e=>{const{r:t,g:r,b:i}=ae.parse(e),s=.2126*ht.channel.toLinear(t)+.7152*ht.channel.toLinear(r)+.0722*ht.channel.toLinear(i);return ht.lang.round(s)},D0=e=>R0(e)>=.5,Jt=e=>!D0(e),Za=(e,t,r)=>{const i=ae.parse(e),s=i[t],o=ht.channel.clamp[t](s+r);return s!==o&&(i[t]=o),ae.stringify(i)},q=(e,t)=>Za(e,"l",t),z=(e,t)=>Za(e,"l",-t),C=(e,t)=>{const r=ae.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Kh(e,i)},N0=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=ae.parse(e),{r:n,g:l,b:c,a:h}=ae.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,x=i*m+n*y,b=s*m+l*y,k=o*m+c*y,v=a*d+h*(1-d);return Be(x,b,k,v)},L=(e,t=100)=>{const r=ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,N0(r,e,t)};var Wo=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>Wo(e,o,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=Wo(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),vt=Wo,ye="#ffffff",xe="#f2f2f2",lt=g((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),wr,q0=(wr=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(wr,"Theme"),wr),z0=g(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),vr,W0=(vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Be(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=z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=z(this.sectionBkgColor,10),this.taskBorderColor=Be(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Be(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||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(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=q(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=q(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=L(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??q(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.secondaryColor,20),this.git1=q(this.pie2||this.secondaryColor,20),this.git2=q(this.pie3||this.tertiaryColor,20),this.git3=q(this.pie4||C(this.primaryColor,{h:-30}),20),this.git4=q(this.pie5||C(this.primaryColor,{h:-60}),20),this.git5=q(this.pie6||C(this.primaryColor,{h:-90}),10),this.git6=q(this.pie7||C(this.primaryColor,{h:60}),10),this.git7=q(this.pie8||C(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||q("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||q("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||q("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||q("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||q(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||q(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||q(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||q(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(vr,"Theme"),vr),j0=g(e=>{const t=new W0;return t.calculate(e),t},"getThemeVariables"),Sr,H0=(Sr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=lt(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=Be(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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||q(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||q(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||C(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||C(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||z(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Sr,"Theme"),Sr),Qh=g(e=>{const t=new H0;return t.calculate(e),t},"getThemeVariables"),Tr,Y0=(Tr=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=q("#cde498",10),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=z(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,s:-30,l:-(8+t*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||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-30}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Tr,"Theme"),Tr),U0=g(e=>{const t=new Y0;return t.calculate(e),t},"getThemeVariables"),Br,X0=(Br=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{l:-(8+t*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=q(this.contrast,30),this.sectionBkgColor2=q(this.contrast,30),this.taskBorderColor=z(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=q(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||C(this.primaryColor,{h:-30}),this.git4=this.pie5||C(this.primaryColor,{h:-60}),this.git5=this.pie6||C(this.primaryColor,{h:-90}),this.git6=this.pie7||C(this.primaryColor,{h:60}),this.git7=this.pie8||C(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Br,"Theme"),Br),G0=g(e=>{const t=new X0;return t.calculate(e),t},"getThemeVariables"),_r,V0=(_r=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=lt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=C(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||q(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||C(t,{h:30}),this.cScale4=this.cScale4||C(t,{h:60}),this.cScale5=this.cScale5||C(t,{h:90}),this.cScale6=this.cScale6||C(t,{h:120}),this.cScale7=this.cScale7||C(t,{h:150}),this.cScale8=this.cScale8||C(t,{h:210,l:150}),this.cScale9=this.cScale9||C(t,{h:270}),this.cScale10=this.cScale10||C(t,{h:300}),this.cScale11=this.cScale11||C(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(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||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?z(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||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(_r,"Theme"),_r),Z0=g(e=>{const t=new V0;return t.calculate(e),t},"getThemeVariables"),Lr,K0=(Lr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.border1="#ccc",this.border2=Be(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(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=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Lr,"Theme"),Lr),Q0=g(e=>{const t=new K0;return t.calculate(e),t},"getThemeVariables"),Fr,J0=(Fr=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=lt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=C(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||q(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(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||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?z(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||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Fr,"Theme"),Fr),tx=g(e=>{const t=new J0;return t.calculate(e),t},"getThemeVariables"),Mr,ex=(Mr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.border1="#ccc",this.border2=Be(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Mr,"Theme"),Mr),rx=g(e=>{const t=new ex;return t.calculate(e),t},"getThemeVariables"),Ar,ix=(Ar=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=lt(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=C(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||q(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(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||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?z(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||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Ar,"Theme"),Ar),sx=g(e=>{const t=new ix;return t.calculate(e),t},"getThemeVariables"),Er,ox=(Er=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.border1="#ccc",this.border2=Be(255,255,255,.25),this.arrowheadColor=L(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=z(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Er,"Theme"),Er),ax=g(e=>{const t=new ox;return t.calculate(e),t},"getThemeVariables"),_e={base:{getThemeVariables:z0},dark:{getThemeVariables:j0},default:{getThemeVariables:Qh},forest:{getThemeVariables:U0},neutral:{getThemeVariables:G0},neo:{getThemeVariables:Z0},"neo-dark":{getThemeVariables:Q0},redux:{getThemeVariables:tx},"redux-dark":{getThemeVariables:rx},"redux-color":{getThemeVariables:sx},"redux-dark-color":{getThemeVariables:ax}},Mt={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,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},Jh={...Mt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:_e.default.getThemeVariables(),sequence:{...Mt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Mt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Mt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Mt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Mt.pie,useWidth:984},xyChart:{...Mt.xyChart,useWidth:void 0},requirement:{...Mt.requirement,useWidth:void 0},packet:{...Mt.packet},eventmodeling:{...Mt.eventmodeling},treeView:{...Mt.treeView,useWidth:void 0},radar:{...Mt.radar},railroad:{...Mt.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:{...Mt.ishikawa},sankey:{...Mt.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:{...Mt.venn},cynefin:{...Mt.cynefin}},tc=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...tc(e[i],"")]:[...r,t+i],[]),"keyify"),nx=new Set(tc(Jh,"")),Ka=Jh,lx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},hx=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(Y.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ms=g(e=>{if(Y.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ms(t));return}for(const t of Object.keys(e)){if(Y.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!nx.has(t)||e[t]==null){Y.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=lx[t];i?hx(e[t],i):(Y.debug("sanitizing object",t),ms(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(Y.debug("sanitizing css option",t),e[t]=ec(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}Y.debug("After sanitization",e)}},"sanitizeDirective"),ec=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Or=Object.freeze(Ka),Ce=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),jt=vt({},Or),ys,rr=[],mi=vt({},Or),Gs=g((e,t)=>{let r=vt({},e),i={};for(const s of t)sc(s),i=vt(i,s);if(r=vt(r,i),i.theme&&i.theme in _e){const s=vt({},ys),o=vt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in _e&&(r.themeVariables=_e[r.theme].getThemeVariables(o))}return mi=r,ac(mi),mi},"updateCurrentConfig"),cx=g(e=>(jt=vt({},Or),jt=vt(jt,e),e.theme&&_e[e.theme]&&(jt.themeVariables=_e[e.theme].getThemeVariables(e.themeVariables)),Gs(jt,rr),jt),"setSiteConfig"),dx=g(e=>{ys=vt({},e)},"saveConfigFromInitialize"),ux=g(e=>(jt=vt(jt,e),Gs(jt,rr),jt),"updateSiteConfig"),rc=g(()=>vt({},jt),"getSiteConfig"),ic=g(e=>(ac(e),vt(mi,e),Ct()),"setConfig"),Ct=g(()=>vt({},mi),"getConfig"),sc=g(e=>{e&&(["secure",...jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(Y.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"&&sc(e[t])}))},"sanitize"),fx=g(e=>{ms(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),rr.push(e),Gs(jt,rr)},"addDirective"),xs=g((e=jt)=>{rr=[],Gs(e,rr)},"reset"),gx={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."},bl={},oc=g(e=>{bl[e]||(Y.warn(gx[e]),bl[e]=!0)},"issueWarning"),ac=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&oc("LAZY_LOAD_DEPRECATED")},"checkConfig"),px=g(()=>{let e={};ys&&(e=vt(e,ys));for(const t of rr)e=vt(e,t);return e},"getUserDefinedConfig"),Ot=g(e=>(e.flowchart?.htmlLabels!=null&&oc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ce(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),nc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,yi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,mx=/\s*%%.*\n/gm,$r,lc=($r=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g($r,"UnknownDiagramError"),$r),ir={},Qa=g(function(e,t){e=e.replace(nc,"").replace(yi,"").replace(mx,`
7
- `);for(const[r,{detector:i}]of Object.entries(ir))if(i(e,t))return r;throw new lc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),jo=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)hc(t,r,i)},"registerLazyLoadedDiagrams"),hc=g((e,t,r)=>{ir[e]&&Y.warn(`Detector with key ${e} already exists. Overwriting.`),ir[e]={detector:t,loader:r},Y.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),yx=g(e=>ir[e].loader,"getDiagramLoader"),Yr=/<br\s*\/?>/gi,xx=g(e=>e?uc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Cx=(()=>{let e=!1;return()=>{e||(cc(),e=!0)}})();function cc(){const e="data-temp-href-target";er.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),er.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(cc,"setupDompurifyHooks");var dc=g(e=>(Cx(),er.sanitize(e)),"removeScript"),kl=g((e,t)=>{if(Ot(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=dc(e):r!=="loose"&&(e=uc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=vx(e))}return e},"sanitizeMore"),Kt=g((e,t)=>e&&(t.dompurifyConfig?e=er.sanitize(kl(e,t),t.dompurifyConfig).toString():e=er.sanitize(kl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),bx=g((e,t)=>typeof e=="string"?Kt(e,t):e.flat().map(r=>Kt(r,t)),"sanitizeTextOrArray"),kx=g(e=>Yr.test(e),"hasBreaks"),wx=g(e=>e.split(Yr),"splitBreaks"),vx=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),uc=g(e=>e.replace(Yr,"#br#"),"breakToPlaceholder"),fc=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Sx=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Tx=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ho=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];Bx(o,a)&&(s=o+","+a,i++,r.pop())}r.push(_x(s))}return r.join("")},"parseGenericTypes"),Yo=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Bx=g((e,t)=>{const r=Yo(e,"~"),i=Yo(t,"~");return r===1&&i===1},"shouldCombineSets"),_x=g(e=>{const t=Yo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),wl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Uo=/\$\$(.*?)\$\$/g,Rr=g(e=>(e.match(Uo)?.length??0)>0,"hasKatex"),Lx=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Ja(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Fx=g(async(e,t)=>{if(!Rr(e))return e;if(!(wl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Uo,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!wl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Yr).map(s=>Rr(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Uo,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Ja=g(async(e,t)=>Kt(await Fx(e,t),t),"renderKatexSanitized"),Ur={getRows:xx,sanitizeText:Kt,sanitizeTextOrArray:bx,hasBreaks:kx,splitBreaks:wx,lineBreakRegex:Yr,removeScript:dc,getUrl:fc,evaluate:Ce,getMax:Sx,getMin:Tx},Mx=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Ax=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),tn=g(function(e,t,r,i){const s=Ax(t,r,i);Mx(e,s)},"configureSvgSize"),gc=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;Y.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;Y.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,Y.info(`Calculated bounds: ${n}x${l}`),tn(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"),ss={};function Xo(e){return[...e.cssRules].map(t=>t.cssText).join(`
8
- `)}g(Xo,"cssStyleSheetToString");var Ex=g((e,t,r,i)=>{let s="";return e in ss&&ss[e]?s=ss[e]({...r,svgId:i}):Y.warn(`No theme found for ${e}`),` & {
6
+ <%s key={someKey} {...props} />`,G,K,ot,K),R[K+G]=!0)}if(K=null,W!==void 0&&(r(W),K=""+W),a(H)&&(r(H.key),K=""+H.key),"key"in H){W={};for(var ct in H)ct!=="key"&&(W[ct]=H[ct])}else W=H;return K&&n(W,typeof B=="function"?B.displayName||B.name||"Unknown":B),c(B,K,W,s(),V,Z)}function d(B){f(B)?B._store&&(B._store.validated=1):typeof B=="object"&&B!==null&&B.$$typeof===D&&(B._payload.status==="fulfilled"?f(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function f(B){return typeof B=="object"&&B!==null&&B.$$typeof===p}var u=Y,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),X=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,I=Array.isArray,$=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(B){return B()}};var A,N={},P=u.react_stack_bottom_frame.bind(u,o)(),E=$(i(o)),R={};Jr.Fragment=y,Jr.jsx=function(B,H,W){var G=1e4>X.recentlyCreatedOwnerStacks++;return h(B,H,W,!1,G?Error("react-stack-top-frame"):P,G?$(i(B)):E)},Jr.jsxs=function(B,H,W){var G=1e4>X.recentlyCreatedOwnerStacks++;return h(B,H,W,!0,G?Error("react-stack-top-frame"):P,G?$(i(B)):E)}})()),Jr}var ml;function Xy(){return ml||(ml=1,process.env.NODE_ENV==="production"?qi.exports=Yy():qi.exports=Uy()),qi.exports}var w=Xy();typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),i}));const Gy=typeof document<"u"&&!!document.documentMode;let ko;function Vy(){return ko||(ko=document.createElement("div").style)}const yl=["webkit","moz","ms"],zi={};function Xa(e){if(zi[e])return zi[e];const t=Vy();if(e in t)return zi[e]=e;const r=e[0].toUpperCase()+e.slice(1);let i=yl.length;for(;i--;){const s=`${yl[i]}${r}`;if(s in t)return zi[e]=s}}function Wi(e,t){return parseFloat(t[Xa(e)])||0}function ji(e,t,r=window.getComputedStyle(e)){const i=t==="border"?"Width":"";return{left:Wi(`${t}Left${i}`,r),right:Wi(`${t}Right${i}`,r),top:Wi(`${t}Top${i}`,r),bottom:Wi(`${t}Bottom${i}`,r)}}function mr(e,t,r){e.style[Xa(t)]=r}function Zy(e,t){const r=Xa("transform");mr(e,"transition",`${r} ${t.duration}ms ${t.easing}`)}function Ky(e,{x:t,y:r,scale:i,isSVG:s},o){if(mr(e,"transform",`scale(${i}) translate(${t}px, ${r}px)`),s&&Gy){const a=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",a)}}function wo(e){let t=e.parentNode;(!t||t.nodeType!==1)&&(t=document.documentElement);const r=window.getComputedStyle(e),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:r,width:s.width,height:s.height,top:s.top,bottom:s.bottom,left:s.left,right:s.right,margin:ji(e,"margin",r),border:ji(e,"border",r)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:ji(t,"padding",i),border:ji(t,"border",i)}}}let wi={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?wi={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(wi={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function vo(e,t,r,i){wi[e].split(" ").forEach(s=>{t.addEventListener(s,r,i)})}function So(e,t,r){wi[e].split(" ").forEach(i=>{t.removeEventListener(i,r)})}function Yh(e,t){let r=e.length;for(;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function Wo(e,t){let r;if(t.touches){r=0;for(const i of t.touches)i.pointerId=r++,Wo(e,i);return}r=Yh(e,t),r>-1&&e.splice(r,1),e.push(t)}function Qy(e,t){if(t.touches){for(;e.length;)e.pop();return}const r=Yh(e,t);r>-1&&e.splice(r,1)}function xl(e){e=e.slice(0);let t=e.pop(),r;for(;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function To(e){if(e.length<2)return 0;const t=e[0],r=e[1];return Math.sqrt(Math.pow(Math.abs(r.clientX-t.clientX),2)+Math.pow(Math.abs(r.clientY-t.clientY),2))}function Jy(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function t0(e){return(e.getAttribute("class")||"").trim()}function e0(e,t){return e.nodeType===1&&` ${t0(e)} `.indexOf(` ${t} `)>-1}function r0(e,t){for(let r=e;r!=null;r=r.parentNode)if(e0(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}const i0=/^http:[\w\.\/]+svg$/;function s0(e){return i0.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function o0(e){const t={};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}const Uh={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:Ky,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Xh(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(e.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!Jy(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...Uh,...t};const r=s0(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,mr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function s(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",mr(e,"transformOrigin","")}function o(E={}){for(const R in E)E.hasOwnProperty(R)&&(t[R]=E[R]);(E.hasOwnProperty("cursor")||E.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),E.hasOwnProperty("overflow")&&(i.style.overflow=E.overflow),E.hasOwnProperty("touchAction")&&(i.style.touchAction=E.touchAction,e.style.touchAction=E.touchAction)}let a=0,n=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{p(t.startX,t.startY,{animate:!1,force:!0})});function h(E,R,B){if(B.silent)return;const H=new CustomEvent(E,{detail:R});e.dispatchEvent(H)}function d(E,R,B){const H={x:a,y:n,scale:l,isSVG:r,originalEvent:B};return requestAnimationFrame(()=>{typeof R.animate=="boolean"&&(R.animate?Zy(e,R):mr(e,"transition","none")),R.setTransform(e,H,R),h(E,H,R),h("panzoomchange",H,R)}),H}function f(E,R,B,H){const W={...t,...H},G={x:a,y:n,opts:W};if(!H?.force&&(W.disablePan||W.panOnlyWhenZoomed&&l===W.startScale))return G;if(E=parseFloat(E),R=parseFloat(R),W.disableXAxis||(G.x=(W.relative?a:0)+E),W.disableYAxis||(G.y=(W.relative?n:0)+R),W.contain){const V=wo(e),Z=V.elem.width/l,K=V.elem.height/l,ot=Z*B,ct=K*B,ut=(ot-Z)/2,mt=(ct-K)/2;if(W.contain==="inside"){const wt=(-V.elem.margin.left-V.parent.padding.left+ut)/B,Dt=(V.parent.width-ot-V.parent.padding.left-V.elem.margin.left-V.parent.border.left-V.parent.border.right+ut)/B;G.x=Math.max(Math.min(G.x,Dt),wt);const Gt=(-V.elem.margin.top-V.parent.padding.top+mt)/B,ke=(V.parent.height-ct-V.parent.padding.top-V.elem.margin.top-V.parent.border.top-V.parent.border.bottom+mt)/B;G.y=Math.max(Math.min(G.y,ke),Gt)}else if(W.contain==="outside"){const wt=(-(ot-V.parent.width)-V.parent.padding.left-V.parent.border.left-V.parent.border.right+ut)/B,Dt=(ut-V.parent.padding.left)/B;G.x=Math.max(Math.min(G.x,Dt),wt);const Gt=(-(ct-V.parent.height)-V.parent.padding.top-V.parent.border.top-V.parent.border.bottom+mt)/B,ke=(mt-V.parent.padding.top)/B;G.y=Math.max(Math.min(G.y,ke),Gt)}}return W.roundPixels&&(G.x=Math.round(G.x),G.y=Math.round(G.y)),G}function u(E,R){const B={...t,...R},H={scale:l,opts:B};if(!R?.force&&B.disableZoom)return H;let W=t.minScale,G=t.maxScale;if(B.contain){const V=wo(e),Z=V.elem.width/l,K=V.elem.height/l;if(Z>1&&K>1){const ot=V.parent.width-V.parent.border.left-V.parent.border.right,ct=V.parent.height-V.parent.border.top-V.parent.border.bottom,ut=ot/Z,mt=ct/K;t.contain==="inside"?G=Math.min(G,ut,mt):t.contain==="outside"&&(W=Math.max(W,ut,mt))}}return H.scale=Math.min(Math.max(E,W),G),H}function p(E,R,B,H){const W=f(E,R,l,B);return a!==W.x||n!==W.y?(a=W.x,n=W.y,d("panzoompan",W.opts,H)):{x:a,y:n,scale:l,isSVG:r,originalEvent:H}}function m(E,R,B){const H=u(E,R),W=H.opts;if(!R?.force&&W.disableZoom)return;E=H.scale;let G=a,V=n;if(W.focal){const K=W.focal;G=(K.x/E-K.x/l+a*E)/E,V=(K.y/E-K.y/l+n*E)/E}const Z=f(G,V,E,{relative:!1,force:!0});return a=Z.x,n=Z.y,l=E,d("panzoomzoom",W,B)}function y(E,R){const B={...t,animate:!0,...R};return m(l*Math.exp((E?1:-1)*B.step),B)}function x(E){return y(!0,E)}function b(E){return y(!1,E)}function k(E,R,B,H){const W=wo(e),G={width:W.parent.width-W.parent.padding.left-W.parent.padding.right-W.parent.border.left-W.parent.border.right,height:W.parent.height-W.parent.padding.top-W.parent.padding.bottom-W.parent.border.top-W.parent.border.bottom};let V=R.clientX-W.parent.left-W.parent.padding.left-W.parent.border.left-W.elem.margin.left,Z=R.clientY-W.parent.top-W.parent.padding.top-W.parent.border.top-W.elem.margin.top;r||(V-=W.elem.width/l/2,Z-=W.elem.height/l/2);const K={x:V/G.width*(G.width*E),y:Z/G.height*(G.height*E)};return m(E,{...B,animate:!1,focal:K},H)}function v(E,R){E.preventDefault();const B={...t,...R,animate:!1},W=(E.deltaY===0&&E.deltaX?E.deltaX:E.deltaY)<0?1:-1,G=u(l*Math.exp(W*B.step/3),B).scale;return k(G,E,B,E)}function S(E){const R={...t,animate:!0,force:!0,...E};l=u(R.startScale,R).scale;const B=f(R.startX,R.startY,l,R);return a=B.x,n=B.y,d("panzoomreset",R)}let _,F,T,D,M,O;const X=[];function j(E){if(r0(E.target,t))return;Wo(X,E),c=!0,t.handleStartEvent(E),_=a,F=n,h("panzoomstart",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t);const R=xl(X);T=R.clientX,D=R.clientY,M=l,O=To(X)}function I(E){if(!c||_===void 0||F===void 0||T===void 0||D===void 0)return;Wo(X,E);const R=xl(X),B=X.length>1;let H=l;if(B){O===0&&(O=To(X));const W=To(X)-O;H=u(W*t.step/80+M).scale,k(H,R,{animate:!1},E)}(!B||t.pinchAndPan)&&p(_+(R.clientX-T)/H,F+(R.clientY-D)/H,{animate:!1},E)}function $(E){X.length===1&&h("panzoomend",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t),Qy(X,E),c&&(c=!1,_=F=T=D=void 0)}let A=!1;function N(){A||(A=!0,vo("down",t.canvas?i:e,j),vo("move",document,I,{passive:!0}),vo("up",document,$,{passive:!0}))}function P(){A=!1,So("down",t.canvas?i:e,j),So("move",document,I),So("up",document,$)}return t.noBind||N(),{bind:N,destroy:P,eventNames:wi,getPan:()=>({x:a,y:n}),getScale:()=>l,getOptions:()=>o0(t),handleDown:j,handleMove:I,handleUp:$,pan:p,reset:S,resetStyle:s,setOptions:o,setStyle:(E,R)=>mr(e,E,R),zoom:m,zoomIn:x,zoomOut:b,zoomToPoint:k,zoomWithWheel:v}}Xh.defaultOptions=Uh;const a0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n0=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),Cl=e=>{const t=n0(e);return t.charAt(0).toUpperCase()+t.slice(1)},Gh=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),l0=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var h0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c0=Y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:a,...n},l)=>Y.createElement("svg",{ref:l,...h0,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Gh("lucide",s),...!o&&!l0(n)&&{"aria-hidden":"true"},...n},[...a.map(([c,h])=>Y.createElement(c,h)),...Array.isArray(o)?o:[o]]));const ne=(e,t)=>{const r=Y.forwardRef(({className:i,...s},o)=>Y.createElement(c0,{ref:o,iconNode:t,className:Gh(`lucide-${a0(Cl(e))}`,`lucide-${e}`,i),...s}));return r.displayName=Cl(e),r};const d0=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],u0=ne("list",d0);const f0=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],g0=ne("palette",f0);const p0=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],Ga=ne("pin-off",p0);const m0=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Va=ne("pin",m0);const y0=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],x0=ne("refresh-cw",y0);const C0=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],b0=ne("settings-2",C0);const k0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],w0=ne("text-align-center",k0);const v0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],S0=ne("text-align-end",v0);const T0=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],B0=ne("text-align-start",T0);const _0=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],L0=ne("zoom-in",_0);const F0=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],M0=ne("zoom-out",F0);var Vh=Object.defineProperty,g=(e,t)=>Vh(e,"name",{value:t,configurable:!0}),Zh=(e,t)=>{for(var r in t)Vh(e,r,{get:t[r],enumerable:!0})},rs={exports:{}},A0=rs.exports,bl;function E0(){return bl||(bl=1,(function(e,t){(function(r,i){e.exports=i()})(A0,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var $=["th","st","nd","rd"],A=I%100;return"["+I+($[(A-20)%10]||$[A]||$[0])+"]"}},k=function(I,$,A){var N=String(I);return!N||N.length>=$?I:""+Array($+1-N.length).join(A)+I},v={s:k,z:function(I){var $=-I.utcOffset(),A=Math.abs($),N=Math.floor(A/60),P=A%60;return($<=0?"+":"-")+k(N,2,"0")+":"+k(P,2,"0")},m:function I($,A){if($.date()<A.date())return-I(A,$);var N=12*(A.year()-$.year())+(A.month()-$.month()),P=$.clone().add(N,d),E=A-P<0,R=$.clone().add(N+(E?-1:1),d);return+(-(N+(A-P)/(E?P-R:R-P))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:d,y:u,w:h,d:c,D:p,h:l,m:n,s:a,ms:o,Q:f}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},S="en",_={};_[S]=b;var F="$isDayjsObject",T=function(I){return I instanceof X||!(!I||!I[F])},D=function I($,A,N){var P;if(!$)return S;if(typeof $=="string"){var E=$.toLowerCase();_[E]&&(P=E),A&&(_[E]=A,P=E);var R=$.split("-");if(!P&&R.length>1)return I(R[0])}else{var B=$.name;_[B]=$,P=B}return!N&&P&&(S=P),P||!N&&S},M=function(I,$){if(T(I))return I.clone();var A=typeof $=="object"?$:{};return A.date=I,A.args=arguments,new X(A)},O=v;O.l=D,O.i=T,O.w=function(I,$){return M(I,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var X=(function(){function I(A){this.$L=D(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[F]=!0}var $=I.prototype;return $.parse=function(A){this.$d=(function(N){var P=N.date,E=N.utc;if(P===null)return new Date(NaN);if(O.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var R=P.match(y);if(R){var B=R[2]-1||0,H=(R[7]||"0").substring(0,3);return E?new Date(Date.UTC(R[1],B,R[3]||1,R[4]||0,R[5]||0,R[6]||0,H)):new Date(R[1],B,R[3]||1,R[4]||0,R[5]||0,R[6]||0,H)}}return new Date(P)})(A),this.init()},$.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},$.$utils=function(){return O},$.isValid=function(){return this.$d.toString()!==m},$.isSame=function(A,N){var P=M(A);return this.startOf(N)<=P&&P<=this.endOf(N)},$.isAfter=function(A,N){return M(A)<this.startOf(N)},$.isBefore=function(A,N){return this.endOf(N)<M(A)},$.$g=function(A,N,P){return O.u(A)?this[N]:this.set(P,A)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(A,N){var P=this,E=!!O.u(N)||N,R=O.p(A),B=function(ct,ut){var mt=O.w(P.$u?Date.UTC(P.$y,ut,ct):new Date(P.$y,ut,ct),P);return E?mt:mt.endOf(c)},H=function(ct,ut){return O.w(P.toDate()[ct].apply(P.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(ut)),P)},W=this.$W,G=this.$M,V=this.$D,Z="set"+(this.$u?"UTC":"");switch(R){case u:return E?B(1,0):B(31,11);case d:return E?B(1,G):B(0,G+1);case h:var K=this.$locale().weekStart||0,ot=(W<K?W+7:W)-K;return B(E?V-ot:V+(6-ot),G);case c:case p:return H(Z+"Hours",0);case l:return H(Z+"Minutes",1);case n:return H(Z+"Seconds",2);case a:return H(Z+"Milliseconds",3);default:return this.clone()}},$.endOf=function(A){return this.startOf(A,!1)},$.$set=function(A,N){var P,E=O.p(A),R="set"+(this.$u?"UTC":""),B=(P={},P[c]=R+"Date",P[p]=R+"Date",P[d]=R+"Month",P[u]=R+"FullYear",P[l]=R+"Hours",P[n]=R+"Minutes",P[a]=R+"Seconds",P[o]=R+"Milliseconds",P)[E],H=E===c?this.$D+(N-this.$W):N;if(E===d||E===u){var W=this.clone().set(p,1);W.$d[B](H),W.init(),this.$d=W.set(p,Math.min(this.$D,W.daysInMonth())).$d}else B&&this.$d[B](H);return this.init(),this},$.set=function(A,N){return this.clone().$set(A,N)},$.get=function(A){return this[O.p(A)]()},$.add=function(A,N){var P,E=this;A=Number(A);var R=O.p(N),B=function(G){var V=M(E);return O.w(V.date(V.date()+Math.round(G*A)),E)};if(R===d)return this.set(d,this.$M+A);if(R===u)return this.set(u,this.$y+A);if(R===c)return B(1);if(R===h)return B(7);var H=(P={},P[n]=i,P[l]=s,P[a]=r,P)[R]||1,W=this.$d.getTime()+A*H;return O.w(W,this)},$.subtract=function(A,N){return this.add(-1*A,N)},$.format=function(A){var N=this,P=this.$locale();if(!this.isValid())return P.invalidDate||m;var E=A||"YYYY-MM-DDTHH:mm:ssZ",R=O.z(this),B=this.$H,H=this.$m,W=this.$M,G=P.weekdays,V=P.months,Z=P.meridiem,K=function(ut,mt,wt,Dt){return ut&&(ut[mt]||ut(N,E))||wt[mt].slice(0,Dt)},ot=function(ut){return O.s(B%12||12,ut,"0")},ct=Z||function(ut,mt,wt){var Dt=ut<12?"AM":"PM";return wt?Dt.toLowerCase():Dt};return E.replace(x,(function(ut,mt){return mt||(function(wt){switch(wt){case"YY":return String(N.$y).slice(-2);case"YYYY":return O.s(N.$y,4,"0");case"M":return W+1;case"MM":return O.s(W+1,2,"0");case"MMM":return K(P.monthsShort,W,V,3);case"MMMM":return K(V,W);case"D":return N.$D;case"DD":return O.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return K(P.weekdaysMin,N.$W,G,2);case"ddd":return K(P.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(B);case"HH":return O.s(B,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return ct(B,H,!0);case"A":return ct(B,H,!1);case"m":return String(H);case"mm":return O.s(H,2,"0");case"s":return String(N.$s);case"ss":return O.s(N.$s,2,"0");case"SSS":return O.s(N.$ms,3,"0");case"Z":return R}return null})(ut)||R.replace(":","")}))},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(A,N,P){var E,R=this,B=O.p(N),H=M(A),W=(H.utcOffset()-this.utcOffset())*i,G=this-H,V=function(){return O.m(R,H)};switch(B){case u:E=V()/12;break;case d:E=V();break;case f:E=V()/3;break;case h:E=(G-W)/6048e5;break;case c:E=(G-W)/864e5;break;case l:E=G/s;break;case n:E=G/i;break;case a:E=G/r;break;default:E=G}return P?E:O.a(E)},$.daysInMonth=function(){return this.endOf(d).$D},$.$locale=function(){return _[this.$L]},$.locale=function(A,N){if(!A)return this.$L;var P=this.clone(),E=D(A,N,!0);return E&&(P.$L=E),P},$.clone=function(){return O.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},I})(),j=X.prototype;return M.prototype=j,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",p]].forEach((function(I){j[I[1]]=function($){return this.$g($,I[0],I[1])}})),M.extend=function(I,$){return I.$i||(I($,X,M),I.$i=!0),M},M.locale=D,M.isDayjs=T,M.unix=function(I){return M(1e3*I)},M.en=_[S],M.Ls=_,M.p={},M}))})(rs)),rs.exports}var $0=E0();const Kh=Hh($0);var we={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},U={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Za=g(function(e="fatal"){let t=we.fatal;typeof e=="string"?e.toLowerCase()in we&&(t=we[e]):typeof e=="number"&&(t=e),U.trace=()=>{},U.debug=()=>{},U.info=()=>{},U.warn=()=>{},U.error=()=>{},U.fatal=()=>{},t<=we.fatal&&(U.fatal=console.error?console.error.bind(console,Vt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Vt("FATAL"))),t<=we.error&&(U.error=console.error?console.error.bind(console,Vt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Vt("ERROR"))),t<=we.warn&&(U.warn=console.warn?console.warn.bind(console,Vt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Vt("WARN"))),t<=we.info&&(U.info=console.info?console.info.bind(console,Vt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Vt("INFO"))),t<=we.debug&&(U.debug=console.debug?console.debug.bind(console,Vt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("DEBUG"))),t<=we.trace&&(U.trace=console.debug?console.debug.bind(console,Vt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Vt("TRACE")))},"setLogLevel"),Vt=g(e=>`%c${Kh().format("ss.SSS")} : ${e} : `,"format");const is={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return is.hue2rgb(o,s,e+1/3)*255;case"g":return is.hue2rgb(o,s,e)*255;case"b":return is.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);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}}},P0={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},I0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ht={channel:is,lang:P0,unit:I0},$e={};for(let e=0;e<=255;e++)$e[e]=ht.unit.dec2hex(e);const Pt={ALL:0,RGB:1,HSL:2};class O0{constructor(){this.type=Pt.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=Pt.ALL}is(t){return this.type===t}}class R0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new O0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Pt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=ht.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ht.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=ht.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=ht.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ht.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=ht.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Pt.HSL)&&r!==void 0?r:(this._ensureHSL(),ht.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Pt.RGB)&&r!==void 0?r:(this._ensureRGB(),ht.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Pt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Pt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Pt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Pt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Pt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Pt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Xs=new R0({r:0,g:0,b:0,a:0},"transparent"),Cr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Cr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Xs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${$e[Math.round(t)]}${$e[Math.round(r)]}${$e[Math.round(i)]}${$e[Math.round(s*255)]}`:`#${$e[Math.round(t)]}${$e[Math.round(r)]}${$e[Math.round(i)]}`}},Ge={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(Ge.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ht.channel.clamp.h(parseFloat(r)*.9);case"rad":return ht.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ht.channel.clamp.h(parseFloat(r)*360)}}return ht.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Ge.re);if(!r)return;const[,i,s,o,a,n]=r;return Xs.set({h:Ge._hue2deg(i),s:ht.channel.clamp.s(parseFloat(s)),l:ht.channel.clamp.l(parseFloat(o)),a:a?ht.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${ht.lang.round(t)}, ${ht.lang.round(r)}%, ${ht.lang.round(i)}%, ${s})`:`hsl(${ht.lang.round(t)}, ${ht.lang.round(r)}%, ${ht.lang.round(i)}%)`}},pi={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=pi.colors[e];if(t)return Cr.parse(t)},stringify:e=>{const t=Cr.stringify(e);for(const r in pi.colors)if(pi.colors[r]===t)return r}},ni={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(ni.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Xs.set({r:ht.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:ht.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:ht.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?ht.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(${ht.lang.round(t)}, ${ht.lang.round(r)}, ${ht.lang.round(i)}, ${ht.lang.round(s)})`:`rgb(${ht.lang.round(t)}, ${ht.lang.round(r)}, ${ht.lang.round(i)})`}},ae={format:{keyword:pi,hex:Cr,rgb:ni,rgba:ni,hsl:Ge,hsla:Ge},parse:e=>{if(typeof e!="string")return e;const t=Cr.parse(e)||ni.parse(e)||Ge.parse(e)||pi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Pt.HSL)||e.data.r===void 0?Ge.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ni.stringify(e):Cr.stringify(e)},Qh=(e,t)=>{const r=ae.parse(e);for(const i in t)r[i]=ht.channel.clamp[i](t[i]);return ae.stringify(r)},_e=(e,t,r=0,i=1)=>{if(typeof e!="number")return Qh(e,{a:t});const s=Xs.set({r:ht.channel.clamp.r(e),g:ht.channel.clamp.g(t),b:ht.channel.clamp.b(r),a:ht.channel.clamp.a(i)});return ae.stringify(s)},D0=e=>{const{r:t,g:r,b:i}=ae.parse(e),s=.2126*ht.channel.toLinear(t)+.7152*ht.channel.toLinear(r)+.0722*ht.channel.toLinear(i);return ht.lang.round(s)},N0=e=>D0(e)>=.5,Jt=e=>!N0(e),Ka=(e,t,r)=>{const i=ae.parse(e),s=i[t],o=ht.channel.clamp[t](s+r);return s!==o&&(i[t]=o),ae.stringify(i)},q=(e,t)=>Ka(e,"l",t),z=(e,t)=>Ka(e,"l",-t),C=(e,t)=>{const r=ae.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Qh(e,i)},q0=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=ae.parse(e),{r:n,g:l,b:c,a:h}=ae.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,x=i*m+n*y,b=s*m+l*y,k=o*m+c*y,v=a*d+h*(1-d);return _e(x,b,k,v)},L=(e,t=100)=>{const r=ae.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,q0(r,e,t)};var jo=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>jo(e,o,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=jo(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),St=jo,ye="#ffffff",xe="#f2f2f2",lt=g((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),"mkBorder"),wr,z0=(wr=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(wr,"Theme"),wr),W0=g(e=>{const t=new z0;return t.calculate(e),t},"getThemeVariables"),vr,j0=(vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=_e(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=z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=z(this.sectionBkgColor,10),this.taskBorderColor=_e(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=_e(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||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=q(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=q(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=q(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=L(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??q(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.secondaryColor,20),this.git1=q(this.pie2||this.secondaryColor,20),this.git2=q(this.pie3||this.tertiaryColor,20),this.git3=q(this.pie4||C(this.primaryColor,{h:-30}),20),this.git4=q(this.pie5||C(this.primaryColor,{h:-60}),20),this.git5=q(this.pie6||C(this.primaryColor,{h:-90}),10),this.git6=q(this.pie7||C(this.primaryColor,{h:60}),10),this.git7=q(this.pie8||C(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||q("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||q("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||q("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||q("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||q(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||q(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||q(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||q(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(vr,"Theme"),vr),H0=g(e=>{const t=new j0;return t.calculate(e),t},"getThemeVariables"),Sr,Y0=(Sr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=lt(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=_e(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||L(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||L(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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||q(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||q(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||C(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||C(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||z(L(this.git0),25),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Sr,"Theme"),Sr),Jh=g(e=>{const t=new Y0;return t.calculate(e),t},"getThemeVariables"),Tr,U0=(Tr=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=q("#cde498",10),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.primaryColor),this.lineColor=L(this.background),this.textColor=L(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=z(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=z(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||C(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{h:30,s:-30,l:-(8+t*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||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-30}),this.pie5=this.pie5||C(this.secondaryColor,{l:-30}),this.pie6=this.pie6||C(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??C(this.primaryColor,{l:-30}),this.venn2=this.venn2??C(this.secondaryColor,{l:-30}),this.venn3=this.venn3??C(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??C(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??C(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??C(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??C(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??C(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||L(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Tr,"Theme"),Tr),X0=g(e=>{const t=new U0;return t.calculate(e),t},"getThemeVariables"),Br,G0=(Br=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=q(this.contrast,55),this.background="#ffffff",this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.lineColor=L(this.background),this.textColor=L(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||q(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=q(this.contrast,55),this.border2=this.contrast,this.actorBorder=q(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||L(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||C(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||C(this.mainBkg,{l:-(8+t*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=q(this.contrast,30),this.sectionBkgColor2=q(this.contrast,30),this.taskBorderColor=z(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=q(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=z(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];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 t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||C(this.primaryColor,{h:-30}),this.git4=this.pie5||C(this.primaryColor,{h:-60}),this.git5=this.pie6||C(this.primaryColor,{h:-90}),this.git6=this.pie7||C(this.primaryColor,{h:60}),this.git7=this.pie8||C(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Br,"Theme"),Br),V0=g(e=>{const t=new G0;return t.calculate(e),t},"getThemeVariables"),_r,Z0=(_r=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=lt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=C(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||q(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||C(t,{h:30}),this.cScale4=this.cScale4||C(t,{h:60}),this.cScale5=this.cScale5||C(t,{h:90}),this.cScale6=this.cScale6||C(t,{h:120}),this.cScale7=this.cScale7||C(t,{h:150}),this.cScale8=this.cScale8||C(t,{h:210,l:150}),this.cScale9=this.cScale9||C(t,{h:270}),this.cScale10=this.cScale10||C(t,{h:300}),this.cScale11=this.cScale11||C(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(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||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?z(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||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(_r,"Theme"),_r),K0=g(e=>{const t=new Z0;return t.calculate(e),t},"getThemeVariables"),Lr,Q0=(Lr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.border1="#ccc",this.border2=_e(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(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=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Lr,"Theme"),Lr),J0=g(e=>{const t=new Q0;return t.calculate(e),t},"getThemeVariables"),Fr,tx=(Fr=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=lt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=C(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||q(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=z(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(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||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?z(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||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Fr,"Theme"),Fr),ex=g(e=>{const t=new tx;return t.calculate(e),t},"getThemeVariables"),Mr,rx=(Mr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.border1="#ccc",this.border2=_e(255,255,255,.25),this.arrowheadColor=L(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=z(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(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||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Mr,"Theme"),Mr),ix=g(e=>{const t=new rx;return t.calculate(e),t},"getThemeVariables"),Ar,sx=(Ar=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=lt(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=C(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||q(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 o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||L(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||z(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||C(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||C(t,{h:64}),this.fillType3=this.fillType3||C(r,{h:64}),this.fillType4=this.fillType4||C(t,{h:-64}),this.fillType5=this.fillType5||C(r,{h:-64}),this.fillType6=this.fillType6||C(t,{h:128}),this.fillType7=this.fillType7||C(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||C(t,{l:-10}),this.pie5=this.pie5||C(r,{l:-10}),this.pie6=this.pie6||C(i,{l:-10}),this.pie7=this.pie7||C(t,{h:60,l:-10}),this.pie8=this.pie8||C(t,{h:-60,l:-10}),this.pie9=this.pie9||C(t,{h:120,l:0}),this.pie10=this.pie10||C(t,{h:60,l:-20}),this.pie11=this.pie11||C(t,{h:-60,l:-20}),this.pie12=this.pie12||C(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||C(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?z(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||C(t,{h:-30}),this.git4=this.git4||C(t,{h:-60}),this.git5=this.git5||C(t,{h:-90}),this.git6=this.git6||C(t,{h:60}),this.git7=this.git7||C(t,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Ar,"Theme"),Ar),ox=g(e=>{const t=new sx;return t.calculate(e),t},"getThemeVariables"),Er,ax=(Er=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=q(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=L(this.background),this.secondaryBorderColor=lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=lt(this.tertiaryColor,this.darkMode),this.primaryTextColor=L(this.primaryColor),this.secondaryTextColor=L(this.secondaryColor),this.tertiaryTextColor=L(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=q(L("#323D47"),10),this.border1="#ccc",this.border2=_e(255,255,255,.25),this.arrowheadColor=L(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||lt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||lt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||lt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||lt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||L(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||L(this.tertiaryColor),this.lineColor=this.lineColor||L(this.background),this.arrowheadColor=this.arrowheadColor||L(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||L(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||q(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 r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||L(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||z(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=z(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||C(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||C(this.primaryColor,{h:64}),this.fillType3=this.fillType3||C(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||C(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||C(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||C(this.primaryColor,{h:128}),this.fillType7=this.fillType7||C(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||C(this.primaryColor,{l:-10}),this.pie5=this.pie5||C(this.secondaryColor,{l:-10}),this.pie6=this.pie6||C(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||C(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||C(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||C(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||C(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||C(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||C(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||C(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||C(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||C(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||C(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||C(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||C(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Jt(this.quadrant1Fill)?q(this.quadrant1Fill):z(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||C(this.primaryColor,{h:-30}),this.git4=this.git4||C(this.primaryColor,{h:-60}),this.git5=this.git5||C(this.primaryColor,{h:-90}),this.git6=this.git6||C(this.primaryColor,{h:60}),this.git7=this.git7||C(this.primaryColor,{h:120}),this.darkMode?(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||L(this.git0),this.gitInv1=this.gitInv1||L(this.git1),this.gitInv2=this.gitInv2||L(this.git2),this.gitInv3=this.gitInv3||L(this.git3),this.gitInv4=this.gitInv4||L(this.git4),this.gitInv5=this.gitInv5||L(this.git5),this.gitInv6=this.gitInv6||L(this.git6),this.gitInv7=this.gitInv7||L(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||ye,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||xe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Er,"Theme"),Er),nx=g(e=>{const t=new ax;return t.calculate(e),t},"getThemeVariables"),Le={base:{getThemeVariables:W0},dark:{getThemeVariables:H0},default:{getThemeVariables:Jh},forest:{getThemeVariables:X0},neutral:{getThemeVariables:V0},neo:{getThemeVariables:K0},"neo-dark":{getThemeVariables:J0},redux:{getThemeVariables:ex},"redux-dark":{getThemeVariables:ix},"redux-color":{getThemeVariables:ox},"redux-dark-color":{getThemeVariables:nx}},Mt={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,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},tc={...Mt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Le.default.getThemeVariables(),sequence:{...Mt.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Mt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Mt.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Mt.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Mt.pie,useWidth:984},xyChart:{...Mt.xyChart,useWidth:void 0},requirement:{...Mt.requirement,useWidth:void 0},packet:{...Mt.packet},eventmodeling:{...Mt.eventmodeling},treeView:{...Mt.treeView,useWidth:void 0},radar:{...Mt.radar},railroad:{...Mt.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:{...Mt.ishikawa},sankey:{...Mt.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:{...Mt.venn},cynefin:{...Mt.cynefin}},ec=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...ec(e[i],"")]:[...r,t+i],[]),"keyify"),lx=new Set(ec(tc,"")),Qa=tc,hx={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},cx=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(U.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ms=g(e=>{if(U.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ms(t));return}for(const t of Object.keys(e)){if(U.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!lx.has(t)||e[t]==null){U.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=hx[t];i?cx(e[t],i):(U.debug("sanitizing object",t),ms(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(U.debug("sanitizing css option",t),e[t]=rc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}U.debug("After sanitization",e)}},"sanitizeDirective"),rc=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Or=Object.freeze(Qa),Ce=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),jt=St({},Or),ys,rr=[],mi=St({},Or),Gs=g((e,t)=>{let r=St({},e),i={};for(const s of t)oc(s),i=St(i,s);if(r=St(r,i),i.theme&&i.theme in Le){const s=St({},ys),o=St(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Le&&(r.themeVariables=Le[r.theme].getThemeVariables(o))}return mi=r,nc(mi),mi},"updateCurrentConfig"),dx=g(e=>(jt=St({},Or),jt=St(jt,e),e.theme&&Le[e.theme]&&(jt.themeVariables=Le[e.theme].getThemeVariables(e.themeVariables)),Gs(jt,rr),jt),"setSiteConfig"),ux=g(e=>{ys=St({},e)},"saveConfigFromInitialize"),fx=g(e=>(jt=St(jt,e),Gs(jt,rr),jt),"updateSiteConfig"),ic=g(()=>St({},jt),"getSiteConfig"),sc=g(e=>(nc(e),St(mi,e),Ct()),"setConfig"),Ct=g(()=>St({},mi),"getConfig"),oc=g(e=>{e&&(["secure",...jt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(U.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"&&oc(e[t])}))},"sanitize"),gx=g(e=>{ms(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),rr.push(e),Gs(jt,rr)},"addDirective"),xs=g((e=jt)=>{rr=[],Gs(e,rr)},"reset"),px={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},kl={},ac=g(e=>{kl[e]||(U.warn(px[e]),kl[e]=!0)},"issueWarning"),nc=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&ac("LAZY_LOAD_DEPRECATED")},"checkConfig"),mx=g(()=>{let e={};ys&&(e=St(e,ys));for(const t of rr)e=St(e,t);return e},"getUserDefinedConfig"),Ot=g(e=>(e.flowchart?.htmlLabels!=null&&ac("FLOWCHART_HTML_LABELS_DEPRECATED"),Ce(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),lc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,yi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,yx=/\s*%%.*\n/gm,$r,hc=($r=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g($r,"UnknownDiagramError"),$r),ir={},Ja=g(function(e,t){e=e.replace(lc,"").replace(yi,"").replace(yx,`
7
+ `);for(const[r,{detector:i}]of Object.entries(ir))if(i(e,t))return r;throw new hc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ho=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)cc(t,r,i)},"registerLazyLoadedDiagrams"),cc=g((e,t,r)=>{ir[e]&&U.warn(`Detector with key ${e} already exists. Overwriting.`),ir[e]={detector:t,loader:r},U.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),xx=g(e=>ir[e].loader,"getDiagramLoader"),Yr=/<br\s*\/?>/gi,Cx=g(e=>e?fc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),bx=(()=>{let e=!1;return()=>{e||(dc(),e=!0)}})();function dc(){const e="data-temp-href-target";er.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),er.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(dc,"setupDompurifyHooks");var uc=g(e=>(bx(),er.sanitize(e)),"removeScript"),wl=g((e,t)=>{if(Ot(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=uc(e):r!=="loose"&&(e=fc(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Sx(e))}return e},"sanitizeMore"),Kt=g((e,t)=>e&&(t.dompurifyConfig?e=er.sanitize(wl(e,t),t.dompurifyConfig).toString():e=er.sanitize(wl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),kx=g((e,t)=>typeof e=="string"?Kt(e,t):e.flat().map(r=>Kt(r,t)),"sanitizeTextOrArray"),wx=g(e=>Yr.test(e),"hasBreaks"),vx=g(e=>e.split(Yr),"splitBreaks"),Sx=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),fc=g(e=>e.replace(Yr,"#br#"),"breakToPlaceholder"),gc=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Tx=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Bx=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Yo=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];_x(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Lx(s))}return r.join("")},"parseGenericTypes"),Uo=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),_x=g((e,t)=>{const r=Uo(e,"~"),i=Uo(t,"~");return r===1&&i===1},"shouldCombineSets"),Lx=g(e=>{const t=Uo(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),vl=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Xo=/\$\$(.*?)\$\$/g,Rr=g(e=>(e.match(Xo)?.length??0)>0,"hasKatex"),Fx=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await tn(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),Mx=g(async(e,t)=>{if(!Rr(e))return e;if(!(vl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Xo,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!vl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Yr).map(s=>Rr(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Xo,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),tn=g(async(e,t)=>Kt(await Mx(e,t),t),"renderKatexSanitized"),Ur={getRows:Cx,sanitizeText:Kt,sanitizeTextOrArray:kx,hasBreaks:wx,splitBreaks:vx,lineBreakRegex:Yr,removeScript:uc,getUrl:gc,evaluate:Ce,getMax:Tx,getMin:Bx},Ax=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Ex=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),en=g(function(e,t,r,i){const s=Ex(t,r,i);Ax(e,s)},"configureSvgSize"),pc=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;U.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;U.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,U.info(`Calculated bounds: ${n}x${l}`),en(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"),ss={};function Go(e){return[...e.cssRules].map(t=>t.cssText).join(`
8
+ `)}g(Go,"cssStyleSheetToString");var $x=g((e,t,r,i)=>{let s="";return e in ss&&ss[e]?s=ss[e]({...r,svgId:i}):U.warn(`No theme found for ${e}`),` & {
9
9
  font-family: ${r.fontFamily};
10
10
  font-size: ${r.fontSize};
11
11
  fill: ${r.textColor}
@@ -126,44 +126,44 @@ React keys must be passed directly to JSX without using spread:
126
126
  }
127
127
 
128
128
  ${t}
129
- `},"getStyles"),$x=g((e,t)=>{t!==void 0&&(ss[e]=t)},"addStylesForDiagram"),Ix=Ex,en={};Vh(en,{clear:()=>pc,getAccDescription:()=>Cc,getAccTitle:()=>yc,getDiagramTitle:()=>kc,setAccDescription:()=>xc,setAccTitle:()=>mc,setDiagramTitle:()=>bc});var rn="",sn="",on="",an=g(e=>Kt(e,Ct()),"sanitizeText"),pc=g(()=>{rn="",on="",sn=""},"clear"),mc=g(e=>{rn=an(e).replace(/^\s+/g,"")},"setAccTitle"),yc=g(()=>rn,"getAccTitle"),xc=g(e=>{on=an(e).replace(/\n\s+/g,`
130
- `)},"setAccDescription"),Cc=g(()=>on,"getAccDescription"),bc=g(e=>{sn=an(e)},"setDiagramTitle"),kc=g(()=>sn,"getDiagramTitle"),vl=Y,Px=Va,gt=Ct,Ox=ic,Rx=Or,nn=g(e=>Kt(e,gt()),"sanitizeText"),wc=gc,Dx=g(()=>en,"getCommonDb"),Cs={},bs=g((e,t,r)=>{Cs[e]&&vl.warn(`Diagram with id ${e} already registered. Overwriting.`),Cs[e]=t,r&&hc(e,r),$x(e,t.styles),t.injectUtils?.(vl,Px,gt,nn,wc,Dx(),()=>{})},"registerDiagram"),Go=g(e=>{if(e in Cs)return Cs[e];throw new Nx(e)},"getDiagram"),Ir,Nx=(Ir=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Ir,"DiagramNotFoundError"),Ir),qx={value:()=>{}};function vc(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new os(r)}function os(e){this._=e}function zx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}os.prototype=vc.prototype={constructor:os,on:function(e,t){var r=this._,i=zx(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=Wx(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=Sl(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Sl(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new os(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function Wx(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Sl(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=qx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Vo="http://www.w3.org/1999/xhtml";const Tl={svg:"http://www.w3.org/2000/svg",xhtml:Vo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vs(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Tl.hasOwnProperty(t)?{space:Tl[t],local:e}:e}function jx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Vo&&t.documentElement.namespaceURI===Vo?t.createElement(e):t.createElementNS(r,e)}}function Hx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sc(e){var t=Vs(e);return(t.local?Hx:jx)(t)}function Yx(){}function ln(e){return e==null?Yx:function(){return this.querySelector(e)}}function Ux(e){typeof e!="function"&&(e=ln(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new Gt(i,this._parents)}function Xx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Gx(){return[]}function Tc(e){return e==null?Gx:function(){return this.querySelectorAll(e)}}function Vx(e){return function(){return Xx(e.apply(this,arguments))}}function Zx(e){typeof e=="function"?e=Vx(e):e=Tc(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new Gt(i,s)}function Bc(e){return function(){return this.matches(e)}}function _c(e){return function(t){return t.matches(e)}}var Kx=Array.prototype.find;function Qx(e){return function(){return Kx.call(this.children,e)}}function Jx(){return this.firstElementChild}function tC(e){return this.select(e==null?Jx:Qx(typeof e=="function"?e:_c(e)))}var eC=Array.prototype.filter;function rC(){return Array.from(this.children)}function iC(e){return function(){return eC.call(this.children,e)}}function sC(e){return this.selectAll(e==null?rC:iC(typeof e=="function"?e:_c(e)))}function oC(e){typeof e!="function"&&(e=Bc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Gt(i,this._parents)}function Lc(e){return new Array(e.length)}function aC(){return new Gt(this._enter||this._groups.map(Lc),this._parents)}function ks(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ks.prototype={constructor:ks,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function nC(e){return function(){return e}}function lC(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new ks(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function hC(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,d=o.length,f=new Array(h),u;for(n=0;n<h;++n)(l=t[n])&&(f[n]=u=a.call(l,l.__data__,n,t)+"",c.has(u)?s[n]=l:c.set(u,l));for(n=0;n<d;++n)u=a.call(e,o[n],n,o)+"",(l=c.get(u))?(i[n]=l,l.__data__=o[n],c.delete(u)):r[n]=new ks(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function cC(e){return e.__data__}function dC(e,t){if(!arguments.length)return Array.from(this,cC);var r=t?hC:lC,i=this._parents,s=this._groups;typeof e!="function"&&(e=nC(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],d=s[c],f=d.length,u=uC(e.call(h,h&&h.__data__,c,i)),p=u.length,m=n[c]=new Array(p),y=a[c]=new Array(p),x=l[c]=new Array(f);r(h,d,m,y,x,u,t);for(var b=0,k=0,v,S;b<p;++b)if(v=m[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<p;);v._next=S||null}}return a=new Gt(a,i),a._enter=n,a._exit=l,a}function uC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fC(){return new Gt(this._exit||this._groups.map(Lc),this._parents)}function gC(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function pC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,f=n[l]=new Array(d),u,p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<s;++l)n[l]=r[l];return new Gt(n,this._parents)}function mC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function yC(e){e||(e=xC);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new Gt(s,this._parents).order()}function xC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function CC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function bC(){return Array.from(this)}function kC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function wC(){let e=0;for(const t of this)++e;return e}function vC(){return!this.node()}function SC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function TC(e){return function(){this.removeAttribute(e)}}function BC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _C(e,t){return function(){this.setAttribute(e,t)}}function LC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function FC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function MC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function AC(e,t){var r=Vs(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?BC:TC:typeof t=="function"?r.local?MC:FC:r.local?LC:_C)(r,t))}function Fc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function EC(e){return function(){this.style.removeProperty(e)}}function $C(e,t,r){return function(){this.style.setProperty(e,t,r)}}function IC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function PC(e,t,r){return arguments.length>1?this.each((t==null?EC:typeof t=="function"?IC:$C)(e,t,r??"")):Dr(this.node(),e)}function Dr(e,t){return e.style.getPropertyValue(t)||Fc(e).getComputedStyle(e,null).getPropertyValue(t)}function OC(e){return function(){delete this[e]}}function RC(e,t){return function(){this[e]=t}}function DC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function NC(e,t){return arguments.length>1?this.each((t==null?OC:typeof t=="function"?DC:RC)(e,t)):this.node()[e]}function Mc(e){return e.trim().split(/^|\s+/)}function hn(e){return e.classList||new Ac(e)}function Ac(e){this._node=e,this._names=Mc(e.getAttribute("class")||"")}Ac.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ec(e,t){for(var r=hn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function $c(e,t){for(var r=hn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function qC(e){return function(){Ec(this,e)}}function zC(e){return function(){$c(this,e)}}function WC(e,t){return function(){(t.apply(this,arguments)?Ec:$c)(this,e)}}function jC(e,t){var r=Mc(e+"");if(arguments.length<2){for(var i=hn(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?WC:t?qC:zC)(r,t))}function HC(){this.textContent=""}function YC(e){return function(){this.textContent=e}}function UC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function XC(e){return arguments.length?this.each(e==null?HC:(typeof e=="function"?UC:YC)(e)):this.node().textContent}function GC(){this.innerHTML=""}function VC(e){return function(){this.innerHTML=e}}function ZC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function KC(e){return arguments.length?this.each(e==null?GC:(typeof e=="function"?ZC:VC)(e)):this.node().innerHTML}function QC(){this.nextSibling&&this.parentNode.appendChild(this)}function JC(){return this.each(QC)}function tb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function eb(){return this.each(tb)}function rb(e){var t=typeof e=="function"?e:Sc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ib(){return null}function sb(e,t){var r=typeof e=="function"?e:Sc(e),i=t==null?ib:typeof t=="function"?t:ln(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ob(){var e=this.parentNode;e&&e.removeChild(this)}function ab(){return this.each(ob)}function nb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hb(e){return this.select(e?lb:nb)}function cb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function db(e){return function(t){e.call(this,t,this.__data__)}}function ub(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function fb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function gb(e,t,r){return function(){var i=this.__on,s,o=db(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function pb(e,t,r){var i=ub(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?gb:fb,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function Ic(e,t,r){var i=Fc(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function mb(e,t){return function(){return Ic(this,e,t)}}function yb(e,t){return function(){return Ic(this,e,t.apply(this,arguments))}}function xb(e,t){return this.each((typeof t=="function"?yb:mb)(e,t))}function*Cb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var Pc=[null];function Gt(e,t){this._groups=e,this._parents=t}function Ii(){return new Gt([[document.documentElement]],Pc)}function bb(){return this}Gt.prototype=Ii.prototype={constructor:Gt,select:Ux,selectAll:Zx,selectChild:tC,selectChildren:sC,filter:oC,data:dC,enter:aC,exit:fC,join:gC,merge:pC,selection:bb,order:mC,sort:yC,call:CC,nodes:bC,node:kC,size:wC,empty:vC,each:SC,attr:AC,style:PC,property:NC,classed:jC,text:XC,html:KC,raise:JC,lower:eb,append:rb,insert:sb,remove:ab,clone:hb,datum:cb,on:pb,dispatch:xb,[Symbol.iterator]:Cb};function ct(e){return typeof e=="string"?new Gt([[document.querySelector(e)]],[document.documentElement]):new Gt([[e]],Pc)}function Zs(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cn(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Xr(){}var vi=.7,ws=1/vi,br="\\s*([+-]?\\d+)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kb=/^#([0-9a-f]{3,8})$/,wb=new RegExp(`^rgb\\(${br},${br},${br}\\)$`),vb=new RegExp(`^rgb\\(${ge},${ge},${ge}\\)$`),Sb=new RegExp(`^rgba\\(${br},${br},${br},${Si}\\)$`),Tb=new RegExp(`^rgba\\(${ge},${ge},${ge},${Si}\\)$`),Bb=new RegExp(`^hsl\\(${Si},${ge},${ge}\\)$`),_b=new RegExp(`^hsla\\(${Si},${ge},${ge},${Si}\\)$`),Bl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zs(Xr,Nr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_l,formatHex:_l,formatHex8:Lb,formatHsl:Fb,formatRgb:Ll,toString:Ll});function _l(){return this.rgb().formatHex()}function Lb(){return this.rgb().formatHex8()}function Fb(){return Rc(this).formatHsl()}function Ll(){return this.rgb().formatRgb()}function Nr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Fl(t):r===3?new Dt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Hi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Hi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=wb.exec(e))?new Dt(t[1],t[2],t[3],1):(t=vb.exec(e))?new Dt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Sb.exec(e))?Hi(t[1],t[2],t[3],t[4]):(t=Tb.exec(e))?Hi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Bb.exec(e))?El(t[1],t[2]/100,t[3]/100,1):(t=_b.exec(e))?El(t[1],t[2]/100,t[3]/100,t[4]):Bl.hasOwnProperty(e)?Fl(Bl[e]):e==="transparent"?new Dt(NaN,NaN,NaN,0):null}function Fl(e){return new Dt(e>>16&255,e>>8&255,e&255,1)}function Hi(e,t,r,i){return i<=0&&(e=t=r=NaN),new Dt(e,t,r,i)}function Oc(e){return e instanceof Xr||(e=Nr(e)),e?(e=e.rgb(),new Dt(e.r,e.g,e.b,e.opacity)):new Dt}function Zo(e,t,r,i){return arguments.length===1?Oc(e):new Dt(e,t,r,i??1)}function Dt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Zs(Dt,Zo,cn(Xr,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new Dt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dt(Je(this.r),Je(this.g),Je(this.b),vs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ml,formatHex:Ml,formatHex8:Mb,formatRgb:Al,toString:Al}));function Ml(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function Mb(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve((isNaN(this.opacity)?1:this.opacity)*255)}`}function Al(){const e=vs(this.opacity);return`${e===1?"rgb(":"rgba("}${Je(this.r)}, ${Je(this.g)}, ${Je(this.b)}${e===1?")":`, ${e})`}`}function vs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Je(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ve(e){return e=Je(e),(e<16?"0":"")+e.toString(16)}function El(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ie(e,t,r,i)}function Rc(e){if(e instanceof ie)return new ie(e.h,e.s,e.l,e.opacity);if(e instanceof Xr||(e=Nr(e)),!e)return new ie;if(e instanceof ie)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new ie(a,n,l,e.opacity)}function Ab(e,t,r,i){return arguments.length===1?Rc(e):new ie(e,t,r,i??1)}function ie(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Zs(ie,Ab,cn(Xr,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new ie(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new ie(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new Dt(To(e>=240?e-240:e+120,s,i),To(e,s,i),To(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ie($l(this.h),Yi(this.s),Yi(this.l),vs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vs(this.opacity);return`${e===1?"hsl(":"hsla("}${$l(this.h)}, ${Yi(this.s)*100}%, ${Yi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $l(e){return e=(e||0)%360,e<0?e+360:e}function Yi(e){return Math.max(0,Math.min(1,e||0))}function To(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ks=e=>()=>e;function Dc(e,t){return function(r){return e+r*t}}function Eb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function $b(e,t){var r=t-e;return r?Dc(e,r>180||r<-180?r-360*Math.round(r/360):r):Ks(isNaN(e)?t:e)}function Ib(e){return(e=+e)==1?dn:function(t,r){return r-t?Eb(t,r,e):Ks(isNaN(t)?r:t)}}function dn(e,t){var r=t-e;return r?Dc(e,r):Ks(isNaN(e)?t:e)}const Ko=(function e(t){var r=Ib(t);function i(s,o){var a=r((s=Zo(s)).r,(o=Zo(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=dn(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i})(1);function Te(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Qo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bo=new RegExp(Qo.source,"g");function Pb(e){return function(){return e}}function Ob(e){return function(t){return e(t)+""}}function Nc(e,t){var r=Qo.lastIndex=Bo.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Qo.exec(e))&&(s=Bo.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:Te(i,s)})),r=Bo.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?Ob(l[0].x):Pb(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var Il=180/Math.PI,Jo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qc(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Il,skewX:Math.atan(l)*Il,scaleX:a,scaleY:n}}var Ui;function Rb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jo:qc(t.a,t.b,t.c,t.d,t.e,t.f)}function Db(e){return e==null||(Ui||(Ui=document.createElementNS("http://www.w3.org/2000/svg","g")),Ui.setAttribute("transform",e),!(e=Ui.transform.baseVal.consolidate()))?Jo:(e=e.matrix,qc(e.a,e.b,e.c,e.d,e.e,e.f))}function zc(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push("translate(",null,t,null,r);p.push({i:m-4,x:Te(c,d)},{i:m-2,x:Te(h,f)})}else(d||f)&&u.push("translate("+d+t+f+r)}function a(c,h,d,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:d.push(s(d)+"rotate(",null,i)-2,x:Te(c,h)})):h&&d.push(s(d)+"rotate("+h+i)}function n(c,h,d,f){c!==h?f.push({i:d.push(s(d)+"skewX(",null,i)-2,x:Te(c,h)}):h&&d.push(s(d)+"skewX("+h+i)}function l(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push(s(u)+"scale(",null,",",null,")");p.push({i:m-4,x:Te(c,d)},{i:m-2,x:Te(h,f)})}else(d!==1||f!==1)&&u.push(s(u)+"scale("+d+","+f+")")}return function(c,h){var d=[],f=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,d,f),a(c.rotate,h.rotate,d,f),n(c.skewX,h.skewX,d,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,f),c=h=null,function(u){for(var p=-1,m=f.length,y;++p<m;)d[(y=f[p]).i]=y.x(u);return d.join("")}}}var Nb=zc(Rb,"px, ","px)","deg)"),qb=zc(Db,", ",")",")"),qr=0,li=0,ti=0,Wc=1e3,Ss,hi,Ts=0,sr=0,Qs=0,Ti=typeof performance=="object"&&performance.now?performance:Date,jc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function un(){return sr||(jc(zb),sr=Ti.now()+Qs)}function zb(){sr=0}function Bs(){this._call=this._time=this._next=null}Bs.prototype=Hc.prototype={constructor:Bs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?un():+r)+(t==null?0:+t),!this._next&&hi!==this&&(hi?hi._next=this:Ss=this,hi=this),this._call=e,this._time=r,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};function Hc(e,t,r){var i=new Bs;return i.restart(e,t,r),i}function Wb(){un(),++qr;for(var e=Ss,t;e;)(t=sr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qr}function Pl(){sr=(Ts=Ti.now())+Qs,qr=li=0;try{Wb()}finally{qr=0,Hb(),sr=0}}function jb(){var e=Ti.now(),t=e-Ts;t>Wc&&(Qs-=t,Ts=e)}function Hb(){for(var e,t=Ss,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ss=r);hi=e,ta(i)}function ta(e){if(!qr){li&&(li=clearTimeout(li));var t=e-sr;t>24?(e<1/0&&(li=setTimeout(Pl,e-Ti.now()-Qs)),ti&&(ti=clearInterval(ti))):(ti||(Ts=Ti.now(),ti=setInterval(jb,Wc)),qr=1,jc(Pl))}}function Ol(e,t,r){var i=new Bs;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Yb=vc("start","end","cancel","interrupt"),Ub=[],Yc=0,Rl=1,ea=2,as=3,Dl=4,ra=5,ns=6;function Js(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Xb(e,r,{name:t,index:i,group:s,on:Yb,tween:Ub,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Yc})}function fn(e,t){var r=le(e,t);if(r.state>Yc)throw new Error("too late; already scheduled");return r}function be(e,t){var r=le(e,t);if(r.state>as)throw new Error("too late; already running");return r}function le(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Xb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Hc(o,0,r.time);function o(c){r.state=Rl,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,f,u;if(r.state!==Rl)return l();for(h in i)if(u=i[h],u.name===r.name){if(u.state===as)return Ol(a);u.state===Dl?(u.state=ns,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[h]):+h<t&&(u.state=ns,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[h])}if(Ol(function(){r.state===as&&(r.state=Dl,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=ea,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ea){for(r.state=as,s=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(u=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=u);s.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=ra,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);r.state===ra&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ns,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Gb(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>ea&&i.state<ra,i.state=ns,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function Vb(e){return this.each(function(){Gb(this,e)})}function Zb(e,t){var r,i;return function(){var s=be(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function Kb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=be(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function Qb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?Zb:Kb)(r,e,t))}function gn(e,t,r){var i=e._id;return e.each(function(){var s=be(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return le(s,i).value[t]}}function Uc(e,t){var r;return(typeof t=="number"?Te:t instanceof Nr?Ko:(r=Nr(t))?(t=r,Ko):Nc)(e,t)}function Jb(e){return function(){this.removeAttribute(e)}}function tk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ek(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function rk(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function ik(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function sk(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function ok(e,t){var r=Vs(e),i=r==="transform"?qb:Uc;return this.attrTween(e,typeof t=="function"?(r.local?sk:ik)(r,i,gn(this,"attr."+e,t)):t==null?(r.local?tk:Jb)(r):(r.local?rk:ek)(r,i,t))}function ak(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function nk(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function lk(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&nk(e,o)),r}return s._value=t,s}function hk(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&ak(e,o)),r}return s._value=t,s}function ck(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Vs(e);return this.tween(r,(i.local?lk:hk)(i,t))}function dk(e,t){return function(){fn(this,e).delay=+t.apply(this,arguments)}}function uk(e,t){return t=+t,function(){fn(this,e).delay=t}}function fk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dk:uk)(t,e)):le(this.node(),t).delay}function gk(e,t){return function(){be(this,e).duration=+t.apply(this,arguments)}}function pk(e,t){return t=+t,function(){be(this,e).duration=t}}function mk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gk:pk)(t,e)):le(this.node(),t).duration}function yk(e,t){if(typeof t!="function")throw new Error;return function(){be(this,e).ease=t}}function xk(e){var t=this._id;return arguments.length?this.each(yk(t,e)):le(this.node(),t).ease}function Ck(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;be(this,e).ease=r}}function bk(e){if(typeof e!="function")throw new Error;return this.each(Ck(this._id,e))}function kk(e){typeof e!="function"&&(e=Bc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Fe(i,this._parents,this._name,this._id)}function wk(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),f,u=0;u<h;++u)(f=l[u]||c[u])&&(d[u]=f);for(;n<i;++n)a[n]=t[n];return new Fe(a,this._parents,this._name,this._id)}function vk(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Sk(e,t,r){var i,s,o=vk(t)?fn:be;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function Tk(e,t){var r=this._id;return arguments.length<2?le(this.node(),r).on.on(e):this.each(Sk(r,e,t))}function Bk(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function _k(){return this.on("end.remove",Bk(this._id))}function Lk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ln(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,d,f=0;f<l;++f)(h=n[f])&&(d=e.call(h,h.__data__,f,n))&&("__data__"in h&&(d.__data__=h.__data__),c[f]=d,Js(c[f],t,r,f,c,le(h,r)));return new Fe(o,this._parents,t,r)}function Fk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Tc(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var f=e.call(h,h.__data__,d,l),u,p=le(h,r),m=0,y=f.length;m<y;++m)(u=f[m])&&Js(u,t,r,m,f,p);o.push(f),a.push(h)}return new Fe(o,a,t,r)}var Mk=Ii.prototype.constructor;function Ak(){return new Mk(this._groups,this._parents)}function Ek(e,t){var r,i,s;return function(){var o=Dr(this,e),a=(this.style.removeProperty(e),Dr(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function Xc(e){return function(){this.style.removeProperty(e)}}function $k(e,t,r){var i,s=r+"",o;return function(){var a=Dr(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function Ik(e,t,r){var i,s,o;return function(){var a=Dr(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Dr(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function Pk(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=be(this,e),c=l.on,h=l.value[o]==null?n||(n=Xc(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function Ok(e,t,r){var i=(e+="")=="transform"?Nb:Uc;return t==null?this.styleTween(e,Ek(e,i)).on("end.style."+e,Xc(e)):typeof t=="function"?this.styleTween(e,Ik(e,i,gn(this,"style."+e,t))).each(Pk(this._id,e)):this.styleTween(e,$k(e,i,t),r).on("end.style."+e,null)}function Rk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Dk(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&Rk(e,a,r)),i}return o._value=t,o}function Nk(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Dk(e,t,r??""))}function qk(e){return function(){this.textContent=e}}function zk(e){return function(){var t=e(this);this.textContent=t??""}}function Wk(e){return this.tween("text",typeof e=="function"?zk(gn(this,"text",e)):qk(e==null?"":e+""))}function jk(e){return function(t){this.textContent=e.call(this,t)}}function Hk(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&jk(s)),t}return i._value=e,i}function Yk(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Hk(e))}function Uk(){for(var e=this._name,t=this._id,r=Gc(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=le(l,t);Js(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Fe(i,this._parents,e,r)}function Xk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=be(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var Gk=0;function Fe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Gc(){return++Gk}var we=Ii.prototype;Fe.prototype={constructor:Fe,select:Lk,selectAll:Fk,selectChild:we.selectChild,selectChildren:we.selectChildren,filter:kk,merge:wk,selection:Ak,transition:Uk,call:we.call,nodes:we.nodes,node:we.node,size:we.size,empty:we.empty,each:we.each,on:Tk,attr:ok,attrTween:ck,style:Ok,styleTween:Nk,text:Wk,textTween:Yk,remove:_k,tween:Qb,delay:fk,duration:mk,ease:xk,easeVarying:bk,end:Xk,[Symbol.iterator]:we[Symbol.iterator]};function Vk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Zk={time:null,delay:0,duration:250,ease:Vk};function Kk(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Qk(e){var t,r;e instanceof Fe?(t=e._id,e=e._name):(t=Gc(),(r=Zk).time=un(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Js(l,e,t,c,a,r||Kk(l,t));return new Fe(i,this._parents,e,t)}Ii.prototype.interrupt=Vb;Ii.prototype.transition=Qk;const ia=Math.PI,sa=2*ia,Ye=1e-6,Jk=sa-Ye;function Vc(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function t1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Vc;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class e1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Vc:t1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Ye)if(!(Math.abs(d*l-c*h)>Ye)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,p=s-n,m=l*l+c*c,y=u*u+p*p,x=Math.sqrt(m),b=Math.sqrt(f),k=o*Math.tan((ia-Math.acos((m+f-y)/(2*x*b)))/2),v=k/b,S=k/x;Math.abs(v-1)>Ye&&this._append`L${t+v*h},${r+v*d}`,this._append`A${o},${o},0,0,${+(d*u>h*p)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,f=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ye||Math.abs(this._y1-h)>Ye)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%sa+sa),f>Jk?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>Ye&&this._append`A${i},${i},0,${+(f>=ia)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ue(e){return function(){return e}}const r1=Math.abs,i1=Math.atan2,s1=Math.cos,o1=Math.max,a1=Math.min,n1=Math.sin,l1=Math.sqrt,oa=1e-12,to=Math.PI,aa=to/2,h1=2*to;function c1(e){return e>1?0:e<-1?to:Math.acos(e)}function d1(e){return e>=1?aa:e<=-1?-aa:Math.asin(e)}function Zc(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new e1(t)}function Kc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Qc(e){this._context=e}Qc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function xi(e){return new Qc(e)}function u1(e){return e[0]}function f1(e){return e[1]}function Jc(e,t){var r=Ue(!0),i=null,s=xi,o=null,a=Zc(n);e=typeof e=="function"?e:e===void 0?u1:Ue(e),t=typeof t=="function"?t:t===void 0?f1:Ue(t);function n(l){var c,h=(l=Kc(l)).length,d,f=!1,u;for(i==null&&(o=s(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(u)return o=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ue(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ue(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ue(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class td{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ed(e){return new td(e,!0)}function rd(e){return new td(e,!1)}function Oe(){}function _s(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function eo(e){this._context=e}eo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_s(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ls(e){return new eo(e)}function id(e){this._context=e}id.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function g1(e){return new id(e)}function sd(e){this._context=e}sd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function p1(e){return new sd(e)}function od(e,t){this._basis=new eo(e),this._beta=t}od.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const m1=(function e(t){function r(i){return t===1?new eo(i):new od(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Fs(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function pn(e,t){this._context=e,this._k=(1-t)/6}pn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ad=(function e(t){function r(i){return new pn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function mn(e,t){this._context=e,this._k=(1-t)/6}mn.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const y1=(function e(t){function r(i){return new mn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function yn(e,t){this._context=e,this._k=(1-t)/6}yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const x1=(function e(t){function r(i){return new yn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>oa){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>oa){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function nd(e,t){this._context=e,this._alpha=t}nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:xn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ld=(function e(t){function r(i){return t?new nd(i,t):new pn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function hd(e,t){this._context=e,this._alpha=t}hd.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:xn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const C1=(function e(t){function r(i){return t?new hd(i,t):new mn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function cd(e,t){this._context=e,this._alpha=t}cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const b1=(function e(t){function r(i){return t?new cd(i,t):new yn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function dd(e){this._context=e}dd.prototype={areaStart:Oe,areaEnd:Oe,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function k1(e){return new dd(e)}function Nl(e){return e<0?-1:1}function ql(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(Nl(o)+Nl(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function zl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function _o(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function Ms(e){this._context=e}Ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_o(this,this._t0,zl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_o(this,zl(this,r=ql(this,e,t)),r);break;default:_o(this,this._t0,r=ql(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ud(e){this._context=new fd(e)}(ud.prototype=Object.create(Ms.prototype)).point=function(e,t){Ms.prototype.point.call(this,t,e)};function fd(e){this._context=e}fd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function gd(e){return new Ms(e)}function pd(e){return new ud(e)}function md(e){this._context=e}md.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Wl(e),s=Wl(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Wl(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function yd(e){return new md(e)}function ro(e,t){this._context=e,this._t=t}ro.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function xd(e){return new ro(e,.5)}function Cd(e){return new ro(e,0)}function bd(e){return new ro(e,1)}function ci(e,t,r){this.k=e,this.x=t,this.y=r}ci.prototype={constructor:ci,scale:function(e){return e===1?this:new ci(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ci(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ci.prototype;var kd=g(e=>{const{securityLevel:t}=gt();let r=ct("body");if(t==="sandbox"){const o=ct(`#i${e}`).node()?.contentDocument??document;r=ct(o.body)}return r.select(`#${e}`)},"selectSvgElement");function Cn(e){return typeof e>"u"||e===null}g(Cn,"isNothing");function wd(e){return typeof e=="object"&&e!==null}g(wd,"isObject");function vd(e){return Array.isArray(e)?e:Cn(e)?[]:[e]}g(vd,"toArray");function Sd(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}g(Sd,"extend");function Td(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Td,"repeat");function Bd(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(Bd,"isNegativeZero");var w1=Cn,v1=wd,S1=vd,T1=Td,B1=Bd,_1=Sd,Bt={isNothing:w1,isObject:v1,toArray:S1,repeat:T1,isNegativeZero:B1,extend:_1};function bn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
129
+ `},"getStyles"),Px=g((e,t)=>{t!==void 0&&(ss[e]=t)},"addStylesForDiagram"),Ix=$x,rn={};Zh(rn,{clear:()=>mc,getAccDescription:()=>bc,getAccTitle:()=>xc,getDiagramTitle:()=>wc,setAccDescription:()=>Cc,setAccTitle:()=>yc,setDiagramTitle:()=>kc});var sn="",on="",an="",nn=g(e=>Kt(e,Ct()),"sanitizeText"),mc=g(()=>{sn="",an="",on=""},"clear"),yc=g(e=>{sn=nn(e).replace(/^\s+/g,"")},"setAccTitle"),xc=g(()=>sn,"getAccTitle"),Cc=g(e=>{an=nn(e).replace(/\n\s+/g,`
130
+ `)},"setAccDescription"),bc=g(()=>an,"getAccDescription"),kc=g(e=>{on=nn(e)},"setDiagramTitle"),wc=g(()=>on,"getDiagramTitle"),Sl=U,Ox=Za,gt=Ct,Rx=sc,Dx=Or,ln=g(e=>Kt(e,gt()),"sanitizeText"),vc=pc,Nx=g(()=>rn,"getCommonDb"),Cs={},bs=g((e,t,r)=>{Cs[e]&&Sl.warn(`Diagram with id ${e} already registered. Overwriting.`),Cs[e]=t,r&&cc(e,r),Px(e,t.styles),t.injectUtils?.(Sl,Ox,gt,ln,vc,Nx(),()=>{})},"registerDiagram"),Vo=g(e=>{if(e in Cs)return Cs[e];throw new qx(e)},"getDiagram"),Pr,qx=(Pr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(Pr,"DiagramNotFoundError"),Pr),zx={value:()=>{}};function Sc(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new os(r)}function os(e){this._=e}function Wx(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}os.prototype=Sc.prototype={constructor:os,on:function(e,t){var r=this._,i=Wx(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=jx(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=Tl(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Tl(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new os(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function jx(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Tl(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=zx,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Zo="http://www.w3.org/1999/xhtml";const Bl={svg:"http://www.w3.org/2000/svg",xhtml:Zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vs(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Bl.hasOwnProperty(t)?{space:Bl[t],local:e}:e}function Hx(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Zo&&t.documentElement.namespaceURI===Zo?t.createElement(e):t.createElementNS(r,e)}}function Yx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Tc(e){var t=Vs(e);return(t.local?Yx:Hx)(t)}function Ux(){}function hn(e){return e==null?Ux:function(){return this.querySelector(e)}}function Xx(e){typeof e!="function"&&(e=hn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new Xt(i,this._parents)}function Gx(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Vx(){return[]}function Bc(e){return e==null?Vx:function(){return this.querySelectorAll(e)}}function Zx(e){return function(){return Gx(e.apply(this,arguments))}}function Kx(e){typeof e=="function"?e=Zx(e):e=Bc(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new Xt(i,s)}function _c(e){return function(){return this.matches(e)}}function Lc(e){return function(t){return t.matches(e)}}var Qx=Array.prototype.find;function Jx(e){return function(){return Qx.call(this.children,e)}}function tC(){return this.firstElementChild}function eC(e){return this.select(e==null?tC:Jx(typeof e=="function"?e:Lc(e)))}var rC=Array.prototype.filter;function iC(){return Array.from(this.children)}function sC(e){return function(){return rC.call(this.children,e)}}function oC(e){return this.selectAll(e==null?iC:sC(typeof e=="function"?e:Lc(e)))}function aC(e){typeof e!="function"&&(e=_c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Xt(i,this._parents)}function Fc(e){return new Array(e.length)}function nC(){return new Xt(this._enter||this._groups.map(Fc),this._parents)}function ks(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ks.prototype={constructor:ks,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function lC(e){return function(){return e}}function hC(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new ks(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function cC(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,d=o.length,f=new Array(h),u;for(n=0;n<h;++n)(l=t[n])&&(f[n]=u=a.call(l,l.__data__,n,t)+"",c.has(u)?s[n]=l:c.set(u,l));for(n=0;n<d;++n)u=a.call(e,o[n],n,o)+"",(l=c.get(u))?(i[n]=l,l.__data__=o[n],c.delete(u)):r[n]=new ks(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function dC(e){return e.__data__}function uC(e,t){if(!arguments.length)return Array.from(this,dC);var r=t?cC:hC,i=this._parents,s=this._groups;typeof e!="function"&&(e=lC(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],d=s[c],f=d.length,u=fC(e.call(h,h&&h.__data__,c,i)),p=u.length,m=n[c]=new Array(p),y=a[c]=new Array(p),x=l[c]=new Array(f);r(h,d,m,y,x,u,t);for(var b=0,k=0,v,S;b<p;++b)if(v=m[b]){for(b>=k&&(k=b+1);!(S=y[k])&&++k<p;);v._next=S||null}}return a=new Xt(a,i),a._enter=n,a._exit=l,a}function fC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gC(){return new Xt(this._exit||this._groups.map(Fc),this._parents)}function pC(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function mC(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,f=n[l]=new Array(d),u,p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<s;++l)n[l]=r[l];return new Xt(n,this._parents)}function yC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function xC(e){e||(e=CC);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new Xt(s,this._parents).order()}function CC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kC(){return Array.from(this)}function wC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function vC(){let e=0;for(const t of this)++e;return e}function SC(){return!this.node()}function TC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function BC(e){return function(){this.removeAttribute(e)}}function _C(e){return function(){this.removeAttributeNS(e.space,e.local)}}function LC(e,t){return function(){this.setAttribute(e,t)}}function FC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function MC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function AC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function EC(e,t){var r=Vs(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?_C:BC:typeof t=="function"?r.local?AC:MC:r.local?FC:LC)(r,t))}function Mc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function $C(e){return function(){this.style.removeProperty(e)}}function PC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function IC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function OC(e,t,r){return arguments.length>1?this.each((t==null?$C:typeof t=="function"?IC:PC)(e,t,r??"")):Dr(this.node(),e)}function Dr(e,t){return e.style.getPropertyValue(t)||Mc(e).getComputedStyle(e,null).getPropertyValue(t)}function RC(e){return function(){delete this[e]}}function DC(e,t){return function(){this[e]=t}}function NC(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function qC(e,t){return arguments.length>1?this.each((t==null?RC:typeof t=="function"?NC:DC)(e,t)):this.node()[e]}function Ac(e){return e.trim().split(/^|\s+/)}function cn(e){return e.classList||new Ec(e)}function Ec(e){this._node=e,this._names=Ac(e.getAttribute("class")||"")}Ec.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function $c(e,t){for(var r=cn(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function Pc(e,t){for(var r=cn(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function zC(e){return function(){$c(this,e)}}function WC(e){return function(){Pc(this,e)}}function jC(e,t){return function(){(t.apply(this,arguments)?$c:Pc)(this,e)}}function HC(e,t){var r=Ac(e+"");if(arguments.length<2){for(var i=cn(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?jC:t?zC:WC)(r,t))}function YC(){this.textContent=""}function UC(e){return function(){this.textContent=e}}function XC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function GC(e){return arguments.length?this.each(e==null?YC:(typeof e=="function"?XC:UC)(e)):this.node().textContent}function VC(){this.innerHTML=""}function ZC(e){return function(){this.innerHTML=e}}function KC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function QC(e){return arguments.length?this.each(e==null?VC:(typeof e=="function"?KC:ZC)(e)):this.node().innerHTML}function JC(){this.nextSibling&&this.parentNode.appendChild(this)}function tb(){return this.each(JC)}function eb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rb(){return this.each(eb)}function ib(e){var t=typeof e=="function"?e:Tc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function sb(){return null}function ob(e,t){var r=typeof e=="function"?e:Tc(e),i=t==null?sb:typeof t=="function"?t:hn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function ab(){var e=this.parentNode;e&&e.removeChild(this)}function nb(){return this.each(ab)}function lb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cb(e){return this.select(e?hb:lb)}function db(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ub(e){return function(t){e.call(this,t,this.__data__)}}function fb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function gb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function pb(e,t,r){return function(){var i=this.__on,s,o=ub(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function mb(e,t,r){var i=fb(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?pb:gb,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function Ic(e,t,r){var i=Mc(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function yb(e,t){return function(){return Ic(this,e,t)}}function xb(e,t){return function(){return Ic(this,e,t.apply(this,arguments))}}function Cb(e,t){return this.each((typeof t=="function"?xb:yb)(e,t))}function*bb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var Oc=[null];function Xt(e,t){this._groups=e,this._parents=t}function Pi(){return new Xt([[document.documentElement]],Oc)}function kb(){return this}Xt.prototype=Pi.prototype={constructor:Xt,select:Xx,selectAll:Kx,selectChild:eC,selectChildren:oC,filter:aC,data:uC,enter:nC,exit:gC,join:pC,merge:mC,selection:kb,order:yC,sort:xC,call:bC,nodes:kC,node:wC,size:vC,empty:SC,each:TC,attr:EC,style:OC,property:qC,classed:HC,text:GC,html:QC,raise:tb,lower:rb,append:ib,insert:ob,remove:nb,clone:cb,datum:db,on:mb,dispatch:Cb,[Symbol.iterator]:bb};function dt(e){return typeof e=="string"?new Xt([[document.querySelector(e)]],[document.documentElement]):new Xt([[e]],Oc)}function Zs(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function dn(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Xr(){}var vi=.7,ws=1/vi,br="\\s*([+-]?\\d+)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wb=/^#([0-9a-f]{3,8})$/,vb=new RegExp(`^rgb\\(${br},${br},${br}\\)$`),Sb=new RegExp(`^rgb\\(${ge},${ge},${ge}\\)$`),Tb=new RegExp(`^rgba\\(${br},${br},${br},${Si}\\)$`),Bb=new RegExp(`^rgba\\(${ge},${ge},${ge},${Si}\\)$`),_b=new RegExp(`^hsl\\(${Si},${ge},${ge}\\)$`),Lb=new RegExp(`^hsla\\(${Si},${ge},${ge},${Si}\\)$`),_l={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zs(Xr,Nr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ll,formatHex:Ll,formatHex8:Fb,formatHsl:Mb,formatRgb:Fl,toString:Fl});function Ll(){return this.rgb().formatHex()}function Fb(){return this.rgb().formatHex8()}function Mb(){return Dc(this).formatHsl()}function Fl(){return this.rgb().formatRgb()}function Nr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=wb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Ml(t):r===3?new Nt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Hi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Hi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=vb.exec(e))?new Nt(t[1],t[2],t[3],1):(t=Sb.exec(e))?new Nt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Tb.exec(e))?Hi(t[1],t[2],t[3],t[4]):(t=Bb.exec(e))?Hi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_b.exec(e))?$l(t[1],t[2]/100,t[3]/100,1):(t=Lb.exec(e))?$l(t[1],t[2]/100,t[3]/100,t[4]):_l.hasOwnProperty(e)?Ml(_l[e]):e==="transparent"?new Nt(NaN,NaN,NaN,0):null}function Ml(e){return new Nt(e>>16&255,e>>8&255,e&255,1)}function Hi(e,t,r,i){return i<=0&&(e=t=r=NaN),new Nt(e,t,r,i)}function Rc(e){return e instanceof Xr||(e=Nr(e)),e?(e=e.rgb(),new Nt(e.r,e.g,e.b,e.opacity)):new Nt}function Ko(e,t,r,i){return arguments.length===1?Rc(e):new Nt(e,t,r,i??1)}function Nt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Zs(Nt,Ko,dn(Xr,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new Nt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new Nt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Nt(Je(this.r),Je(this.g),Je(this.b),vs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Al,formatHex:Al,formatHex8:Ab,formatRgb:El,toString:El}));function Al(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function Ab(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve((isNaN(this.opacity)?1:this.opacity)*255)}`}function El(){const e=vs(this.opacity);return`${e===1?"rgb(":"rgba("}${Je(this.r)}, ${Je(this.g)}, ${Je(this.b)}${e===1?")":`, ${e})`}`}function vs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Je(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ve(e){return e=Je(e),(e<16?"0":"")+e.toString(16)}function $l(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ie(e,t,r,i)}function Dc(e){if(e instanceof ie)return new ie(e.h,e.s,e.l,e.opacity);if(e instanceof Xr||(e=Nr(e)),!e)return new ie;if(e instanceof ie)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new ie(a,n,l,e.opacity)}function Eb(e,t,r,i){return arguments.length===1?Dc(e):new ie(e,t,r,i??1)}function ie(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Zs(ie,Eb,dn(Xr,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new ie(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vi:Math.pow(vi,e),new ie(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new Nt(Bo(e>=240?e-240:e+120,s,i),Bo(e,s,i),Bo(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new ie(Pl(this.h),Yi(this.s),Yi(this.l),vs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vs(this.opacity);return`${e===1?"hsl(":"hsla("}${Pl(this.h)}, ${Yi(this.s)*100}%, ${Yi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pl(e){return e=(e||0)%360,e<0?e+360:e}function Yi(e){return Math.max(0,Math.min(1,e||0))}function Bo(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ks=e=>()=>e;function Nc(e,t){return function(r){return e+r*t}}function $b(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function Pb(e,t){var r=t-e;return r?Nc(e,r>180||r<-180?r-360*Math.round(r/360):r):Ks(isNaN(e)?t:e)}function Ib(e){return(e=+e)==1?un:function(t,r){return r-t?$b(t,r,e):Ks(isNaN(t)?r:t)}}function un(e,t){var r=t-e;return r?Nc(e,r):Ks(isNaN(e)?t:e)}const Qo=(function e(t){var r=Ib(t);function i(s,o){var a=r((s=Ko(s)).r,(o=Ko(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=un(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i})(1);function Be(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Jo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_o=new RegExp(Jo.source,"g");function Ob(e){return function(){return e}}function Rb(e){return function(t){return e(t)+""}}function qc(e,t){var r=Jo.lastIndex=_o.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Jo.exec(e))&&(s=_o.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:Be(i,s)})),r=_o.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?Rb(l[0].x):Ob(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var Il=180/Math.PI,ta={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zc(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Il,skewX:Math.atan(l)*Il,scaleX:a,scaleY:n}}var Ui;function Db(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ta:zc(t.a,t.b,t.c,t.d,t.e,t.f)}function Nb(e){return e==null||(Ui||(Ui=document.createElementNS("http://www.w3.org/2000/svg","g")),Ui.setAttribute("transform",e),!(e=Ui.transform.baseVal.consolidate()))?ta:(e=e.matrix,zc(e.a,e.b,e.c,e.d,e.e,e.f))}function Wc(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push("translate(",null,t,null,r);p.push({i:m-4,x:Be(c,d)},{i:m-2,x:Be(h,f)})}else(d||f)&&u.push("translate("+d+t+f+r)}function a(c,h,d,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:d.push(s(d)+"rotate(",null,i)-2,x:Be(c,h)})):h&&d.push(s(d)+"rotate("+h+i)}function n(c,h,d,f){c!==h?f.push({i:d.push(s(d)+"skewX(",null,i)-2,x:Be(c,h)}):h&&d.push(s(d)+"skewX("+h+i)}function l(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push(s(u)+"scale(",null,",",null,")");p.push({i:m-4,x:Be(c,d)},{i:m-2,x:Be(h,f)})}else(d!==1||f!==1)&&u.push(s(u)+"scale("+d+","+f+")")}return function(c,h){var d=[],f=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,d,f),a(c.rotate,h.rotate,d,f),n(c.skewX,h.skewX,d,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,f),c=h=null,function(u){for(var p=-1,m=f.length,y;++p<m;)d[(y=f[p]).i]=y.x(u);return d.join("")}}}var qb=Wc(Db,"px, ","px)","deg)"),zb=Wc(Nb,", ",")",")"),qr=0,li=0,ti=0,jc=1e3,Ss,hi,Ts=0,sr=0,Qs=0,Ti=typeof performance=="object"&&performance.now?performance:Date,Hc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function fn(){return sr||(Hc(Wb),sr=Ti.now()+Qs)}function Wb(){sr=0}function Bs(){this._call=this._time=this._next=null}Bs.prototype=Yc.prototype={constructor:Bs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?fn():+r)+(t==null?0:+t),!this._next&&hi!==this&&(hi?hi._next=this:Ss=this,hi=this),this._call=e,this._time=r,ea()},stop:function(){this._call&&(this._call=null,this._time=1/0,ea())}};function Yc(e,t,r){var i=new Bs;return i.restart(e,t,r),i}function jb(){fn(),++qr;for(var e=Ss,t;e;)(t=sr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qr}function Ol(){sr=(Ts=Ti.now())+Qs,qr=li=0;try{jb()}finally{qr=0,Yb(),sr=0}}function Hb(){var e=Ti.now(),t=e-Ts;t>jc&&(Qs-=t,Ts=e)}function Yb(){for(var e,t=Ss,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ss=r);hi=e,ea(i)}function ea(e){if(!qr){li&&(li=clearTimeout(li));var t=e-sr;t>24?(e<1/0&&(li=setTimeout(Ol,e-Ti.now()-Qs)),ti&&(ti=clearInterval(ti))):(ti||(Ts=Ti.now(),ti=setInterval(Hb,jc)),qr=1,Hc(Ol))}}function Rl(e,t,r){var i=new Bs;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var Ub=Sc("start","end","cancel","interrupt"),Xb=[],Uc=0,Dl=1,ra=2,as=3,Nl=4,ia=5,ns=6;function Js(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Gb(e,r,{name:t,index:i,group:s,on:Ub,tween:Xb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Uc})}function gn(e,t){var r=le(e,t);if(r.state>Uc)throw new Error("too late; already scheduled");return r}function be(e,t){var r=le(e,t);if(r.state>as)throw new Error("too late; already running");return r}function le(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Gb(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=Yc(o,0,r.time);function o(c){r.state=Dl,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,f,u;if(r.state!==Dl)return l();for(h in i)if(u=i[h],u.name===r.name){if(u.state===as)return Rl(a);u.state===Nl?(u.state=ns,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[h]):+h<t&&(u.state=ns,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[h])}if(Rl(function(){r.state===as&&(r.state=Nl,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=ra,r.on.call("start",e,e.__data__,r.index,r.group),r.state===ra){for(r.state=as,s=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(u=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=u);s.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=ia,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);r.state===ia&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=ns,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Vb(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>ra&&i.state<ia,i.state=ns,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function Zb(e){return this.each(function(){Vb(this,e)})}function Kb(e,t){var r,i;return function(){var s=be(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function Qb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=be(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function Jb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=le(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?Kb:Qb)(r,e,t))}function pn(e,t,r){var i=e._id;return e.each(function(){var s=be(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return le(s,i).value[t]}}function Xc(e,t){var r;return(typeof t=="number"?Be:t instanceof Nr?Qo:(r=Nr(t))?(t=r,Qo):qc)(e,t)}function tk(e){return function(){this.removeAttribute(e)}}function ek(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rk(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function ik(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function sk(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function ok(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function ak(e,t){var r=Vs(e),i=r==="transform"?zb:Xc;return this.attrTween(e,typeof t=="function"?(r.local?ok:sk)(r,i,pn(this,"attr."+e,t)):t==null?(r.local?ek:tk)(r):(r.local?ik:rk)(r,i,t))}function nk(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function lk(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function hk(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&lk(e,o)),r}return s._value=t,s}function ck(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&nk(e,o)),r}return s._value=t,s}function dk(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=Vs(e);return this.tween(r,(i.local?hk:ck)(i,t))}function uk(e,t){return function(){gn(this,e).delay=+t.apply(this,arguments)}}function fk(e,t){return t=+t,function(){gn(this,e).delay=t}}function gk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?uk:fk)(t,e)):le(this.node(),t).delay}function pk(e,t){return function(){be(this,e).duration=+t.apply(this,arguments)}}function mk(e,t){return t=+t,function(){be(this,e).duration=t}}function yk(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pk:mk)(t,e)):le(this.node(),t).duration}function xk(e,t){if(typeof t!="function")throw new Error;return function(){be(this,e).ease=t}}function Ck(e){var t=this._id;return arguments.length?this.each(xk(t,e)):le(this.node(),t).ease}function bk(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;be(this,e).ease=r}}function kk(e){if(typeof e!="function")throw new Error;return this.each(bk(this._id,e))}function wk(e){typeof e!="function"&&(e=_c(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Me(i,this._parents,this._name,this._id)}function vk(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),f,u=0;u<h;++u)(f=l[u]||c[u])&&(d[u]=f);for(;n<i;++n)a[n]=t[n];return new Me(a,this._parents,this._name,this._id)}function Sk(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Tk(e,t,r){var i,s,o=Sk(t)?gn:be;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function Bk(e,t){var r=this._id;return arguments.length<2?le(this.node(),r).on.on(e):this.each(Tk(r,e,t))}function _k(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Lk(){return this.on("end.remove",_k(this._id))}function Fk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=hn(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,d,f=0;f<l;++f)(h=n[f])&&(d=e.call(h,h.__data__,f,n))&&("__data__"in h&&(d.__data__=h.__data__),c[f]=d,Js(c[f],t,r,f,c,le(h,r)));return new Me(o,this._parents,t,r)}function Mk(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bc(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var f=e.call(h,h.__data__,d,l),u,p=le(h,r),m=0,y=f.length;m<y;++m)(u=f[m])&&Js(u,t,r,m,f,p);o.push(f),a.push(h)}return new Me(o,a,t,r)}var Ak=Pi.prototype.constructor;function Ek(){return new Ak(this._groups,this._parents)}function $k(e,t){var r,i,s;return function(){var o=Dr(this,e),a=(this.style.removeProperty(e),Dr(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function Gc(e){return function(){this.style.removeProperty(e)}}function Pk(e,t,r){var i,s=r+"",o;return function(){var a=Dr(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function Ik(e,t,r){var i,s,o;return function(){var a=Dr(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),Dr(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function Ok(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=be(this,e),c=l.on,h=l.value[o]==null?n||(n=Gc(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function Rk(e,t,r){var i=(e+="")=="transform"?qb:Xc;return t==null?this.styleTween(e,$k(e,i)).on("end.style."+e,Gc(e)):typeof t=="function"?this.styleTween(e,Ik(e,i,pn(this,"style."+e,t))).each(Ok(this._id,e)):this.styleTween(e,Pk(e,i,t),r).on("end.style."+e,null)}function Dk(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Nk(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&Dk(e,a,r)),i}return o._value=t,o}function qk(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Nk(e,t,r??""))}function zk(e){return function(){this.textContent=e}}function Wk(e){return function(){var t=e(this);this.textContent=t??""}}function jk(e){return this.tween("text",typeof e=="function"?Wk(pn(this,"text",e)):zk(e==null?"":e+""))}function Hk(e){return function(t){this.textContent=e.call(this,t)}}function Yk(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&Hk(s)),t}return i._value=e,i}function Uk(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Yk(e))}function Xk(){for(var e=this._name,t=this._id,r=Vc(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=le(l,t);Js(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Me(i,this._parents,e,r)}function Gk(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=be(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var Vk=0;function Me(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Vc(){return++Vk}var ve=Pi.prototype;Me.prototype={constructor:Me,select:Fk,selectAll:Mk,selectChild:ve.selectChild,selectChildren:ve.selectChildren,filter:wk,merge:vk,selection:Ek,transition:Xk,call:ve.call,nodes:ve.nodes,node:ve.node,size:ve.size,empty:ve.empty,each:ve.each,on:Bk,attr:ak,attrTween:dk,style:Rk,styleTween:qk,text:jk,textTween:Uk,remove:Lk,tween:Jb,delay:gk,duration:yk,ease:Ck,easeVarying:kk,end:Gk,[Symbol.iterator]:ve[Symbol.iterator]};function Zk(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Kk={time:null,delay:0,duration:250,ease:Zk};function Qk(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Jk(e){var t,r;e instanceof Me?(t=e._id,e=e._name):(t=Vc(),(r=Kk).time=fn(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&Js(l,e,t,c,a,r||Qk(l,t));return new Me(i,this._parents,e,t)}Pi.prototype.interrupt=Zb;Pi.prototype.transition=Jk;const sa=Math.PI,oa=2*sa,Ye=1e-6,t1=oa-Ye;function Zc(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function e1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zc;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class r1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Zc:e1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>Ye)if(!(Math.abs(d*l-c*h)>Ye)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,p=s-n,m=l*l+c*c,y=u*u+p*p,x=Math.sqrt(m),b=Math.sqrt(f),k=o*Math.tan((sa-Math.acos((m+f-y)/(2*x*b)))/2),v=k/b,S=k/x;Math.abs(v-1)>Ye&&this._append`L${t+v*h},${r+v*d}`,this._append`A${o},${o},0,0,${+(d*u>h*p)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,f=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ye||Math.abs(this._y1-h)>Ye)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%oa+oa),f>t1?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>Ye&&this._append`A${i},${i},0,${+(f>=sa)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ue(e){return function(){return e}}const i1=Math.abs,s1=Math.atan2,o1=Math.cos,a1=Math.max,n1=Math.min,l1=Math.sin,h1=Math.sqrt,aa=1e-12,to=Math.PI,na=to/2,c1=2*to;function d1(e){return e>1?0:e<-1?to:Math.acos(e)}function u1(e){return e>=1?na:e<=-1?-na:Math.asin(e)}function Kc(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new r1(t)}function Qc(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jc(e){this._context=e}Jc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function xi(e){return new Jc(e)}function f1(e){return e[0]}function g1(e){return e[1]}function td(e,t){var r=Ue(!0),i=null,s=xi,o=null,a=Kc(n);e=typeof e=="function"?e:e===void 0?f1:Ue(e),t=typeof t=="function"?t:t===void 0?g1:Ue(t);function n(l){var c,h=(l=Qc(l)).length,d,f=!1,u;for(i==null&&(o=s(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(u)return o=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ue(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ue(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ue(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class ed{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function rd(e){return new ed(e,!0)}function id(e){return new ed(e,!1)}function Re(){}function _s(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function eo(e){this._context=e}eo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_s(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ls(e){return new eo(e)}function sd(e){this._context=e}sd.prototype={areaStart:Re,areaEnd:Re,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function p1(e){return new sd(e)}function od(e){this._context=e}od.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:_s(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function m1(e){return new od(e)}function ad(e,t){this._basis=new eo(e),this._beta=t}ad.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const y1=(function e(t){function r(i){return t===1?new eo(i):new ad(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function Fs(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function mn(e,t){this._context=e,this._k=(1-t)/6}mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const nd=(function e(t){function r(i){return new mn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function yn(e,t){this._context=e,this._k=(1-t)/6}yn.prototype={areaStart:Re,areaEnd:Re,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const x1=(function e(t){function r(i){return new yn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xn(e,t){this._context=e,this._k=(1-t)/6}xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const C1=(function e(t){function r(i){return new xn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Cn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>aa){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>aa){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function ld(e,t){this._context=e,this._alpha=t}ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Cn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hd=(function e(t){function r(i){return t?new ld(i,t):new mn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function cd(e,t){this._context=e,this._alpha=t}cd.prototype={areaStart:Re,areaEnd:Re,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Cn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const b1=(function e(t){function r(i){return t?new cd(i,t):new yn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function dd(e,t){this._context=e,this._alpha=t}dd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Cn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const k1=(function e(t){function r(i){return t?new dd(i,t):new xn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ud(e){this._context=e}ud.prototype={areaStart:Re,areaEnd:Re,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function w1(e){return new ud(e)}function ql(e){return e<0?-1:1}function zl(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(ql(o)+ql(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function Wl(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Lo(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function Ms(e){this._context=e}Ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Lo(this,this._t0,Wl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Lo(this,Wl(this,r=zl(this,e,t)),r);break;default:Lo(this,this._t0,r=zl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fd(e){this._context=new gd(e)}(fd.prototype=Object.create(Ms.prototype)).point=function(e,t){Ms.prototype.point.call(this,t,e)};function gd(e){this._context=e}gd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function pd(e){return new Ms(e)}function md(e){return new fd(e)}function yd(e){this._context=e}yd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=jl(e),s=jl(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function jl(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function xd(e){return new yd(e)}function ro(e,t){this._context=e,this._t=t}ro.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Cd(e){return new ro(e,.5)}function bd(e){return new ro(e,0)}function kd(e){return new ro(e,1)}function ci(e,t,r){this.k=e,this.x=t,this.y=r}ci.prototype={constructor:ci,scale:function(e){return e===1?this:new ci(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ci(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ci.prototype;var wd=g(e=>{const{securityLevel:t}=gt();let r=dt("body");if(t==="sandbox"){const o=dt(`#i${e}`).node()?.contentDocument??document;r=dt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function bn(e){return typeof e>"u"||e===null}g(bn,"isNothing");function vd(e){return typeof e=="object"&&e!==null}g(vd,"isObject");function Sd(e){return Array.isArray(e)?e:bn(e)?[]:[e]}g(Sd,"toArray");function Td(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}g(Td,"extend");function Bd(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Bd,"repeat");function _d(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(_d,"isNegativeZero");var v1=bn,S1=vd,T1=Sd,B1=Bd,_1=_d,L1=Td,_t={isNothing:v1,isObject:S1,toArray:T1,repeat:B1,isNegativeZero:_1,extend:L1};function kn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
131
131
 
132
- `+e.mark.snippet),i+" "+r):i}g(bn,"formatError");function zr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=bn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(zr,"YAMLException$1");zr.prototype=Object.create(Error.prototype);zr.prototype.constructor=zr;zr.prototype.toString=g(function(t){return this.name+": "+bn(this,t)},"toString");var Ht=zr;function ls(e,t,r,i,s){var o="",a="",n=Math.floor(s/2)-1;return i-t>n&&(o=" ... ",t=i-n+o.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+o.length}}g(ls,"getLine");function hs(e,t){return Bt.repeat(" ",t-e.length)+e}g(hs,"padStart");function _d(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],o,a=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=ls(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),d),n=Bt.repeat(" ",t.indent)+hs((e.line-l+1).toString(),h)+" | "+c.str+`
133
- `+n;for(c=ls(e.buffer,i[a],s[a],e.position,d),n+=Bt.repeat(" ",t.indent)+hs((e.line+1).toString(),h)+" | "+c.str+`
134
- `,n+=Bt.repeat("-",t.indent+h+3+c.pos)+`^
135
- `,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)c=ls(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),d),n+=Bt.repeat(" ",t.indent)+hs((e.line+l+1).toString(),h)+" | "+c.str+`
136
- `;return n.replace(/\n$/,"")}g(_d,"makeSnippet");var L1=_d,F1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],M1=["scalar","sequence","mapping"];function Ld(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Ld,"compileStyleAliases");function Fd(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(F1.indexOf(r)===-1)throw new Ht('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ld(t.styleAliases||null),M1.indexOf(this.kind)===-1)throw new Ht('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Fd,"Type$1");var Pt=Fd;function na(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=a)}),r[s]=i}),r}g(na,"compileList");function Md(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Md,"compileMap");function As(e){return this.extend(e)}g(As,"Schema$1");As.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Pt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Ht("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Pt))throw new Ht("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Ht("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Ht("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof Pt))throw new Ht("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(As.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=na(s,"implicit"),s.compiledExplicit=na(s,"explicit"),s.compiledTypeMap=Md(s.compiledImplicit,s.compiledExplicit),s},"extend");var A1=As,E1=new Pt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),$1=new Pt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),I1=new Pt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),P1=new A1({explicit:[E1,$1,I1]});function Ad(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Ad,"resolveYamlNull");function Ed(){return null}g(Ed,"constructYamlNull");function $d(e){return e===null}g($d,"isNull");var O1=new Pt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ad,construct:Ed,predicate:$d,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Id(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(Id,"resolveYamlBoolean");function Pd(e){return e==="true"||e==="True"||e==="TRUE"}g(Pd,"constructYamlBoolean");function Od(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Od,"isBoolean");var R1=new Pt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Id,construct:Pd,predicate:Od,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Rd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Rd,"isHexCode");function Dd(e){return 48<=e&&e<=55}g(Dd,"isOctCode");function Nd(e){return 48<=e&&e<=57}g(Nd,"isDecCode");function qd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Rd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Dd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!Nd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(qd,"resolveYamlInteger");function zd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(zd,"constructYamlInteger");function Wd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Bt.isNegativeZero(e)}g(Wd,"isInteger");var D1=new Pt("tag:yaml.org,2002:int",{kind:"scalar",resolve:qd,construct:zd,predicate:Wd,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),N1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function jd(e){return!(e===null||!N1.test(e)||e[e.length-1]==="_")}g(jd,"resolveYamlFloat");function Hd(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Hd,"constructYamlFloat");var q1=/^[-+]?[0-9]+e/;function Yd(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Bt.isNegativeZero(e))return"-0.0";return r=e.toString(10),q1.test(r)?r.replace("e",".e"):r}g(Yd,"representYamlFloat");function Ud(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Bt.isNegativeZero(e))}g(Ud,"isFloat");var z1=new Pt("tag:yaml.org,2002:float",{kind:"scalar",resolve:jd,construct:Hd,predicate:Ud,represent:Yd,defaultStyle:"lowercase"}),Xd=P1.extend({implicit:[O1,R1,D1,z1]}),W1=Xd,Gd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Vd=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 Zd(e){return e===null?!1:Gd.exec(e)!==null||Vd.exec(e)!==null}g(Zd,"resolveYamlTimestamp");function Kd(e){var t,r,i,s,o,a,n,l=0,c=null,h,d,f;if(t=Gd.exec(e),t===null&&(t=Vd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,o,a,n,l)),c&&f.setTime(f.getTime()-c),f}g(Kd,"constructYamlTimestamp");function Qd(e){return e.toISOString()}g(Qd,"representYamlTimestamp");var j1=new Pt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Zd,construct:Kd,instanceOf:Date,represent:Qd});function Jd(e){return e==="<<"||e===null}g(Jd,"resolveYamlMerge");var H1=new Pt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Jd}),kn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
- \r`;function tu(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=kn;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(tu,"resolveYamlBinary");function eu(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=kn,a=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}g(eu,"constructYamlBinary");function ru(e){var t="",r=0,i,s,o=e.length,a=kn;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):s===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):s===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}g(ru,"representYamlBinary");function iu(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(iu,"isBinary");var Y1=new Pt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:tu,construct:eu,predicate:iu,represent:ru}),U1=Object.prototype.hasOwnProperty,X1=Object.prototype.toString;function su(e){if(e===null)return!0;var t=[],r,i,s,o,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],a=!1,X1.call(s)!=="[object Object]")return!1;for(o in s)if(U1.call(s,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}g(su,"resolveYamlOmap");function ou(e){return e!==null?e:[]}g(ou,"constructYamlOmap");var G1=new Pt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:su,construct:ou}),V1=Object.prototype.toString;function au(e){if(e===null)return!0;var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],V1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}g(au,"resolveYamlPairs");function nu(e){if(e===null)return[];var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}g(nu,"constructYamlPairs");var Z1=new Pt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:au,construct:nu}),K1=Object.prototype.hasOwnProperty;function lu(e){if(e===null)return!0;var t,r=e;for(t in r)if(K1.call(r,t)&&r[t]!==null)return!1;return!0}g(lu,"resolveYamlSet");function hu(e){return e!==null?e:{}}g(hu,"constructYamlSet");var Q1=new Pt("tag:yaml.org,2002:set",{kind:"mapping",resolve:lu,construct:hu}),cu=W1.extend({implicit:[j1,H1],explicit:[Y1,G1,Z1,Q1]}),Re=Object.prototype.hasOwnProperty,Es=1,du=2,uu=3,$s=4,Lo=1,J1=2,jl=3,t2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,e2=/[\x85\u2028\u2029]/,r2=/[,\[\]\{\}]/,fu=/^(?:!|!!|![a-z\-]+!)$/i,gu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function la(e){return Object.prototype.toString.call(e)}g(la,"_class");function se(e){return e===10||e===13}g(se,"is_EOL");function Pe(e){return e===9||e===32}g(Pe,"is_WHITE_SPACE");function Nt(e){return e===9||e===32||e===10||e===13}g(Nt,"is_WS_OR_EOL");function Ze(e){return e===44||e===91||e===93||e===123||e===125}g(Ze,"is_FLOW_INDICATOR");function pu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(pu,"fromHexCode");function mu(e){return e===120?2:e===117?4:e===85?8:0}g(mu,"escapedHexLen");function yu(e){return 48<=e&&e<=57?e-48:-1}g(yu,"fromDecimalCode");function ha(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
138
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(ha,"simpleEscapeSequence");function xu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(xu,"charFromCodepoint");function wn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(wn,"setProperty");var Cu=new Array(256),bu=new Array(256);for(je=0;je<256;je++)Cu[je]=ha(je)?1:0,bu[je]=ha(je);var je;function ku(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||cu,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(ku,"State$1");function vn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=L1(r),new Ht(t,r)}g(vn,"generateError");function it(e,t){throw vn(e,t)}g(it,"throwError");function Bi(e,t){e.onWarning&&e.onWarning.call(null,vn(e,t))}g(Bi,"throwWarning");var Hl={YAML:g(function(t,r,i){var s,o,a;t.version!==null&&it(t,"duplication of %YAML directive"),i.length!==1&&it(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&it(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),a=parseInt(s[2],10),o!==1&&it(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Bi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,o;i.length!==2&&it(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],fu.test(s)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),Re.call(t.tagMap,s)&&it(t,'there is a previously declared suffix for "'+s+'" tag handle'),gu.test(o)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{it(t,"tag prefix is malformed: "+o)}t.tagMap[s]=o},"handleTagDirective")};function Le(e,t,r,i){var s,o,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,o=n.length;s<o;s+=1)a=n.charCodeAt(s),a===9||32<=a&&a<=1114111||it(e,"expected valid JSON character");else t2.test(n)&&it(e,"the stream contains non-printable characters");e.result+=n}}g(Le,"captureSegment");function ca(e,t,r,i){var s,o,a,n;for(Bt.isObject(r)||it(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),a=0,n=s.length;a<n;a+=1)o=s[a],Re.call(t,o)||(wn(t,o,r[o]),i[o]=!0)}g(ca,"mergeMappings");function Ke(e,t,r,i,s,o,a,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&it(e,"nested arrays are not supported inside keys"),typeof s=="object"&&la(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&la(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)ca(e,t,o[c],r);else ca(e,t,o,r);else!e.json&&!Re.call(r,s)&&Re.call(t,s)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,it(e,"duplicated mapping key")),wn(t,s,o),delete r[s];return t}g(Ke,"storeMappingPair");function io(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(io,"readLineBreak");function kt(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Pe(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(se(s))for(io(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Bi(e,"deficient indentation"),i}g(kt,"skipSeparationSpace");function Pi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Nt(r)))}g(Pi,"testDocumentSeparator");function so(e,t){t===1?e.result+=" ":t>1&&(e.result+=Bt.repeat(`
139
- `,t-1))}g(so,"writeFoldedLines");function wu(e,t,r){var i,s,o,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),Nt(u)||Ze(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),Nt(s)||r&&Ze(s)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),Nt(s)||r&&Ze(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),Nt(i))break}else{if(e.position===e.lineStart&&Pi(e)||r&&Ze(u))break;if(se(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,kt(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Le(e,o,a,!1),so(e,e.line-l),o=a=e.position,n=!1),Pe(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Le(e,o,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}g(wu,"readPlainScalar");function vu(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Le(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else se(r)?(Le(e,i,s,!0),so(e,kt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Pi(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}g(vu,"readSingleQuotedScalar");function Su(e,t){var r,i,s,o,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Le(e,r,e.position,!0),e.position++,!0;if(n===92){if(Le(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),se(n))kt(e,!1,t);else if(n<256&&Cu[n])e.result+=bu[n],e.position++;else if((a=mu(n))>0){for(s=a,o=0;s>0;s--)n=e.input.charCodeAt(++e.position),(a=pu(n))>=0?o=(o<<4)+a:it(e,"expected hexadecimal character");e.result+=xu(o),e.position++}else it(e,"unknown escape sequence");r=i=e.position}else se(n)?(Le(e,r,i,!0),so(e,kt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Pi(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}g(Su,"readDoubleQuotedScalar");function Tu(e,t){var r=!0,i,s,o,a=e.tag,n,l=e.anchor,c,h,d,f,u,p=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(kt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),y=m=x=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Nt(c)&&(d=f=!0,e.position++,kt(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,or(e,t,Es,!1,!0),y=e.tag,m=e.result,kt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),kt(e,!0,t),or(e,t,Es,!1,!0),x=e.result),u?Ke(e,n,p,y,m,x,i,s,o):d?n.push(Ke(e,null,p,y,m,x,i,s,o)):n.push(m),kt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}it(e,"unexpected end of the stream within a flow collection")}g(Tu,"readFlowCollection");function Bu(e,t){var r,i,s=Lo,o=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Lo===s?s=d===43?jl:J1:it(e,"repeat of a chomping mode identifier");else if((h=yu(d))>=0)h===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?it(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(Pe(d)){do d=e.input.charCodeAt(++e.position);while(Pe(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!se(d)&&d!==0)}for(;d!==0;){for(io(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),se(d)){l++;continue}if(e.lineIndent<n){s===jl?e.result+=Bt.repeat(`
140
- `,o?1+l:l):s===Lo&&o&&(e.result+=`
141
- `);break}for(i?Pe(d)?(c=!0,e.result+=Bt.repeat(`
142
- `,o?1+l:l)):c?(c=!1,e.result+=Bt.repeat(`
143
- `,l+1)):l===0?o&&(e.result+=" "):e.result+=Bt.repeat(`
144
- `,l):e.result+=Bt.repeat(`
145
- `,o?1+l:l),o=!0,a=!0,l=0,r=e.position;!se(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Le(e,r,e.position,!1)}return!0}g(Bu,"readBlockScalar");function da(e,t){var r,i=e.tag,s=e.anchor,o=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Nt(a))));){if(n=!0,e.position++,kt(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,or(e,t,uu,!1,!0),o.push(e.result),kt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}g(da,"readBlockSequence");function _u(e,t,r){var i,s,o,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,p=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(b===63||b===58)&&Nt(i))b===63?(y&&(Ke(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!0,s=!0):y?(y=!1,s=!0):it(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!or(e,r,du,!1,!0))break;if(e.line===o){for(b=e.input.charCodeAt(e.position);Pe(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Nt(b)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ke(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!1,s=!1,u=e.tag,p=e.result;else if(x)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)it(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),or(e,t,$s,!0,s)&&(y?p=e.result:m=e.result),y||(Ke(e,d,f,u,p,m,a,n,l),u=p=m=null),kt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ke(e,d,f,u,p,null,a,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),x}g(_u,"readBlockMapping");function Lu(e){var t,r=!1,i=!1,s,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Nt(a);)a===33&&(i?it(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),fu.test(s)||it(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),r2.test(o)&&it(e,"tag suffix cannot contain flow indicator characters")}o&&!gu.test(o)&&it(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{it(e,"tag name is malformed: "+o)}return r?e.tag=o:Re.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:it(e,'undeclared tag handle "'+s+'"'),!0}g(Lu,"readTagProperty");function Fu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Nt(r)&&!Ze(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Fu,"readAnchorProperty");function Mu(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Nt(i)&&!Ze(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Re.call(e.anchorMap,r)||it(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],kt(e,!0,-1),!0}g(Mu,"readAlias");function or(e,t,r,i,s){var o,a,n,l=1,c=!1,h=!1,d,f,u,p,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=n=$s===r||uu===r,i&&kt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Lu(e)||Fu(e);)kt(e,!0,-1)?(c=!0,n=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||$s===r)&&(Es===r||du===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(da(e,y)||_u(e,y,m))||Tu(e,m)?h=!0:(a&&Bu(e,m)||vu(e,m)||Su(e,m)?h=!0:Mu(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):wu(e,m,Es===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&da(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Re.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,f=u.length;d<f;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){p=u[d];break}p||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}g(or,"composeNode");function Au(e){var t=e.position,r,i,s,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(kt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Nt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&it(e,"directive name must not be less than one character in length");a!==0;){for(;Pe(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!se(a));break}if(se(a))break;for(r=e.position;a!==0&&!Nt(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}a!==0&&io(e),Re.call(Hl,i)?Hl[i](e,i,s):Bi(e,'unknown document directive "'+i+'"')}if(kt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,kt(e,!0,-1)):o&&it(e,"directives end mark is expected"),or(e,e.lineIndent-1,$s,!1,!0),kt(e,!0,-1),e.checkLineBreaks&&e2.test(e.input.slice(t,e.position))&&Bi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Pi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,kt(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}g(Au,"readDocument");function Sn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
146
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new ku(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,it(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Au(r);return r.documents}g(Sn,"loadDocuments");function i2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Sn(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}g(i2,"loadAll$1");function Eu(e,t){var r=Sn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Ht("expected a single document in the stream, but found more")}}g(Eu,"load$1");var s2=Eu,o2={load:s2},$u=Object.prototype.toString,Iu=Object.prototype.hasOwnProperty,Tn=65279,a2=9,_i=10,n2=13,l2=32,h2=33,c2=34,ua=35,d2=37,u2=38,f2=39,g2=42,Pu=44,p2=45,Is=58,m2=61,y2=62,x2=63,C2=64,Ou=91,Ru=93,b2=96,Du=123,k2=124,Nu=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var w2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qu(e,t){var r,i,s,o,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)a=i[s],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Iu.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}g(qu,"compileStyleMap");function zu(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Ht("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Bt.repeat("0",i-t.length)+t}g(zu,"encodeHex");var S2=1,Li=2;function Wu(e){this.schema=e.schema||cu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Bt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Li:S2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(Wu,"State");function fa(e,t){for(var r=Bt.repeat(" ",t),i=0,s=-1,o="",a,n=e.length;i<n;)s=e.indexOf(`
132
+ `+e.mark.snippet),i+" "+r):i}g(kn,"formatError");function zr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=kn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(zr,"YAMLException$1");zr.prototype=Object.create(Error.prototype);zr.prototype.constructor=zr;zr.prototype.toString=g(function(t){return this.name+": "+kn(this,t)},"toString");var Ht=zr;function ls(e,t,r,i,s){var o="",a="",n=Math.floor(s/2)-1;return i-t>n&&(o=" ... ",t=i-n+o.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+o.length}}g(ls,"getLine");function hs(e,t){return _t.repeat(" ",t-e.length)+e}g(hs,"padStart");function Ld(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],o,a=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=ls(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),d),n=_t.repeat(" ",t.indent)+hs((e.line-l+1).toString(),h)+" | "+c.str+`
133
+ `+n;for(c=ls(e.buffer,i[a],s[a],e.position,d),n+=_t.repeat(" ",t.indent)+hs((e.line+1).toString(),h)+" | "+c.str+`
134
+ `,n+=_t.repeat("-",t.indent+h+3+c.pos)+`^
135
+ `,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)c=ls(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),d),n+=_t.repeat(" ",t.indent)+hs((e.line+l+1).toString(),h)+" | "+c.str+`
136
+ `;return n.replace(/\n$/,"")}g(Ld,"makeSnippet");var F1=Ld,M1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],A1=["scalar","sequence","mapping"];function Fd(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Fd,"compileStyleAliases");function Md(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(M1.indexOf(r)===-1)throw new Ht('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Fd(t.styleAliases||null),A1.indexOf(this.kind)===-1)throw new Ht('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Md,"Type$1");var It=Md;function la(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=a)}),r[s]=i}),r}g(la,"compileList");function Ad(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(Ad,"compileMap");function As(e){return this.extend(e)}g(As,"Schema$1");As.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof It)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Ht("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof It))throw new Ht("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Ht("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Ht("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof It))throw new Ht("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(As.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=la(s,"implicit"),s.compiledExplicit=la(s,"explicit"),s.compiledTypeMap=Ad(s.compiledImplicit,s.compiledExplicit),s},"extend");var E1=As,$1=new It("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),P1=new It("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),I1=new It("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),O1=new E1({explicit:[$1,P1,I1]});function Ed(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(Ed,"resolveYamlNull");function $d(){return null}g($d,"constructYamlNull");function Pd(e){return e===null}g(Pd,"isNull");var R1=new It("tag:yaml.org,2002:null",{kind:"scalar",resolve:Ed,construct:$d,predicate:Pd,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function Id(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(Id,"resolveYamlBoolean");function Od(e){return e==="true"||e==="True"||e==="TRUE"}g(Od,"constructYamlBoolean");function Rd(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(Rd,"isBoolean");var D1=new It("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Id,construct:Od,predicate:Rd,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Dd(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(Dd,"isHexCode");function Nd(e){return 48<=e&&e<=55}g(Nd,"isOctCode");function qd(e){return 48<=e&&e<=57}g(qd,"isDecCode");function zd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Dd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!Nd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!qd(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(zd,"resolveYamlInteger");function Wd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(Wd,"constructYamlInteger");function jd(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!_t.isNegativeZero(e)}g(jd,"isInteger");var N1=new It("tag:yaml.org,2002:int",{kind:"scalar",resolve:zd,construct:Wd,predicate:jd,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q1=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hd(e){return!(e===null||!q1.test(e)||e[e.length-1]==="_")}g(Hd,"resolveYamlFloat");function Yd(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(Yd,"constructYamlFloat");var z1=/^[-+]?[0-9]+e/;function Ud(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_t.isNegativeZero(e))return"-0.0";return r=e.toString(10),z1.test(r)?r.replace("e",".e"):r}g(Ud,"representYamlFloat");function Xd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_t.isNegativeZero(e))}g(Xd,"isFloat");var W1=new It("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hd,construct:Yd,predicate:Xd,represent:Ud,defaultStyle:"lowercase"}),Gd=O1.extend({implicit:[R1,D1,N1,W1]}),j1=Gd,Vd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zd=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 Kd(e){return e===null?!1:Vd.exec(e)!==null||Zd.exec(e)!==null}g(Kd,"resolveYamlTimestamp");function Qd(e){var t,r,i,s,o,a,n,l=0,c=null,h,d,f;if(t=Vd.exec(e),t===null&&(t=Zd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,o,a,n,l)),c&&f.setTime(f.getTime()-c),f}g(Qd,"constructYamlTimestamp");function Jd(e){return e.toISOString()}g(Jd,"representYamlTimestamp");var H1=new It("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Kd,construct:Qd,instanceOf:Date,represent:Jd});function tu(e){return e==="<<"||e===null}g(tu,"resolveYamlMerge");var Y1=new It("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tu}),wn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
137
+ \r`;function eu(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=wn;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(eu,"resolveYamlBinary");function ru(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=wn,a=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}g(ru,"constructYamlBinary");function iu(e){var t="",r=0,i,s,o=e.length,a=wn;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):s===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):s===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}g(iu,"representYamlBinary");function su(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(su,"isBinary");var U1=new It("tag:yaml.org,2002:binary",{kind:"scalar",resolve:eu,construct:ru,predicate:su,represent:iu}),X1=Object.prototype.hasOwnProperty,G1=Object.prototype.toString;function ou(e){if(e===null)return!0;var t=[],r,i,s,o,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],a=!1,G1.call(s)!=="[object Object]")return!1;for(o in s)if(X1.call(s,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}g(ou,"resolveYamlOmap");function au(e){return e!==null?e:[]}g(au,"constructYamlOmap");var V1=new It("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ou,construct:au}),Z1=Object.prototype.toString;function nu(e){if(e===null)return!0;var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],Z1.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}g(nu,"resolveYamlPairs");function lu(e){if(e===null)return[];var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}g(lu,"constructYamlPairs");var K1=new It("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:nu,construct:lu}),Q1=Object.prototype.hasOwnProperty;function hu(e){if(e===null)return!0;var t,r=e;for(t in r)if(Q1.call(r,t)&&r[t]!==null)return!1;return!0}g(hu,"resolveYamlSet");function cu(e){return e!==null?e:{}}g(cu,"constructYamlSet");var J1=new It("tag:yaml.org,2002:set",{kind:"mapping",resolve:hu,construct:cu}),du=j1.extend({implicit:[H1,Y1],explicit:[U1,V1,K1,J1]}),De=Object.prototype.hasOwnProperty,Es=1,uu=2,fu=3,$s=4,Fo=1,t2=2,Hl=3,e2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,r2=/[\x85\u2028\u2029]/,i2=/[,\[\]\{\}]/,gu=/^(?:!|!!|![a-z\-]+!)$/i,pu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ha(e){return Object.prototype.toString.call(e)}g(ha,"_class");function se(e){return e===10||e===13}g(se,"is_EOL");function Oe(e){return e===9||e===32}g(Oe,"is_WHITE_SPACE");function qt(e){return e===9||e===32||e===10||e===13}g(qt,"is_WS_OR_EOL");function Ze(e){return e===44||e===91||e===93||e===123||e===125}g(Ze,"is_FLOW_INDICATOR");function mu(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(mu,"fromHexCode");function yu(e){return e===120?2:e===117?4:e===85?8:0}g(yu,"escapedHexLen");function xu(e){return 48<=e&&e<=57?e-48:-1}g(xu,"fromDecimalCode");function ca(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
138
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(ca,"simpleEscapeSequence");function Cu(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(Cu,"charFromCodepoint");function vn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(vn,"setProperty");var bu=new Array(256),ku=new Array(256);for(je=0;je<256;je++)bu[je]=ca(je)?1:0,ku[je]=ca(je);var je;function wu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||du,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(wu,"State$1");function Sn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=F1(r),new Ht(t,r)}g(Sn,"generateError");function it(e,t){throw Sn(e,t)}g(it,"throwError");function Bi(e,t){e.onWarning&&e.onWarning.call(null,Sn(e,t))}g(Bi,"throwWarning");var Yl={YAML:g(function(t,r,i){var s,o,a;t.version!==null&&it(t,"duplication of %YAML directive"),i.length!==1&&it(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&it(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),a=parseInt(s[2],10),o!==1&&it(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Bi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,o;i.length!==2&&it(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],gu.test(s)||it(t,"ill-formed tag handle (first argument) of the TAG directive"),De.call(t.tagMap,s)&&it(t,'there is a previously declared suffix for "'+s+'" tag handle'),pu.test(o)||it(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{it(t,"tag prefix is malformed: "+o)}t.tagMap[s]=o},"handleTagDirective")};function Fe(e,t,r,i){var s,o,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,o=n.length;s<o;s+=1)a=n.charCodeAt(s),a===9||32<=a&&a<=1114111||it(e,"expected valid JSON character");else e2.test(n)&&it(e,"the stream contains non-printable characters");e.result+=n}}g(Fe,"captureSegment");function da(e,t,r,i){var s,o,a,n;for(_t.isObject(r)||it(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),a=0,n=s.length;a<n;a+=1)o=s[a],De.call(t,o)||(vn(t,o,r[o]),i[o]=!0)}g(da,"mergeMappings");function Ke(e,t,r,i,s,o,a,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&it(e,"nested arrays are not supported inside keys"),typeof s=="object"&&ha(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&ha(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)da(e,t,o[c],r);else da(e,t,o,r);else!e.json&&!De.call(r,s)&&De.call(t,s)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,it(e,"duplicated mapping key")),vn(t,s,o),delete r[s];return t}g(Ke,"storeMappingPair");function io(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):it(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(io,"readLineBreak");function kt(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;Oe(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(se(s))for(io(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Bi(e,"deficient indentation"),i}g(kt,"skipSeparationSpace");function Ii(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||qt(r)))}g(Ii,"testDocumentSeparator");function so(e,t){t===1?e.result+=" ":t>1&&(e.result+=_t.repeat(`
139
+ `,t-1))}g(so,"writeFoldedLines");function vu(e,t,r){var i,s,o,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),qt(u)||Ze(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),qt(s)||r&&Ze(s)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),qt(s)||r&&Ze(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),qt(i))break}else{if(e.position===e.lineStart&&Ii(e)||r&&Ze(u))break;if(se(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,kt(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Fe(e,o,a,!1),so(e,e.line-l),o=a=e.position,n=!1),Oe(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Fe(e,o,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}g(vu,"readPlainScalar");function Su(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Fe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else se(r)?(Fe(e,i,s,!0),so(e,kt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&Ii(e)?it(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);it(e,"unexpected end of the stream within a single quoted scalar")}g(Su,"readSingleQuotedScalar");function Tu(e,t){var r,i,s,o,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Fe(e,r,e.position,!0),e.position++,!0;if(n===92){if(Fe(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),se(n))kt(e,!1,t);else if(n<256&&bu[n])e.result+=ku[n],e.position++;else if((a=yu(n))>0){for(s=a,o=0;s>0;s--)n=e.input.charCodeAt(++e.position),(a=mu(n))>=0?o=(o<<4)+a:it(e,"expected hexadecimal character");e.result+=Cu(o),e.position++}else it(e,"unknown escape sequence");r=i=e.position}else se(n)?(Fe(e,r,i,!0),so(e,kt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ii(e)?it(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}it(e,"unexpected end of the stream within a double quoted scalar")}g(Tu,"readDoubleQuotedScalar");function Bu(e,t){var r=!0,i,s,o,a=e.tag,n,l=e.anchor,c,h,d,f,u,p=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,u=!1,n=[];else if(b===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(kt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?b===44&&it(e,"expected the node content, but found ','"):it(e,"missed comma between flow collection entries"),y=m=x=null,d=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),qt(c)&&(d=f=!0,e.position++,kt(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,or(e,t,Es,!1,!0),y=e.tag,m=e.result,kt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(d=!0,b=e.input.charCodeAt(++e.position),kt(e,!0,t),or(e,t,Es,!1,!0),x=e.result),u?Ke(e,n,p,y,m,x,i,s,o):d?n.push(Ke(e,null,p,y,m,x,i,s,o)):n.push(m),kt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}it(e,"unexpected end of the stream within a flow collection")}g(Bu,"readFlowCollection");function _u(e,t){var r,i,s=Fo,o=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Fo===s?s=d===43?Hl:t2:it(e,"repeat of a chomping mode identifier");else if((h=xu(d))>=0)h===0?it(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?it(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(Oe(d)){do d=e.input.charCodeAt(++e.position);while(Oe(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!se(d)&&d!==0)}for(;d!==0;){for(io(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),se(d)){l++;continue}if(e.lineIndent<n){s===Hl?e.result+=_t.repeat(`
140
+ `,o?1+l:l):s===Fo&&o&&(e.result+=`
141
+ `);break}for(i?Oe(d)?(c=!0,e.result+=_t.repeat(`
142
+ `,o?1+l:l)):c?(c=!1,e.result+=_t.repeat(`
143
+ `,l+1)):l===0?o&&(e.result+=" "):e.result+=_t.repeat(`
144
+ `,l):e.result+=_t.repeat(`
145
+ `,o?1+l:l),o=!0,a=!0,l=0,r=e.position;!se(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Fe(e,r,e.position,!1)}return!0}g(_u,"readBlockScalar");function ua(e,t){var r,i=e.tag,s=e.anchor,o=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!qt(a))));){if(n=!0,e.position++,kt(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,or(e,t,fu,!1,!0),o.push(e.result),kt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)it(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}g(ua,"readBlockSequence");function Lu(e,t,r){var i,s,o,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,p=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,it(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(b===63||b===58)&&qt(i))b===63?(y&&(Ke(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!0,s=!0):y?(y=!1,s=!0):it(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!or(e,r,uu,!1,!0))break;if(e.line===o){for(b=e.input.charCodeAt(e.position);Oe(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),qt(b)||it(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ke(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!1,s=!1,u=e.tag,p=e.result;else if(x)it(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)it(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),or(e,t,$s,!0,s)&&(y?p=e.result:m=e.result),y||(Ke(e,d,f,u,p,m,a,n,l),u=p=m=null),kt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)it(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Ke(e,d,f,u,p,null,a,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),x}g(Lu,"readBlockMapping");function Fu(e){var t,r=!1,i=!1,s,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&it(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):it(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!qt(a);)a===33&&(i?it(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),gu.test(s)||it(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),i2.test(o)&&it(e,"tag suffix cannot contain flow indicator characters")}o&&!pu.test(o)&&it(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{it(e,"tag name is malformed: "+o)}return r?e.tag=o:De.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:it(e,'undeclared tag handle "'+s+'"'),!0}g(Fu,"readTagProperty");function Mu(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&it(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!Ze(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(Mu,"readAnchorProperty");function Au(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!qt(i)&&!Ze(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&it(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),De.call(e.anchorMap,r)||it(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],kt(e,!0,-1),!0}g(Au,"readAlias");function or(e,t,r,i,s){var o,a,n,l=1,c=!1,h=!1,d,f,u,p,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=n=$s===r||fu===r,i&&kt(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Fu(e)||Mu(e);)kt(e,!0,-1)?(c=!0,n=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||$s===r)&&(Es===r||uu===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(ua(e,y)||Lu(e,y,m))||Bu(e,m)?h=!0:(a&&_u(e,m)||Su(e,m)||Tu(e,m)?h=!0:Au(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&it(e,"alias node should not have any properties")):vu(e,m,Es===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&ua(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&it(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(De.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,f=u.length;d<f;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){p=u[d];break}p||it(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&it(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):it(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}g(or,"composeNode");function Eu(e){var t=e.position,r,i,s,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(kt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&it(e,"directive name must not be less than one character in length");a!==0;){for(;Oe(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!se(a));break}if(se(a))break;for(r=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}a!==0&&io(e),De.call(Yl,i)?Yl[i](e,i,s):Bi(e,'unknown document directive "'+i+'"')}if(kt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,kt(e,!0,-1)):o&&it(e,"directives end mark is expected"),or(e,e.lineIndent-1,$s,!1,!0),kt(e,!0,-1),e.checkLineBreaks&&r2.test(e.input.slice(t,e.position))&&Bi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ii(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,kt(e,!0,-1));return}if(e.position<e.length-1)it(e,"end of the stream or a document separator is expected");else return}g(Eu,"readDocument");function Tn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
146
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new wu(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,it(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Eu(r);return r.documents}g(Tn,"loadDocuments");function s2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Tn(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}g(s2,"loadAll$1");function $u(e,t){var r=Tn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Ht("expected a single document in the stream, but found more")}}g($u,"load$1");var o2=$u,a2={load:o2},Pu=Object.prototype.toString,Iu=Object.prototype.hasOwnProperty,Bn=65279,n2=9,_i=10,l2=13,h2=32,c2=33,d2=34,fa=35,u2=37,f2=38,g2=39,p2=42,Ou=44,m2=45,Ps=58,y2=61,x2=62,C2=63,b2=64,Ru=91,Du=93,k2=96,Nu=123,w2=124,qu=125,Rt={};Rt[0]="\\0";Rt[7]="\\a";Rt[8]="\\b";Rt[9]="\\t";Rt[10]="\\n";Rt[11]="\\v";Rt[12]="\\f";Rt[13]="\\r";Rt[27]="\\e";Rt[34]='\\"';Rt[92]="\\\\";Rt[133]="\\N";Rt[160]="\\_";Rt[8232]="\\L";Rt[8233]="\\P";var v2=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],S2=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zu(e,t){var r,i,s,o,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)a=i[s],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&Iu.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}g(zu,"compileStyleMap");function Wu(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Ht("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+_t.repeat("0",i-t.length)+t}g(Wu,"encodeHex");var T2=1,Li=2;function ju(e){this.schema=e.schema||du,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=_t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=zu(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Li:T2,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(ju,"State");function ga(e,t){for(var r=_t.repeat(" ",t),i=0,s=-1,o="",a,n=e.length;i<n;)s=e.indexOf(`
147
147
  `,i),s===-1?(a=e.slice(i),i=n):(a=e.slice(i,s+1),i=s+1),a.length&&a!==`
148
- `&&(o+=r),o+=a;return o}g(fa,"indentString");function Ps(e,t){return`
149
- `+Bt.repeat(" ",e.indent*t)}g(Ps,"generateNextLine");function ju(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(ju,"testImplicitResolving");function Fi(e){return e===l2||e===a2}g(Fi,"isWhitespace");function Wr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Tn||65536<=e&&e<=1114111}g(Wr,"isPrintable");function ga(e){return Wr(e)&&e!==Tn&&e!==n2&&e!==_i}g(ga,"isNsCharOrWhitespace");function pa(e,t,r){var i=ga(e),s=i&&!Fi(e);return(r?i:i&&e!==Pu&&e!==Ou&&e!==Ru&&e!==Du&&e!==Nu)&&e!==ua&&!(t===Is&&!s)||ga(t)&&!Fi(t)&&e===ua||t===Is&&s}g(pa,"isPlainSafe");function Hu(e){return Wr(e)&&e!==Tn&&!Fi(e)&&e!==p2&&e!==x2&&e!==Is&&e!==Pu&&e!==Ou&&e!==Ru&&e!==Du&&e!==Nu&&e!==ua&&e!==u2&&e!==g2&&e!==h2&&e!==k2&&e!==m2&&e!==y2&&e!==f2&&e!==c2&&e!==d2&&e!==C2&&e!==b2}g(Hu,"isPlainSafeFirst");function Yu(e){return!Fi(e)&&e!==Is}g(Yu,"isPlainSafeLast");function yr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(yr,"codePointAt");function Bn(e){var t=/^\n* /;return t.test(e)}g(Bn,"needIndentIndicator");var Uu=1,ma=2,Xu=3,Gu=4,ur=5;function Vu(e,t,r,i,s,o,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,p=-1,m=Hu(yr(e,0))&&Yu(yr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=yr(e,l),!Wr(c))return ur;m=m&&pa(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=yr(e,l),c===_i)d=!0,u&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!Wr(c))return ur;m=m&&pa(c,h,n),h=c}f=f||u&&l-p-1>i&&e[p+1]!==" "}return!d&&!f?m&&!a&&!s(e)?Uu:o===Li?ur:ma:r>9&&Bn(e)?ur:a?o===Li?ur:ma:f?Gu:Xu}g(Vu,"chooseScalarStyle");function Zu(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Li?'""':"''";if(!e.noCompatMode&&(w2.indexOf(t)!==-1||v2.test(t)))return e.quotingType===Li?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return ju(e,c)}switch(g(l,"testAmbiguity"),Vu(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,s)){case Uu:return t;case ma:return"'"+t.replace(/'/g,"''")+"'";case Xu:return"|"+ya(t,e.indent)+xa(fa(t,o));case Gu:return">"+ya(t,e.indent)+xa(fa(Ku(t,a),o));case ur:return'"'+Qu(t)+'"';default:throw new Ht("impossible error: invalid scalar style")}})()}g(Zu,"writeScalar");function ya(e,t){var r=Bn(e)?String(t):"",i=e[e.length-1]===`
148
+ `&&(o+=r),o+=a;return o}g(ga,"indentString");function Is(e,t){return`
149
+ `+_t.repeat(" ",e.indent*t)}g(Is,"generateNextLine");function Hu(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(Hu,"testImplicitResolving");function Fi(e){return e===h2||e===n2}g(Fi,"isWhitespace");function Wr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Bn||65536<=e&&e<=1114111}g(Wr,"isPrintable");function pa(e){return Wr(e)&&e!==Bn&&e!==l2&&e!==_i}g(pa,"isNsCharOrWhitespace");function ma(e,t,r){var i=pa(e),s=i&&!Fi(e);return(r?i:i&&e!==Ou&&e!==Ru&&e!==Du&&e!==Nu&&e!==qu)&&e!==fa&&!(t===Ps&&!s)||pa(t)&&!Fi(t)&&e===fa||t===Ps&&s}g(ma,"isPlainSafe");function Yu(e){return Wr(e)&&e!==Bn&&!Fi(e)&&e!==m2&&e!==C2&&e!==Ps&&e!==Ou&&e!==Ru&&e!==Du&&e!==Nu&&e!==qu&&e!==fa&&e!==f2&&e!==p2&&e!==c2&&e!==w2&&e!==y2&&e!==x2&&e!==g2&&e!==d2&&e!==u2&&e!==b2&&e!==k2}g(Yu,"isPlainSafeFirst");function Uu(e){return!Fi(e)&&e!==Ps}g(Uu,"isPlainSafeLast");function yr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(yr,"codePointAt");function _n(e){var t=/^\n* /;return t.test(e)}g(_n,"needIndentIndicator");var Xu=1,ya=2,Gu=3,Vu=4,ur=5;function Zu(e,t,r,i,s,o,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,p=-1,m=Yu(yr(e,0))&&Uu(yr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=yr(e,l),!Wr(c))return ur;m=m&&ma(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=yr(e,l),c===_i)d=!0,u&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!Wr(c))return ur;m=m&&ma(c,h,n),h=c}f=f||u&&l-p-1>i&&e[p+1]!==" "}return!d&&!f?m&&!a&&!s(e)?Xu:o===Li?ur:ya:r>9&&_n(e)?ur:a?o===Li?ur:ya:f?Vu:Gu}g(Zu,"chooseScalarStyle");function Ku(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===Li?'""':"''";if(!e.noCompatMode&&(v2.indexOf(t)!==-1||S2.test(t)))return e.quotingType===Li?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return Hu(e,c)}switch(g(l,"testAmbiguity"),Zu(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,s)){case Xu:return t;case ya:return"'"+t.replace(/'/g,"''")+"'";case Gu:return"|"+xa(t,e.indent)+Ca(ga(t,o));case Vu:return">"+xa(t,e.indent)+Ca(ga(Qu(t,a),o));case ur:return'"'+Ju(t)+'"';default:throw new Ht("impossible error: invalid scalar style")}})()}g(Ku,"writeScalar");function xa(e,t){var r=_n(e)?String(t):"",i=e[e.length-1]===`
150
150
  `,s=i&&(e[e.length-2]===`
151
151
  `||e===`
152
152
  `),o=s?"+":i?"":"-";return r+o+`
153
- `}g(ya,"blockHeader");function xa(e){return e[e.length-1]===`
154
- `?e.slice(0,-1):e}g(xa,"dropEndingNewline");function Ku(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
155
- `);return c=c!==-1?c:e.length,r.lastIndex=c,Ca(e.slice(0,c),t)})(),s=e[0]===`
153
+ `}g(xa,"blockHeader");function Ca(e){return e[e.length-1]===`
154
+ `?e.slice(0,-1):e}g(Ca,"dropEndingNewline");function Qu(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
155
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,ba(e.slice(0,c),t)})(),s=e[0]===`
156
156
  `||e[0]===" ",o,a;a=r.exec(e);){var n=a[1],l=a[2];o=l[0]===" ",i+=n+(!s&&!o&&l!==""?`
157
- `:"")+Ca(l,t),s=o}return i}g(Ku,"foldString");function Ca(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(o=a>s?a:n,l+=`
157
+ `:"")+ba(l,t),s=o}return i}g(Qu,"foldString");function ba(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(o=a>s?a:n,l+=`
158
158
  `+e.slice(s,o),s=o+1),a=n;return l+=`
159
159
  `,e.length-s>t&&a>s?l+=e.slice(s,a)+`
160
- `+e.slice(a+1):l+=e.slice(s),l.slice(1)}g(Ca,"foldLine");function Qu(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=yr(e,s),i=Rt[r],!i&&Wr(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||zu(r);return t}g(Qu,"escapeString");function Ju(e,t,r){var i="",s=e.tag,o,a,n;for(o=0,a=r.length;o<a;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(pe(e,t,n,!1,!1)||typeof n>"u"&&pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(Ju,"writeFlowSequence");function ba(e,t,r,i){var s="",o=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&pe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Ps(e,t)),e.dump&&_i===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}g(ba,"writeBlockSequence");function tf(e,t,r){var i="",s=e.tag,o=Object.keys(r),a,n,l,c,h;for(a=0,n=o.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=o[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),pe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),pe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}g(tf,"writeFlowMapping");function ef(e,t,r,i){var s="",o=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Ht("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=Ps(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),pe(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&_i===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=Ps(e,t)),pe(e,t+1,h,!0,d)&&(e.dump&&_i===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=o,e.dump=s||"{}"}g(ef,"writeBlockMapping");function ka(e,t,r){var i,s,o,a,n,l;for(s=r?e.explicitTypes:e.implicitTypes,o=0,a=s.length;o<a;o+=1)if(n=s[o],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,$u.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Iu.call(n.represent,l))i=n.represent[l](t,l);else throw new Ht("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(ka,"detectType");function pe(e,t,r,i,s,o,a){e.tag=null,e.dump=r,ka(e,r,!1)||ka(e,r,!0);var n=$u.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(ef(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(tf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?ba(e,t-1,e.dump,s):ba(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(Ju(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Zu(e,e.dump,t,o,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ht("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}g(pe,"writeNode");function rf(e,t){var r=[],i=[],s,o;for(Os(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}g(rf,"getDuplicateReferences");function Os(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)Os(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)Os(e[i[s]],t,r)}g(Os,"inspectNode");function T2(e,t){t=t||{};var r=new Wu(t);r.noRefs||rf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),pe(r,0,i,!0,!0)?r.dump+`
161
- `:""}g(T2,"dump$1");function B2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(B2,"renamed");var sf=Xd,of=o2.load;var _2=g(e=>{const{handDrawnSeed:t}=gt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Gr=g(e=>{const t=L2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),L2=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),_n=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),et=g(e=>{const{stylesArray:t}=Gr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];_n(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),J=g((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=gt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Gr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:F2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),F2=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Xi={},Tt={},Yl;function M2(){return Yl||(Yl=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.BLANK_URL=Tt.relativeFirstCharacters=Tt.whitespaceEscapeCharsRegex=Tt.urlSchemeRegex=Tt.ctrlCharactersRegex=Tt.htmlCtrlEntityRegex=Tt.htmlEntitiesRegex=Tt.invalidProtocolRegex=void 0,Tt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Tt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Tt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Tt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Tt.urlSchemeRegex=/^.+(:|&colon;)/gim,Tt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Tt.relativeFirstCharacters=[".","/"],Tt.BLANK_URL="about:blank"),Tt}var Ul;function A2(){if(Ul)return Xi;Ul=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.sanitizeUrl=o;var e=M2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.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(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var p=new URL(u);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return u}return Xi}var af=A2();function Fo(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function E2(){}function nf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function oo(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const lf="[object RegExp]",Ln="[object String]",Fn="[object Number]",Mn="[object Boolean]",An="[object Arguments]",hf="[object Symbol]",cf="[object Date]",df="[object Map]",uf="[object Set]",ff="[object Array]",gf="[object ArrayBuffer]",pf="[object Object]",mf="[object DataView]",yf="[object Uint8Array]",xf="[object Uint8ClampedArray]",Cf="[object Uint16Array]",bf="[object Uint32Array]",kf="[object Int8Array]",wf="[object Int16Array]",vf="[object Int32Array]",Sf="[object Float32Array]",Tf="[object Float64Array]",Xl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function En(e){return typeof Xl.Buffer<"u"&&Xl.Buffer.isBuffer(e)}function $2(e){return Number.isSafeInteger(e)&&e>=0}function Bf(e){return e!=null&&typeof e!="function"&&$2(e.length)}function I2(e){return e==="__proto__"}function ao(e){return e==null||typeof e!="object"&&typeof e!="function"}function $n(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function P2(e,t){return xr(e,void 0,e,new Map,t)}function xr(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(ao(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=xr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,xr(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(xr(n,void 0,r,i,s));return a}if(En(e))return e.subarray();if($n(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=xr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),te(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),te(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,te(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(typeof e=="object"&&O2(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),te(a,e,r,i,s),a}return e}function te(e,t,r=e,i,s){const o=[...Object.keys(t),...nf(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=xr(t[n],n,r,i,s))}}function O2(e){switch(oo(e)){case An:case ff:case gf:case mf:case Mn:case cf:case Sf:case Tf:case kf:case wf:case vf:case df:case Fn:case pf:case lf:case uf:case Ln:case hf:case yf:case xf:case Cf:case bf:return!0;default:return!1}}function R2(e,t){return P2(e,(r,i,s,o)=>{if(typeof e=="object"){if(oo(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),te(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Fn:case Ln:case Mn:{const a=new e.constructor(e?.valueOf());return te(a,e),a}case An:{const a={};return te(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Gl(e){return R2(e)}function wa(e){return e!==null&&typeof e=="object"&&oo(e)==="[object Arguments]"}function va(e){return typeof e=="object"&&e!==null}function D2(e){return va(e)&&Bf(e)}function Oi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(Oi.Cache||Map),r}Oi.Cache=Map;function Ci(e){return $n(e)}function N2(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function q2(e){if(ao(e))return e;if(Array.isArray(e)||$n(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 z2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=cs(s,a,i,new Map)}return s}function cs(e,t,r,i){if(ao(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return q2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...nf(t)];for(let o=0;o<s.length;o++){const a=s[o];if(I2(a))continue;let n=t[a],l=e[a];if(wa(n)&&(n={...n}),wa(l)&&(l={...l}),En(n)&&(n=Gl(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const u=d[f];h[u]=l[u]}l=h}else if(D2(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||va(l)&&va(n)&&(Fo(l)||Fo(n)||Ci(l)||Ci(n))?e[a]=cs(l,n,r,i):l==null&&Fo(n)?e[a]=cs({},n,r,i):l==null&&Ci(n)?e[a]=Gl(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function W2(e,...t){return z2(e,...t,E2)}function Vl(e){if(e==null)return!0;if(Bf(e))return typeof e.splice!="function"&&typeof e!="string"&&!En(e)&&!Ci(e)&&!wa(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return N2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var _f="​",j2={curveBasis:Ls,curveBasisClosed:g1,curveBasisOpen:p1,curveBumpX:ed,curveBumpY:rd,curveBundle:m1,curveCardinalClosed:y1,curveCardinalOpen:x1,curveCardinal:ad,curveCatmullRomClosed:C1,curveCatmullRomOpen:b1,curveCatmullRom:ld,curveLinear:xi,curveLinearClosed:k1,curveMonotoneX:gd,curveMonotoneY:pd,curveNatural:yd,curveStep:xd,curveStepAfter:bd,curveStepBefore:Cd},H2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Y2=g(function(e,t){const r=Lf(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);ms(a),i=vt(i,[...a])}else i=r.args;if(!i)return;let s=Qa(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Lf=g(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${H2.source})(?=[}][%]{2}).*
162
- `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),Y.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=yi.exec(e))!==null;)if(i.index===yi.lastIndex&&yi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return Y.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),U2=g(function(e){return e.replace(yi,"")},"removeDirectives"),X2=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function In(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return j2[r]??t}g(In,"interpolateToCurve");function Ff(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?af.sanitizeUrl(r):r}g(Ff,"formatUrl");var G2=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){Y.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Pn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(Pn,"distance");function Mf(e){let t,r=0;e.forEach(s=>{r+=Pn(s,t),t=s});const i=r/2;return On(e,i)}g(Mf,"traverseEdge");function Af(e){return e.length===1?e[0]:Mf(e)}g(Af,"calcLabelPosition");var Zl=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),On=g((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Pn(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Zl((1-a)*r.x+a*s.x,5),y:Zl((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),V2=g((e,t,r)=>{Y.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=On(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Ef(e,t,r){const i=structuredClone(r);Y.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=On(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}g(Ef,"calcTerminalLabelPosition");function Rn(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(Rn,"getStylesFromArray");var Kl=0,$f=g(()=>(Kl++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Kl),"generateId");function If(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(If,"makeRandomHex");var Pf=g(e=>If(e.length),"random"),Z2=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),K2=g(function(e,t){const r=t.text.replace(Ur.lineBreakRegex," "),[,i]=Ri(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),Of=Oi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ur.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=me(`${a} `,r),c=me(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:u}=Q2(a,t,"-",r);s.push(o,...f),o=u}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Q2=Oi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(me(c,i)>=t){const d=l+1,f=s.length===d,u=`${c}${r}`;o.push(f?c:u),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Dn(e,t){return no(e,t).height}g(Dn,"calculateTextHeight");function me(e,t){return no(e,t).width}g(me,"calculateTextWidth");var no=Oi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Ri(r),a=["sans-serif",i],n=e.split(Ur.lineBreakRegex),l=[],c=ct("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let u=0;const p={width:0,height:0,lineHeight:0};for(const m of n){const y=Z2();y.text=m||_f;const x=K2(h,y).style("font-size",o).style("font-weight",s).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),u=Math.round(b.height),p.height+=u,p.lineHeight=Math.round(Math.max(p.lineHeight,u))}l.push(p)}h.remove();const d=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[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Pr,J2=(Pr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Pr,"InitIDGenerator"),Pr),Gi,tw=g(function(e){return Gi=Gi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Gi.innerHTML=e,unescape(Gi.textContent)},"entityDecode");function Nn(e){return"str"in e}g(Nn,"isDetailedError");var ew=g((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ri=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function lo(e,t){return W2({},e,t)}g(lo,"cleanAndMerge");var Zt={assignWithDepth:vt,wrapLabel:Of,calculateTextHeight:Dn,calculateTextWidth:me,calculateTextDimensions:no,cleanAndMerge:lo,detectInit:Y2,detectDirective:Lf,isSubstringInArray:X2,interpolateToCurve:In,calcLabelPosition:Af,calcCardinalityPosition:V2,calcTerminalLabelPosition:Ef,formatUrl:Ff,getStylesFromArray:Rn,generateId:$f,random:Pf,runFunc:G2,entityDecode:tw,insertTitle:ew,isLabelCoordinateInPath:Rf,parseFontSize:Ri,InitIDGenerator:J2},rw=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),De=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),iw=g((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ft(e){return e??null}g(Ft,"handleUndefinedAttr");function Rf(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(Rf,"isLabelCoordinateInPath");var ho=g(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function qn(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(o=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=gt().fontSize?gt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Ka.fontSize]=Ri(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";o(s)}g(a,"setupImage"),setTimeout(()=>{s.complete&&a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}g(qn,"configureLabelImages");const sw=Object.freeze({left:0,top:0,width:16,height:16}),Rs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Df=Object.freeze({...sw,...Rs}),ow=Object.freeze({...Df,body:"",hidden:!1}),aw=Object.freeze({width:null,height:null}),nw=Object.freeze({...aw,...Rs}),lw=(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 Mo(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Mo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Mo(n,r)?n:null}return null},Mo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function hw(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 Ql(e,t){const r=hw(e,t);for(const i in ow)i in Rs?i in e&&!(i in r)&&(r[i]=Rs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function cw(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function Jl(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Ql(i[n]||s[n],o)}return a(t),r.forEach(a),Ql(e,o)}function dw(e,t){if(e.icons[t])return Jl(e,t,[]);const r=cw(e,[t])[t];return r?Jl(e,t,r):null}const uw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function th(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(uw);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=fw.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function gw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function pw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function mw(e,t,r){const i=gw(e);return pw(i.defs,t+i.content+r)}const yw=e=>e==="unset"||e==="undefined"||e==="none";function xw(e,t){const r={...Df,...e},i={...nw,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=s.height/2+s.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:v=s.width/2+s.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(s.left!==s.top&&(v=s.left,s.left=s.top,s.top=v),s.width!==s.height&&(v=s.width,s.width=s.height,s.height=v)),y.length&&(o=mw(o,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=th(d,l/c)):(h=a==="auto"?l:a,d=n===null?th(h,c/l):n==="auto"?c:n);const f={},u=(m,y)=>{yw(y)||(f[m]=y.toString())};u("width",h),u("height",d);const p=[s.left,s.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:o}}const Cw=/\sid="(\S+)"/g,eh=new Map;function bw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=eh.get(e)||0;return eh.set(e,t+1),t?`${e}${t}`:e}function kw(e){const t=[];let r;for(;r=Cw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=bw(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function ww(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 Nf={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},Sa=new Map,qf=new Map,zf=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Y.debug("Registering icon pack:",t.name),"loader"in t)qf.set(t.name,t.loader);else if("icons"in t)Sa.set(t.name,t.icons);else throw Y.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Wf=g(async(e,t)=>{const r=lw(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=Sa.get(i);if(!s){const a=qf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Sa.set(i,s)}catch(n){throw Y.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=dw(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),vw=g(async e=>{try{return await Wf(e),!0}catch{return!1}},"isIconAvailable"),Vr=g(async(e,t,r)=>{let i;try{i=await Wf(e,t?.fallbackPrefix)}catch(a){Y.error(a),i=Nf}const s=xw(i,t),o=ww(kw(s.body),{...s.attributes,...r});return Kt(o,Ct())},"getIconSVG");function zn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var lr=zn();function jf(e){lr=e}var bi={exec:()=>null};function mt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(qt.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var Sw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),qt={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")},Tw=/^(?:[ \t]*(?:\n|$))+/,Bw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_w=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Lw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wn=/(?:[*+-]|\d{1,9}[.)])/,Hf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yf=mt(Hf).replace(/bull/g,Wn).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(),Fw=mt(Hf).replace(/bull/g,Wn).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(),jn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mw=/^[^\n]+/,Hn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Aw=mt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ew=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wn).getRegex(),co="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",Yn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$w=mt("^ {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",Yn).replace("tag",co).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Uf=mt(jn).replace("hr",Di).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",co).getRegex(),Iw=mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Uf).getRegex(),Un={blockquote:Iw,code:Bw,def:Aw,fences:_w,heading:Lw,hr:Di,html:$w,lheading:Yf,list:Ew,newline:Tw,paragraph:Uf,table:bi,text:Mw},rh=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Di).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",co).getRegex(),Pw={...Un,lheading:Fw,table:rh,paragraph:mt(jn).replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rh).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",co).getRegex()},Ow={...Un,html:mt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yn).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:bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(jn).replace("hr",Di).replace("heading",` *#{1,6} *[^
163
- ]`).replace("lheading",Yf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Dw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xf=/^( {2,}|\\)\n(?!\s*$)/,Nw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,uo=/[\p{P}\p{S}]/u,Xn=/[\s\p{P}\p{S}]/u,Gf=/[^\s\p{P}\p{S}]/u,qw=mt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xn).getRegex(),Vf=/(?!~)[\p{P}\p{S}]/u,zw=/(?!~)[\s\p{P}\p{S}]/u,Ww=/(?:[^\s\p{P}\p{S}]|~)/u,jw=mt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Sw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Zf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Hw=mt(Zf,"u").replace(/punct/g,uo).getRegex(),Yw=mt(Zf,"u").replace(/punct/g,Vf).getRegex(),Kf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Uw=mt(Kf,"gu").replace(/notPunctSpace/g,Gf).replace(/punctSpace/g,Xn).replace(/punct/g,uo).getRegex(),Xw=mt(Kf,"gu").replace(/notPunctSpace/g,Ww).replace(/punctSpace/g,zw).replace(/punct/g,Vf).getRegex(),Gw=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Gf).replace(/punctSpace/g,Xn).replace(/punct/g,uo).getRegex(),Vw=mt(/\\(punct)/,"gu").replace(/punct/g,uo).getRegex(),Zw=mt(/^<(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(),Kw=mt(Yn).replace("(?:-->|$)","-->").getRegex(),Qw=mt("^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",Kw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Jw=mt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qf=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ds).replace("ref",Hn).getRegex(),Jf=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hn).getRegex(),tv=mt("reflink|nolink(?!\\()","g").replace("reflink",Qf).replace("nolink",Jf).getRegex(),ih=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gn={_backpedal:bi,anyPunctuation:Vw,autolink:Zw,blockSkip:jw,br:Xf,code:Dw,del:bi,emStrongLDelim:Hw,emStrongRDelimAst:Uw,emStrongRDelimUnd:Gw,escape:Rw,link:Jw,nolink:Jf,punctuation:qw,reflink:Qf,reflinkSearch:tv,tag:Qw,text:Nw,url:bi},ev={...Gn,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ds).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ds).getRegex()},Ta={...Gn,emStrongRDelimAst:Xw,emStrongLDelim:Yw,url:mt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ih).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:mt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ih).getRegex()},rv={...Ta,br:mt(Xf).replace("{2,}","*").getRegex(),text:mt(Ta.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Vi={normal:Un,gfm:Pw,pedantic:Ow},ei={normal:Gn,gfm:Ta,breaks:rv,pedantic:ev},iv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sh=e=>iv[e];function ce(e,t){if(t){if(qt.escapeTest.test(e))return e.replace(qt.escapeReplace,sh)}else if(qt.escapeTestNoEncode.test(e))return e.replace(qt.escapeReplaceNoEncode,sh);return e}function oh(e){try{e=encodeURI(e).replace(qt.percentDecode,"%")}catch{return null}return e}function ah(e,t){let r=e.replace(qt.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(qt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(qt.slashPipe,"|");return i}function ri(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 sv(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 nh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function ov(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
160
+ `+e.slice(a+1):l+=e.slice(s),l.slice(1)}g(ba,"foldLine");function Ju(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=yr(e,s),i=Rt[r],!i&&Wr(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||Wu(r);return t}g(Ju,"escapeString");function tf(e,t,r){var i="",s=e.tag,o,a,n;for(o=0,a=r.length;o<a;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(pe(e,t,n,!1,!1)||typeof n>"u"&&pe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(tf,"writeFlowSequence");function ka(e,t,r,i){var s="",o=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(pe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&pe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=Is(e,t)),e.dump&&_i===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}g(ka,"writeBlockSequence");function ef(e,t,r){var i="",s=e.tag,o=Object.keys(r),a,n,l,c,h;for(a=0,n=o.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=o[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),pe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),pe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}g(ef,"writeFlowMapping");function rf(e,t,r,i){var s="",o=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Ht("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=Is(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),pe(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&_i===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=Is(e,t)),pe(e,t+1,h,!0,d)&&(e.dump&&_i===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=o,e.dump=s||"{}"}g(rf,"writeBlockMapping");function wa(e,t,r){var i,s,o,a,n,l;for(s=r?e.explicitTypes:e.implicitTypes,o=0,a=s.length;o<a;o+=1)if(n=s[o],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,Pu.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(Iu.call(n.represent,l))i=n.represent[l](t,l);else throw new Ht("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(wa,"detectType");function pe(e,t,r,i,s,o,a){e.tag=null,e.dump=r,wa(e,r,!1)||wa(e,r,!0);var n=Pu.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(rf(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(ef(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?ka(e,t-1,e.dump,s):ka(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(tf(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&Ku(e,e.dump,t,o,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ht("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}g(pe,"writeNode");function sf(e,t){var r=[],i=[],s,o;for(Os(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}g(sf,"getDuplicateReferences");function Os(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)Os(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)Os(e[i[s]],t,r)}g(Os,"inspectNode");function B2(e,t){t=t||{};var r=new ju(t);r.noRefs||sf(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),pe(r,0,i,!0,!0)?r.dump+`
161
+ `:""}g(B2,"dump$1");function _2(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(_2,"renamed");var of=Gd,af=a2.load;var L2=g(e=>{const{handDrawnSeed:t}=gt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Gr=g(e=>{const t=F2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),F2=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),Ln=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),et=g(e=>{const{stylesArray:t}=Gr(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Ln(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),J=g((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=gt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Gr(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:M2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),M2=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Xi={},Bt={},Ul;function A2(){return Ul||(Ul=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.BLANK_URL=Bt.relativeFirstCharacters=Bt.whitespaceEscapeCharsRegex=Bt.urlSchemeRegex=Bt.ctrlCharactersRegex=Bt.htmlCtrlEntityRegex=Bt.htmlEntitiesRegex=Bt.invalidProtocolRegex=void 0,Bt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Bt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Bt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Bt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Bt.urlSchemeRegex=/^.+(:|&colon;)/gim,Bt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Bt.relativeFirstCharacters=[".","/"],Bt.BLANK_URL="about:blank"),Bt}var Xl;function E2(){if(Xl)return Xi;Xl=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.sanitizeUrl=o;var e=A2();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.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(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var p=new URL(u);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return u}return Xi}var nf=E2();function Mo(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function $2(){}function lf(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function oo(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const hf="[object RegExp]",Fn="[object String]",Mn="[object Number]",An="[object Boolean]",En="[object Arguments]",cf="[object Symbol]",df="[object Date]",uf="[object Map]",ff="[object Set]",gf="[object Array]",pf="[object ArrayBuffer]",mf="[object Object]",yf="[object DataView]",xf="[object Uint8Array]",Cf="[object Uint8ClampedArray]",bf="[object Uint16Array]",kf="[object Uint32Array]",wf="[object Int8Array]",vf="[object Int16Array]",Sf="[object Int32Array]",Tf="[object Float32Array]",Bf="[object Float64Array]",Gl=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function $n(e){return typeof Gl.Buffer<"u"&&Gl.Buffer.isBuffer(e)}function P2(e){return Number.isSafeInteger(e)&&e>=0}function _f(e){return e!=null&&typeof e!="function"&&P2(e.length)}function I2(e){return e==="__proto__"}function ao(e){return e==null||typeof e!="object"&&typeof e!="function"}function Pn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function O2(e,t){return xr(e,void 0,e,new Map,t)}function xr(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(ao(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=xr(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,xr(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(xr(n,void 0,r,i,s));return a}if($n(e))return e.subarray();if(Pn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=xr(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),te(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),te(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,te(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),te(a,e,r,i,s),a}if(typeof e=="object"&&R2(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),te(a,e,r,i,s),a}return e}function te(e,t,r=e,i,s){const o=[...Object.keys(t),...lf(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=xr(t[n],n,r,i,s))}}function R2(e){switch(oo(e)){case En:case gf:case pf:case yf:case An:case df:case Tf:case Bf:case wf:case vf:case Sf:case uf:case Mn:case mf:case hf:case ff:case Fn:case cf:case xf:case Cf:case bf:case kf:return!0;default:return!1}}function D2(e,t){return O2(e,(r,i,s,o)=>{if(typeof e=="object"){if(oo(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),te(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Mn:case Fn:case An:{const a=new e.constructor(e?.valueOf());return te(a,e),a}case En:{const a={};return te(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Vl(e){return D2(e)}function va(e){return e!==null&&typeof e=="object"&&oo(e)==="[object Arguments]"}function Sa(e){return typeof e=="object"&&e!==null}function N2(e){return Sa(e)&&_f(e)}function Oi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(Oi.Cache||Map),r}Oi.Cache=Map;function Ci(e){return Pn(e)}function q2(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function z2(e){if(ao(e))return e;if(Array.isArray(e)||Pn(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 W2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=cs(s,a,i,new Map)}return s}function cs(e,t,r,i){if(ao(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return z2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...lf(t)];for(let o=0;o<s.length;o++){const a=s[o];if(I2(a))continue;let n=t[a],l=e[a];if(va(n)&&(n={...n}),va(l)&&(l={...l}),$n(n)&&(n=Vl(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const u=d[f];h[u]=l[u]}l=h}else if(N2(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||Sa(l)&&Sa(n)&&(Mo(l)||Mo(n)||Ci(l)||Ci(n))?e[a]=cs(l,n,r,i):l==null&&Mo(n)?e[a]=cs({},n,r,i):l==null&&Ci(n)?e[a]=Vl(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function j2(e,...t){return W2(e,...t,$2)}function Zl(e){if(e==null)return!0;if(_f(e))return typeof e.splice!="function"&&typeof e!="string"&&!$n(e)&&!Ci(e)&&!va(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return q2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Lf="​",H2={curveBasis:Ls,curveBasisClosed:p1,curveBasisOpen:m1,curveBumpX:rd,curveBumpY:id,curveBundle:y1,curveCardinalClosed:x1,curveCardinalOpen:C1,curveCardinal:nd,curveCatmullRomClosed:b1,curveCatmullRomOpen:k1,curveCatmullRom:hd,curveLinear:xi,curveLinearClosed:w1,curveMonotoneX:pd,curveMonotoneY:md,curveNatural:xd,curveStep:Cd,curveStepAfter:kd,curveStepBefore:bd},Y2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,U2=g(function(e,t){const r=Ff(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);ms(a),i=St(i,[...a])}else i=r.args;if(!i)return;let s=Ja(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Ff=g(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${Y2.source})(?=[}][%]{2}).*
162
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),U.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=yi.exec(e))!==null;)if(i.index===yi.lastIndex&&yi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return U.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),X2=g(function(e){return e.replace(yi,"")},"removeDirectives"),G2=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function In(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return H2[r]??t}g(In,"interpolateToCurve");function Mf(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?nf.sanitizeUrl(r):r}g(Mf,"formatUrl");var V2=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){U.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function On(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(On,"distance");function Af(e){let t,r=0;e.forEach(s=>{r+=On(s,t),t=s});const i=r/2;return Rn(e,i)}g(Af,"traverseEdge");function Ef(e){return e.length===1?e[0]:Af(e)}g(Ef,"calcLabelPosition");var Kl=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Rn=g((e,t)=>{let r,i=t;for(const s of e){if(r){const o=On(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Kl((1-a)*r.x+a*s.x,5),y:Kl((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Z2=g((e,t,r)=>{U.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Rn(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function $f(e,t,r){const i=structuredClone(r);U.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Rn(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}g($f,"calcTerminalLabelPosition");function Dn(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(Dn,"getStylesFromArray");var Ql=0,Pf=g(()=>(Ql++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ql),"generateId");function If(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(If,"makeRandomHex");var Of=g(e=>If(e.length),"random"),K2=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Q2=g(function(e,t){const r=t.text.replace(Ur.lineBreakRegex," "),[,i]=Ri(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),Rf=Oi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ur.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=me(`${a} `,r),c=me(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:u}=J2(a,t,"-",r);s.push(o,...f),o=u}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),J2=Oi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(me(c,i)>=t){const d=l+1,f=s.length===d,u=`${c}${r}`;o.push(f?c:u),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Nn(e,t){return no(e,t).height}g(Nn,"calculateTextHeight");function me(e,t){return no(e,t).width}g(me,"calculateTextWidth");var no=Oi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=Ri(r),a=["sans-serif",i],n=e.split(Ur.lineBreakRegex),l=[],c=dt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let u=0;const p={width:0,height:0,lineHeight:0};for(const m of n){const y=K2();y.text=m||Lf;const x=Q2(h,y).style("font-size",o).style("font-weight",s).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),u=Math.round(b.height),p.height+=u,p.lineHeight=Math.round(Math.max(p.lineHeight,u))}l.push(p)}h.remove();const d=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[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ir,tw=(Ir=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(Ir,"InitIDGenerator"),Ir),Gi,ew=g(function(e){return Gi=Gi||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Gi.innerHTML=e,unescape(Gi.textContent)},"entityDecode");function qn(e){return"str"in e}g(qn,"isDetailedError");var rw=g((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ri=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function lo(e,t){return j2({},e,t)}g(lo,"cleanAndMerge");var Zt={assignWithDepth:St,wrapLabel:Rf,calculateTextHeight:Nn,calculateTextWidth:me,calculateTextDimensions:no,cleanAndMerge:lo,detectInit:U2,detectDirective:Ff,isSubstringInArray:G2,interpolateToCurve:In,calcLabelPosition:Ef,calcCardinalityPosition:Z2,calcTerminalLabelPosition:$f,formatUrl:Mf,getStylesFromArray:Dn,generateId:Pf,random:Of,runFunc:V2,entityDecode:ew,insertTitle:rw,isLabelCoordinateInPath:Df,parseFontSize:Ri,InitIDGenerator:tw},iw=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Ne=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),sw=g((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ft(e){return e??null}g(Ft,"handleUndefinedAttr");function Df(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(Df,"isLabelCoordinateInPath");var ho=g(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function zn(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(o=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=gt().fontSize?gt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Qa.fontSize]=Ri(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";o(s)}g(a,"setupImage"),setTimeout(()=>{s.complete&&a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}g(zn,"configureLabelImages");const ow=Object.freeze({left:0,top:0,width:16,height:16}),Rs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nf=Object.freeze({...ow,...Rs}),aw=Object.freeze({...Nf,body:"",hidden:!1}),nw=Object.freeze({width:null,height:null}),lw=Object.freeze({...nw,...Rs}),hw=(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 o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Ao(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Ao(n,r)?n:null}return null},Ao=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function cw(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 Jl(e,t){const r=cw(e,t);for(const i in aw)i in Rs?i in e&&!(i in r)&&(r[i]=Rs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function dw(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function th(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Jl(i[n]||s[n],o)}return a(t),r.forEach(a),Jl(e,o)}function uw(e,t){if(e.icons[t])return th(e,t,[]);const r=dw(e,[t])[t];return r?th(e,t,r):null}const fw=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gw=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function eh(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(fw);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=gw.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function pw(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function mw(e,t){return e?"<defs>"+e+"</defs>"+t:t}function yw(e,t,r){const i=pw(e);return mw(i.defs,t+i.content+r)}const xw=e=>e==="unset"||e==="undefined"||e==="none";function Cw(e,t){const r={...Nf,...e},i={...lw,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let k=m.rotate;x?b?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):b&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=s.height/2+s.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:v=s.width/2+s.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(s.left!==s.top&&(v=s.left,s.left=s.top,s.top=v),s.width!==s.height&&(v=s.width,s.width=s.height,s.height=v)),y.length&&(o=yw(o,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=eh(d,l/c)):(h=a==="auto"?l:a,d=n===null?eh(h,c/l):n==="auto"?c:n);const f={},u=(m,y)=>{xw(y)||(f[m]=y.toString())};u("width",h),u("height",d);const p=[s.left,s.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:o}}const bw=/\sid="(\S+)"/g,rh=new Map;function kw(e){e=e.replace(/[0-9]+$/,"")||"a";const t=rh.get(e)||0;return rh.set(e,t+1),t?`${e}${t}`:e}function ww(e){const t=[];let r;for(;r=bw.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=kw(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function vw(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 qf={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},Ta=new Map,zf=new Map,Wf=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(U.debug("Registering icon pack:",t.name),"loader"in t)zf.set(t.name,t.loader);else if("icons"in t)Ta.set(t.name,t.icons);else throw U.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),jf=g(async(e,t)=>{const r=hw(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=Ta.get(i);if(!s){const a=zf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Ta.set(i,s)}catch(n){throw U.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=uw(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Sw=g(async e=>{try{return await jf(e),!0}catch{return!1}},"isIconAvailable"),Vr=g(async(e,t,r)=>{let i;try{i=await jf(e,t?.fallbackPrefix)}catch(a){U.error(a),i=qf}const s=Cw(i,t),o=vw(ww(s.body),{...s.attributes,...r});return Kt(o,Ct())},"getIconSVG");function Wn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var lr=Wn();function Hf(e){lr=e}var bi={exec:()=>null};function pt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(zt.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var Tw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),zt={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")},Bw=/^(?:[ \t]*(?:\n|$))+/,_w=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lw=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jn=/(?:[*+-]|\d{1,9}[.)])/,Yf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Uf=pt(Yf).replace(/bull/g,jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Mw=pt(Yf).replace(/bull/g,jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Hn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Aw=/^[^\n]+/,Yn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ew=pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$w=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jn).getRegex(),co="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",Un=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pw=pt("^ {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",Un).replace("tag",co).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xf=pt(Hn).replace("hr",Di).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",co).getRegex(),Iw=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xf).getRegex(),Xn={blockquote:Iw,code:_w,def:Ew,fences:Lw,heading:Fw,hr:Di,html:Pw,lheading:Uf,list:$w,newline:Bw,paragraph:Xf,table:bi,text:Aw},ih=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Di).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",co).getRegex(),Ow={...Xn,lheading:Mw,table:ih,paragraph:pt(Hn).replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ih).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",co).getRegex()},Rw={...Xn,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Un).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:bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(Hn).replace("hr",Di).replace("heading",` *#{1,6} *[^
163
+ ]`).replace("lheading",Uf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gf=/^( {2,}|\\)\n(?!\s*$)/,qw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,uo=/[\p{P}\p{S}]/u,Gn=/[\s\p{P}\p{S}]/u,Vf=/[^\s\p{P}\p{S}]/u,zw=pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gn).getRegex(),Zf=/(?!~)[\p{P}\p{S}]/u,Ww=/(?!~)[\s\p{P}\p{S}]/u,jw=/(?:[^\s\p{P}\p{S}]|~)/u,Hw=pt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Tw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Kf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Yw=pt(Kf,"u").replace(/punct/g,uo).getRegex(),Uw=pt(Kf,"u").replace(/punct/g,Zf).getRegex(),Qf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xw=pt(Qf,"gu").replace(/notPunctSpace/g,Vf).replace(/punctSpace/g,Gn).replace(/punct/g,uo).getRegex(),Gw=pt(Qf,"gu").replace(/notPunctSpace/g,jw).replace(/punctSpace/g,Ww).replace(/punct/g,Zf).getRegex(),Vw=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Vf).replace(/punctSpace/g,Gn).replace(/punct/g,uo).getRegex(),Zw=pt(/\\(punct)/,"gu").replace(/punct/g,uo).getRegex(),Kw=pt(/^<(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(),Qw=pt(Un).replace("(?:-->|$)","-->").getRegex(),Jw=pt("^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",Qw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ds=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,tv=pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ds).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Jf=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ds).replace("ref",Yn).getRegex(),tg=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yn).getRegex(),ev=pt("reflink|nolink(?!\\()","g").replace("reflink",Jf).replace("nolink",tg).getRegex(),sh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Vn={_backpedal:bi,anyPunctuation:Zw,autolink:Kw,blockSkip:Hw,br:Gf,code:Nw,del:bi,emStrongLDelim:Yw,emStrongRDelimAst:Xw,emStrongRDelimUnd:Vw,escape:Dw,link:tv,nolink:tg,punctuation:zw,reflink:Jf,reflinkSearch:ev,tag:Jw,text:qw,url:bi},rv={...Vn,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ds).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ds).getRegex()},Ba={...Vn,emStrongRDelimAst:Gw,emStrongLDelim:Uw,url:pt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",sh).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:pt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",sh).getRegex()},iv={...Ba,br:pt(Gf).replace("{2,}","*").getRegex(),text:pt(Ba.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Vi={normal:Xn,gfm:Ow,pedantic:Rw},ei={normal:Vn,gfm:Ba,breaks:iv,pedantic:rv},sv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},oh=e=>sv[e];function ce(e,t){if(t){if(zt.escapeTest.test(e))return e.replace(zt.escapeReplace,oh)}else if(zt.escapeTestNoEncode.test(e))return e.replace(zt.escapeReplaceNoEncode,oh);return e}function ah(e){try{e=encodeURI(e).replace(zt.percentDecode,"%")}catch{return null}return e}function nh(e,t){let r=e.replace(zt.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(zt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(zt.slashPipe,"|");return i}function ri(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 ov(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 lh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function av(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
164
164
  `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
165
165
  `)}var Ns=class{options;rules;lexer;constructor(t){this.options=t||lr}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:ri(i,`
166
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=ov(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=ri(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:ri(r[0],`
166
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=av(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=ri(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:ri(r[0],`
167
167
  `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=ri(r[0],`
168
168
  `).split(`
169
169
  `),s="",o="",a=[];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(`
@@ -182,10 +182,10 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
182
182
  `,1)[0],T;if(u=F,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),T=u):T=u.replace(this.rules.other.tabCharGlobal," "),v.test(u)||S.test(u)||_.test(u)||b.test(u)||k.test(u))break;if(T.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
183
183
  `+T.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||S.test(f)||k.test(f))break;d+=`
184
184
  `+u}!p&&!u.trim()&&(p=!0),h+=F+`
185
- `,t=t.substring(F.length+1),f=T.slice(m)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=ah(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
186
- `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(ah(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
187
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=ri(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=sv(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),nh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return nh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,f=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ee=class Ba{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||lr,this.options.tokenizer=this.options.tokenizer||new Ns,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:qt,block:Vi.normal,inline:ei.normal};this.options.pedantic?(r.block=Vi.pedantic,r.inline=ei.pedantic):this.options.gfm&&(r.block=Vi.gfm,this.options.breaks?r.inline=ei.breaks:r.inline=ei.gfm),this.tokenizer.rules=r}static get rules(){return{block:Vi,inline:ei}}static lex(t,r){return new Ba(r).lex(t)}static lexInline(t,r){return new Ba(r).inlineTokens(t)}lex(t){t=t.replace(qt.carriageReturn,`
188
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(qt.tabCharGlobal," ").replace(qt.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
185
+ `,t=t.substring(F.length+1),f=T.slice(m)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=nh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
186
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(nh(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
187
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=ri(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=ov(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),lh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return lh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,f=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ee=class _a{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||lr,this.options.tokenizer=this.options.tokenizer||new Ns,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:zt,block:Vi.normal,inline:ei.normal};this.options.pedantic?(r.block=Vi.pedantic,r.inline=ei.pedantic):this.options.gfm&&(r.block=Vi.gfm,this.options.breaks?r.inline=ei.breaks:r.inline=ei.gfm),this.tokenizer.rules=r}static get rules(){return{block:Vi,inline:ei}}static lex(t,r){return new _a(r).lex(t)}static lexInline(t,r){return new _a(r).inlineTokens(t)}lex(t){t=t.replace(zt.carriageReturn,`
188
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(zt.tabCharGlobal," ").replace(zt.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
189
189
  `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
190
190
  `)?"":`
191
191
  `)+s.raw,a.text+=`
@@ -198,7 +198,7 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
198
198
  `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
199
199
  `)?"":`
200
200
  `)+s.raw,a.text+=`
201
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},qs=class{options;parser;constructor(t){this.options=t||lr}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(qt.notSpaceStart)?.[0],o=t.replace(qt.endingNewline,"")+`
201
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},qs=class{options;parser;constructor(t){this.options=t||lr}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(zt.notSpaceStart)?.[0],o=t.replace(zt.endingNewline,"")+`
202
202
  `;return s?'<pre><code class="language-'+ce(s)+'">'+(i?o:ce(o,!0))+`</code></pre>
203
203
  `:"<pre><code>"+(i?o:ce(o,!0))+`</code></pre>
204
204
  `}blockquote({tokens:t}){return`<blockquote>
@@ -216,28 +216,28 @@ ${this.parser.parse(t)}</blockquote>
216
216
  `}tablerow({text:t}){return`<tr>
217
217
  ${t}</tr>
218
218
  `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
219
- `}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>${ce(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=oh(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+ce(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=oh(t);if(o===null)return ce(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${ce(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ce(t.text)}},Vn=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""}},re=class _a{options;renderer;textRenderer;constructor(t){this.options=t||lr,this.options.renderer=this.options.renderer||new qs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vn}static parse(t,r){return new _a(r).parse(t)}static parseInline(t,r){return new _a(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
220
- `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},di=class{options;block;constructor(t){this.options=t||lr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ee.lex:ee.lexInline}provideParser(){return this.block?re.parse:re.parseInline}},av=class{defaults=zn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=re;Renderer=qs;TextRenderer=Vn;Lexer=ee;Tokenizer=Ns;Hooks=di;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new qs(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ns(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new di;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];di.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&di.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ee.lex(t,r??this.defaults)}parser(t,r){return re.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?ee.lex:ee.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?re.parse:re.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ee.lex:ee.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?re.parse:re.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
221
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ce(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ar=new av;function yt(e,t){return ar.parse(e,t)}yt.options=yt.setOptions=function(e){return ar.setOptions(e),yt.defaults=ar.defaults,jf(yt.defaults),yt};yt.getDefaults=zn;yt.defaults=lr;yt.use=function(...e){return ar.use(...e),yt.defaults=ar.defaults,jf(yt.defaults),yt};yt.walkTokens=function(e,t){return ar.walkTokens(e,t)};yt.parseInline=ar.parseInline;yt.Parser=re;yt.parser=re.parse;yt.Renderer=qs;yt.TextRenderer=Vn;yt.Lexer=ee;yt.lexer=ee.lex;yt.Tokenizer=Ns;yt.Hooks=di;yt.parse=yt;yt.options;yt.setOptions;yt.use;yt.walkTokens;yt.parseInline;re.parse;ee.lex;function tg(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 d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var o=new RegExp(`
219
+ `}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>${ce(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=ah(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+ce(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=ah(t);if(o===null)return ce(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${ce(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ce(t.text)}},Zn=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""}},re=class La{options;renderer;textRenderer;constructor(t){this.options=t||lr,this.options.renderer=this.options.renderer||new qs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zn}static parse(t,r){return new La(r).parse(t)}static parseInline(t,r){return new La(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
220
+ `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},di=class{options;block;constructor(t){this.options=t||lr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ee.lex:ee.lexInline}provideParser(){return this.block?re.parse:re.parseInline}},nv=class{defaults=Wn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=re;Renderer=qs;TextRenderer=Zn;Lexer=ee;Tokenizer=Ns;Hooks=di;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new qs(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ns(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new di;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];di.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&di.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ee.lex(t,r??this.defaults)}parser(t,r){return re.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?ee.lex:ee.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?re.parse:re.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ee.lex:ee.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?re.parse:re.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
221
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+ce(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},ar=new nv;function yt(e,t){return ar.parse(e,t)}yt.options=yt.setOptions=function(e){return ar.setOptions(e),yt.defaults=ar.defaults,Hf(yt.defaults),yt};yt.getDefaults=Wn;yt.defaults=lr;yt.use=function(...e){return ar.use(...e),yt.defaults=ar.defaults,Hf(yt.defaults),yt};yt.walkTokens=function(e,t){return ar.walkTokens(e,t)};yt.parseInline=ar.parseInline;yt.Parser=re;yt.parser=re.parse;yt.Renderer=qs;yt.TextRenderer=Zn;yt.Lexer=ee;yt.lexer=ee.lex;yt.Tokenizer=Ns;yt.Hooks=di;yt.parse=yt;yt.options;yt.setOptions;yt.use;yt.walkTokens;yt.parseInline;re.parse;ee.lex;function eg(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 d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var o=new RegExp(`
222
222
  [ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(o,`
223
223
  `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
224
224
  `)&&(d=String(n).split(`
225
225
  `).map(function(f,u){return u===0?f:""+h+f}).join(`
226
- `)),a+=d+i[l+1]}),a}function eg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
226
+ `)),a+=d+i[l+1]}),a}function rg(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
227
227
  `).replace(/\n{2,}/g,`
228
- `);return tg(i)}g(eg,"preprocessMarkdown");function rg(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}g(rg,"nonMarkdownToLines");function ig(e,t={}){const r=eg(e,t),i=yt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
229
- `).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[o].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return g(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}g(ig,"markdownToLines");function sg(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(sg,"nonMarkdownToHTML");function og(e,{markdownAutoWrap:t}={}){const r=yt.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(Y.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(og,"markdownToHTML");function ag(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(ag,"splitTextToChars");function ng(e,t){const r=ag(t.content);return Zn(e,[],r,t.type)}g(ng,"splitWordToFitWidth");function Zn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Zn(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Zn,"splitWordToFitWidthRecursion");function lg(e,t){if(e.some(({content:r})=>r.includes(`
230
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zs(e,t)}g(lg,"splitLineToFitWidth");function zs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return zs(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=ng(t,o);r.push([n]),l.content&&e.unshift(l)}return zs(e,t,r)}g(zs,"splitLineToFitWidthRecursion");function La(e,t){t&&e.attr("style",t)}g(La,"applyStyle");var lh=16384;async function hg(e,t,r,i,s=!1,o=Ct()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,lh)}px`),a.attr("height",`${Math.min(10*r,lh)}px`);const n=a.append("xhtml:div"),l=Rr(t.label)?await Ja(t.label.replace(Ur.lineBreakRegex,`
231
- `),o):Kt(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),La(h,t.labelStyle),h.attr("class",`${c} ${i}`),La(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");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}g(hg,"addHtmlSpan");function fo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(fo,"createTspan");function cg(e,t,r){const i=e.append("text"),s=fo(i,1,t);go(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}g(cg,"computeWidthOfText");function dg(e,t,r){const i=e.append("text"),s=fo(i,1,t);go(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}g(dg,"computeDimensionOfText");function ug(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=g(u=>cg(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:lg(h,d);for(const u of f){const p=fo(l,c,1.1,s);go(p,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}g(ug,"createFormattedText");function Fa(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(Fa,"decodeHTMLEntities");function go(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(Fa(r.content)):s.text(" "+Fa(r.content))})}g(go,"updateTextContentAndStyles");async function fg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await vw(n)?await Vr(n,void 0,{class:"label-icon"}):`<i class='${Kt(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(fg,"replaceIconSubstring");var he=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(Y.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?og(t,h):sg(t),f=await fg(De(d),h),u=t.replace(/\\\\/g,"\\"),p={isNode:n,label:Rr(t)?u:f,labelStyle:r.replace("fill:","color:")};return await hg(e,p,l,s,c,h)}else{const d=De(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?ig(d.replace("<br>","<br/>"),h):rg(d),u=ug(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ct(u).select("rect").attr("style",p.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ct(u).select("text").attr("style",m)}return i?ct(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ct(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Ao(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function nv(e,t){return e[0]===t[0]&&e[1]===t[1]}function lv(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Ao(c,n,s);const l=(function(c,h,d){const f=[];for(const b of c){const k=[...b];nv(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const u=[];h=Math.max(h,.1);const p=[];for(const b of f)for(let k=0;k<b.length-1;k++){const v=b[k],S=b[k+1];if(v[1]!==S[1]){const _=Math.min(v[1],S[1]);p.push({ymin:_,ymax:Math.max(v[1],S[1]),x:_===v[1]?v[0]:S[0],islope:(S[0]-v[0])/(S[1]-v[1])})}}if(p.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!p.length)return u;let m=[],y=p[0].ymin,x=0;for(;m.length||p.length;){if(p.length){let b=-1;for(let k=0;k<p.length&&!(p[k].ymin>y);k++)b=k;p.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const v=m[b].edge,S=m[k].edge;u.push([[Math.round(v.x),y],[Math.round(S.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return u})(a,o,i);if(s){for(const c of a)Ao(c,n,-s);(function(c,h,d){const f=[];c.forEach((u=>f.push(...u))),Ao(f,h,d)})(l,n,-s)}return l}function Ni(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),lv(e,s,i,o||1)}class Kn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ni(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 po(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 hv extends Kn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ni(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)po([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class cv extends Kn{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class dv{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ni(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=po(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let p=0;p<h;p++){const m=u+d+p*s,y=f-a+2*Math.random()*a,x=m-a+2*Math.random()*a,b=this.helper.ellipse(y,x,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class uv{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ni(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=po(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const p=u*(i+s),m=p+i,y=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),o}}class fv{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=Ni(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=po(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,u=2*(d+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],x=[m[0]+p*Math.cos(h+Math.PI/4),m[1]+p*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),s}}const Wt={};class gv{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const pv=0,Eo=1,hh=2,Zi={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 $o(e,t){return e.type===t}function Qn(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:pv,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Eo,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:hh,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!$o(o,hh);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Qn("M0,0"+e);s++,a=Zi[o.text],i=o.text}else $o(o,Eo)?a=Zi[i]:(s++,a=Zi[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!$o(c,Eo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Zi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function gg(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.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));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function pg(e){const t=[];let r="",i=0,s=0,o=0,a=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,[o,a]=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 d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=s+(s-l)):(d=i,f=s),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,f]=h;let u=0,p=0;r==="Q"||r==="T"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s);const m=i+2*(u-i)/3,y=s+2*(p-s)/3,x=d+2*(u-d)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[m,y,x,b,d,f]}),n=u,l=p,i=d,s=f;break}case"Q":{const[d,f,u,p]=h,m=i+2*(d-i)/3,y=s+2*(f-s)/3,x=u+2*(d-u)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[m,y,x,b,u,p]}),n=d,l=f,i=u,s=p;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],p=h[3],m=h[4],y=h[5],x=h[6];d===0||f===0?(t.push({key:"C",data:[i,s,y,x,y,x]}),i=y,s=x):(i!==y||s!==x)&&(mg(i,s,y,x,d,f,u,p,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function ii(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function mg(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],u=0,p=0,m=0,y=0;if(c)[u,p,m,y]=c;else{[e,t]=ii(e,t,-h),[r,i]=ii(r,i,-h);const j=(e-r)/2,R=(t-i)/2;let $=j*j/(s*s)+R*R/(o*o);$>1&&($=Math.sqrt($),s*=$,o*=$);const A=s*s,N=o*o,I=A*N-A*R*R-N*j*j,E=A*R*R+N*j*j,D=(n===l?-1:1)*Math.sqrt(Math.abs(I/E));m=D*s*R/o+(e+r)/2,y=D*-o*j/s+(t+i)/2,u=Math.asin(parseFloat(((t-y)/o).toFixed(9))),p=Math.asin(parseFloat(((i-y)/o).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(p=Math.PI-p),u<0&&(u=2*Math.PI+u),p<0&&(p=2*Math.PI+p),l&&u>p&&(u-=2*Math.PI),!l&&p>u&&(p-=2*Math.PI)}let x=p-u;if(Math.abs(x)>120*Math.PI/180){const j=p,R=r,$=i;p=l&&p>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=mg(r=m+s*Math.cos(p),i=y+o*Math.sin(p),R,$,s,o,a,0,l,[p,j,m,y])}x=p-u;const b=Math.cos(u),k=Math.sin(u),v=Math.cos(p),S=Math.sin(p),_=Math.tan(x/4),F=4/3*s*_,T=4/3*o*_,M=[e,t],P=[e+F*k,t-T*b],O=[r+F*S,i-T*v],X=[r,i];if(P[0]=2*M[0]-P[0],P[1]=2*M[1]-P[1],c)return[P,O,X].concat(f);{f=[P,O,X].concat(f);const j=[];for(let R=0;R<f.length;R+=3){const $=ii(f[R][0],f[R][1],h),A=ii(f[R+1][0],f[R+1][1],h),N=ii(f[R+2][0],f[R+2][1],h);j.push([$[0],$[1],A[0],A[1],N[0],N[1]])}return j}}const mv={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return Ws(e,t,r)},ellipse:function(e,t,r,i,s){const o=xg(r,i,s);return Ma(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return Ne(e,t,r,i,s,!0)}};function yg(e,t,r,i,s){return{type:"path",ops:Ne(e,t,r,i,s)}}function ds(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...Ne(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...Ne(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?yg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function yv(e,t,r,i,s){return(function(o,a){return ds(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function ch(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ki(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ki(r[0],1.5*(1+.22*t.roughness),fh(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Ki(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ki(a,1.5*(1+.22*t.roughness),fh(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 xg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=nt(a*l,r),n+=nt(n*l,r),{increment:o,rx:a,ry:n}}function Ma(e,t,r,i){const[s,o]=gh(i.increment,e,t,i.rx,i.ry,1,i.increment*Ws(.1,Ws(.4,1,r),r),r);let a=js(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=gh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=js(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function dh(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=nt(.01*d,l),f+=nt(.01*f,l);let u=s,p=o;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(p-u)/2),x=ph(y,c,h,d,f,u,p,1,l);if(!l.disableMultiStroke){const b=ph(y,c,h,d,f,u,p,1.5,l);x.push(...b)}return a&&(n?x.push(...Ne(c,h,c+d*Math.cos(u),h+f*Math.sin(u),l),...Ne(c,h,c+d*Math.cos(p),h+f*Math.sin(p),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:x}}function uh(e,t){const r=pg(gg(Qn(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...Ne(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,u]=n;i.push(...xv(l,c,h,d,f,u,o,t)),o=[f,u];break}case"Z":i.push(...Ne(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Io(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+nt(s,t),i[0][1]+nt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+nt(s,t),i[a][1]+nt(s,t)]})}}return{type:"fillPath",ops:r}}function cr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Wt[s])switch(s){case"zigzag":Wt[s]||(Wt[s]=new hv(i));break;case"cross-hatch":Wt[s]||(Wt[s]=new cv(i));break;case"dots":Wt[s]||(Wt[s]=new dv(i));break;case"dashed":Wt[s]||(Wt[s]=new uv(i));break;case"zigzag-line":Wt[s]||(Wt[s]=new fv(i));break;default:s="hachure",Wt[s]||(Wt[s]=new Kn(i))}return Wt[s]})(t,mv).fillPolygons(e,t)}function fh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Cg(e){return e.randomizer||(e.randomizer=new gv(e.seed||0)),e.randomizer.next()}function Ws(e,t,r,i=1){return r.roughness*i*(Cg(r)*(t-e)+e)}function nt(e,t,r=1){return Ws(-e,e,t,r)}function Ne(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=Aa(e,t,r,i,s,!0,!1);if(a)return n;const l=Aa(e,t,r,i,s,!0,!0);return n.concat(l)}function Aa(e,t,r,i,s,o,a){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 d=h/2,f=.2+.2*Cg(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,p=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=nt(u,s,c),p=nt(p,s,c);const m=[],y=()=>nt(d,s,c),x=()=>nt(h,s,c),b=s.preserveVertices;return a?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,s,c)),t+(b?0:nt(h,s,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*f+y(),p+t+(i-t)*f+y(),u+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*f+x(),p+t+(i-t)*f+x(),u+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Ki(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+nt(t,r),e[s][1]+nt(t,r)]),s===e.length-1&&i.push([e[s][0]+nt(t,r),e[s][1]+nt(t,r)]);return js(i,null,r)}function js(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Aa(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function gh(e,t,r,i,s,o,a,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 d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}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=nt(.5,n)-Math.PI/2;c.push([nt(o,n)+t+.9*i*Math.cos(h-e),nt(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const u=[nt(o,n)+t+i*Math.cos(f),nt(o,n)+r+s*Math.sin(f)];l.push(u),c.push(u)}c.push([nt(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),nt(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([nt(o,n)+t+.98*i*Math.cos(h+a),nt(o,n)+r+.98*s*Math.sin(h+a)]),c.push([nt(o,n)+t+.9*i*Math.cos(h+.5*a),nt(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function ph(e,t,r,i,s,o,a,n,l){const c=o+nt(.1,l),h=[];h.push([nt(n,l)+t+.9*i*Math.cos(c-e),nt(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([nt(n,l)+t+i*Math.cos(d),nt(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),js(h,null,l)}function xv(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:nt(c[0],n)),a[1]+(f?0:nt(c[0],n))]}),h=f?[s,o]:[s+nt(c[u],n),o+nt(c[u],n)],l.push({op:"bcurveTo",data:[e+nt(c[u],n),t+nt(c[u],n),r+nt(c[u],n),i+nt(c[u],n),h[0],h[1]]});return l}function si(e){return[...e]}function mh(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(si(e[0]),si(e[1]),si(e[2]),si(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(si(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function us(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Cv(e,t,r){const i=us(t,r);if(i===0)return us(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),us(e,Xe(t,r,s))}function Xe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Ea(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let u=3*h[0]-2*c[0]-f[0];u*=u;let p=3*h[1]-2*c[1]-f[1];p*=p;let m=3*d[0]-2*f[0]-c[0];m*=m;let y=3*d[1]-2*f[1]-c[1];return y*=y,u<m&&(u=m),p<y&&(p=y),u+p})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(us(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=Xe(l,c,.5),u=Xe(c,h,.5),p=Xe(h,d,.5),m=Xe(f,u,.5),y=Xe(u,p,.5),x=Xe(m,y,.5);Ea([l,f,m,x],0,r,s),Ea([x,y,p,d],0,r,s)}var o,a;return s}function bv(e,t){return Hs(e,0,e.length,t)}function Hs(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=Cv(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Hs(e,t,c+1,i,o),Hs(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Po(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)Ea(e,3*o,t,i);return r&&r>0?Hs(i,0,i.length,r):i}const Ut="none";class Ys{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[yg(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=yv(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Io([c],a)):n.push(cr([c],a))}return a.stroke!==Ut&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=xg(i,s,a),c=Ma(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Ma(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(cr([c.estimatedPoints],a));return a.stroke!==Ut&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ds(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=dh(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const u=dh(t,r,i,s,o,a,!0,!1,f);u.type="fillPath",h.push(u)}else h.push((function(f,u,p,m,y,x,b){const k=f,v=u;let S=Math.abs(p/2),_=Math.abs(m/2);S+=nt(.01*S,b),_+=nt(.01*_,b);let F=y,T=x;for(;F<0;)F+=2*Math.PI,T+=2*Math.PI;T-F>2*Math.PI&&(F=0,T=2*Math.PI);const M=(T-F)/b.curveStepCount,P=[];for(let O=F;O<=T;O+=M)P.push([k+S*Math.cos(O),v+_*Math.sin(O)]);return P.push([k+S*Math.cos(T),v+_*Math.sin(T)]),P.push([k,v]),cr([P],b)})(t,r,i,s,o,a,c));return c.stroke!==Ut&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=ch(t,i);if(i.fill&&i.fill!==Ut)if(i.fillStyle==="solid"){const a=ch(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Po(mh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Po(mh(c),10,(1+i.roughness)/2))}a.length&&s.push(cr([a],i))}return i.stroke!==Ut&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=ds(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Io([t],i)):s.push(cr([t],i))),i.stroke!==Ut&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Ut,a=i.stroke!==Ut,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const u=pg(gg(Qn(h))),p=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Po(x,d)),x=[]},k=()=>{b(),m.length&&(p.push(m),m=[])};for(const{key:S,data:_}of u)switch(S){case"M":k(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const F=m.length?m[m.length-1]:y;x.push([F[0],F[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return p;const v=[];for(const S of p){const _=bv(S,f);_.length&&v.push(_)}return v})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=uh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=uh(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(Io(l,i));else s.push(cr(l,i));return a&&(n?l.forEach((h=>{s.push(ds(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ut};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ut,strokeWidth:0,fill:i.fill||Ut};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ut,strokeWidth:i,fill:Ut}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class kv{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,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 Qi="http://www.w3.org/2000/svg";class wv{constructor(t,r){this.svg=t,this.gen=new Ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Qi,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Qi,"path"),l.setAttribute("d",this.opsToPath(n,a)),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(Qi,"path"),l.setAttribute("d",this.opsToPath(n,a)),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&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Qi,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,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 tt={canvas:(e,t)=>new kv(e,t),svg:(e,t)=>new wv(e,t),generator:e=>new Ys(e),newSeed:()=>Ys.newSeed()},at=g(async(e,t,r)=>{let i;const s=t.useHtmlLabels||Ce(gt()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",Ft(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 he(a,Kt(De(n),gt()),{useHtmlLabels:s,width:t.width||gt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},gt());let d=h.getBBox();const f=(t?.padding??0)/2;if(s){const u=h.children[0],p=ct(h);await qn(u,n),d=u.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return s?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:f,label:a}},"labelHelper"),Oo=g(async(e,t,r)=>{const i=r.useHtmlLabels??Ot(gt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await he(s,Kt(De(t),gt()),{useHtmlLabels:i,width:r.width||gt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const n=r.padding/2;if(Ot(gt())){const l=o.children[0],c=ct(o);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),rt=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),ot=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ut(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(ut,"createPathFromPoints");function qe(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,f=t+c/2;for(let u=0;u<=50;u++){const p=u/50,m=e+p*l,y=f+s*Math.sin(d*(m-e));a.push({x:m,y})}return a}g(qe,"generateFullSineWavePoints");function Mi(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(Mi,"generateCirclePoints");function $a(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"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=g((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g($a,"mergePaths");var vv=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),hr=vv,Sv=g(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=gt(),n=Ot(a);return await he(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),$e=Sv,ze=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Tv=g(async(e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=et(t),f=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),u=Ce(r.flowchart.htmlLabels),p=t.direction==="LR",m=f.insert("g").attr("class","cluster-label swimlane-label"),y=await he(m,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let x=y.getBBox();if(u){const j=y.children[0],R=ct(y);x=j.getBoundingClientRect(),R.attr("width",x.width),R.attr("height",x.height)}const b=t.padding??0,k=t.width<=x.width+b?x.width+b:t.width;t.width<=x.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const v=t.height,S=t.y-v/2,_=t.y+v/2,F=t.x-k/2,T=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+v/3,M=p?4:0,P=x.height+2*M;let O,X;if(p){const j=Math.max(P,x.height+2*M),R=F+j,$=Math.max(0,k-j);if(t.look==="handDrawn"){const I=tt.svg(f),E=J(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),D=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),B=I.rectangle(F,S,j,v,E);O=f.insert(()=>B,":first-child");const U=I.rectangle(R,S,$,v,D);X=f.insert(()=>U,":first-child"),O.select("path:nth-child(2)").attr("style",h.join(";")),O.select("path").attr("style",d.join(";").replace("fill","stroke"))}else O=f.insert("rect",":first-child"),X=f.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",S).attr("width",j).attr("height",v).attr("fill",o).attr("stroke",n),X.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",S).attr("width",$).attr("height",v).attr("fill","none").attr("stroke",n);const A=F+j/2,N=t.y;m.attr("transform",`translate(${A}, ${N}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const j=Math.max(0,T-S),R=Math.min(P,j),$=S+R,A=Math.max(0,_-$),N=t.x-k/2;if(t.look==="handDrawn"){const D=tt.svg(f),B=J(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),U=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),W=D.rectangle(N,S,k,R,B);O=f.insert(()=>W,":first-child");const G=D.rectangle(N,$,k,A,U);X=f.insert(()=>G,":first-child"),O.select("path:nth-child(2)").attr("style",h.join(";")),O.select("path").attr("style",d.join(";").replace("fill","stroke"))}else O=f.insert("rect",":first-child"),X=f.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",c).attr("x",N).attr("y",S).attr("width",k).attr("height",R).attr("fill",o).attr("stroke",n),X.attr("class","swimlane-body").attr("style",c).attr("x",N).attr("y",$).attr("width",k).attr("height",A).attr("fill","none").attr("stroke",n);const I=t.x-x.width/2,E=S+(R-x.height)/2;m.attr("transform",`translate(${I}, ${E})`)}if(Y.trace("Swimlane data ",t,JSON.stringify(t)),l){const j=m.select("span");j&&j.attr("style",l)}return t.offsetX=0,t.width=k,t.height=v,t.offsetY=x.height-b/2,t.intersect=function(j){return hr(t,j)},{cluster:f,labelBBox:x}},"swimlane"),bg=g(async(e,t)=>{Y.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=et(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Ot(r),u=d.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await he(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):p=await $e(u,t.label,t.labelStyle||"",!1,!0);let m=p.getBBox();if(Ot(r)){const F=p.children[0],T=ct(p);m=F.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;Y.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const F=tt.svg(d),T=J(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),M=F.path(ze(b,k,y,x,0),T);v=d.insert(()=>(Y.debug("Rough node insert CXC",M),M),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=d.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=ho(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const F=u.select("span");F&&F.attr("style",n)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return hr(t,F)},{cluster:d,labelBBox:m}},"rect"),Bv=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return hr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),_v=g(async(e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,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"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const u=await $e(d,t.label,t.labelStyle,void 0,!0);let p=u.getBBox();if(Ot(r)){const M=u.children[0],P=ct(u);p=M.getBoundingClientRect(),P.attr("width",p.width),P.attr("height",p.height)}const m=0*t.padding,y=m/2,x=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-p.height-6,v=t.x-x/2,S=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+p.height+2;let F;if(t.look==="handDrawn"){const M=t.cssClasses.includes("statediagram-cluster-alt"),P=tt.svg(c),O=t.rx||t.ry?P.path(ze(v,S,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):P.rectangle(v,S,x,b,{seed:s});F=c.insert(()=>O,":first-child");const X=P.rectangle(v,_,x,k,{fill:M?o:a,fillStyle:M?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>O,":first-child"),f=c.insert(()=>X)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",v).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",x).attr("height",k);d.attr("transform",`translate(${t.x-p.width/2}, ${S+1-(Ot(r)?0:3)})`);const T=F.node().getBBox();return t.height=T.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(M){return hr(t,M)},{cluster:c,labelBBox:p}},"roundedWithTitle"),Lv=g(async(e,t)=>{Y.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=et(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Ot(r),u=d.insert("g").attr("class","cluster-label "),p=await he(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=p.getBBox();if(Ot(r)){const F=p.children[0],T=ct(p);m=F.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;Y.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const F=tt.svg(d),T=J(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),M=F.path(ze(b,k,y,x,t.rx),T);v=d.insert(()=>(Y.debug("Rough node insert CXC",M),M),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=d.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=ho(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const F=u.select("span");F&&F.attr("style",n)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return hr(t,F)},{cluster:d,labelBBox:m}},"kanbanSection"),Fv=g((e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=tt.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=u.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return hr(t,m)},{cluster:a,labelBBox:{}}},"divider"),Mv=bg,Av={rect:bg,squareRect:Mv,roundedWithTitle:_v,noteGroup:Bv,divider:Fv,kanbanSection:Lv,swimlane:Tv},kg=new Map,wg=g(async(e,t)=>{const r=t.shape||"rect",i=await Av[r](e,t);return kg.set(t.id,i),i},"insertCluster"),Ev=g(()=>{kg=new Map},"clear");function vg(e,t){return e.intersect(t)}g(vg,"intersectNode");var $v=vg;function Sg(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}g(Sg,"intersectEllipse");var Tg=Sg;function Bg(e,t,r){return Tg(e,t,t,r)}g(Bg,"intersectCircle");var Iv=Bg;function _g(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&Ia(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+f,p=h*t.x+d*t.y+f;if(Math.abs(u)<c&&Math.abs(p)<c&&Ia(u,p))return;const m=s*d-h*o;if(m===0)return;const y=Math.abs(m/2);let x=o*f-d*a;const b=x<0?(x-y)/m:(x+y)/m;x=h*a-s*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}g(_g,"intersectLine");function Ia(e,t){return e*t>0}g(Ia,"sameSign");var Pv=_g;function Lg(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],u=Pv(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});u&&o.push(u)}return o.length?(o.length>1&&o.sort(function(h,d){let f=h.x-r.x,u=h.y-r.y,p=Math.sqrt(f*f+u*u),m=d.x-r.x,y=d.y-r.y,x=Math.sqrt(m*m+y*y);return p<x?-1:p===x?0:1}),o[0]):e}g(Lg,"intersectPolygon");var Ov=Lg,Q={node:$v,circle:Iv,ellipse:Tg,polygon:Ov,rect:hr};function Fg(e,t){const{labelStyles:r}=et(t);t.labelStyle=r;const i=ot(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=tt.svg(o),c=J(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Ft(n)),rt(t,d),t.intersect=function(f){return Y.info("Circle intersect",t,a,f),Q.circle(t,a,f)},o}g(Fg,"anchor");function Pa(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,u=d/s,p=f/o,m=Math.sqrt(u**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*o*Math.sin(h)*(a?-1:1),b=c-y*s*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/o,(e-x)/s);let S=Math.atan2((i-b)/o,(r-x)/s)-k;a&&S<0&&(S+=2*Math.PI),!a&&S>0&&(S-=2*Math.PI);const _=[];for(let F=0;F<20;F++){const T=F/19,M=k+T*S,P=x+s*Math.cos(M),O=b+o*Math.sin(M);_.push({x:P,y:O})}return _}g(Pa,"generateArcPoints");function Mg(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Mg,"calculateArcSagitta");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=g(M=>M+a,"calcTotalHeight"),l=g(M=>{const P=M/2;return[P/(2.5+M/50),P]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await at(e,t,ot(t)),d=n(t?.height?t?.height:h.height),[f,u]=l(d),p=Mg(d,f,u),y=(t?.width?t?.width:h.width)+o*2+p-p,x=d,{cssStyles:b}=t,k=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...Pa(-y/2,-x/2,-y/2,x/2,f,u,!1),{x:y/2,y:x/2},...Pa(y/2,x/2,y/2,-x/2,f,u,!0)],v=tt.svg(c),S=J(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=ut(k),F=v.path(_,S),T=c.insert(()=>F,":first-child");return T.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${f/2}, 0)`),rt(t,T),t.intersect=function(M){return Q.polygon(t,k,M)},c}g(Ag,"bowTieRect");function Ae(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Ae,"insertPolygonShape");var Ji=12;async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+Ji),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,u=-h,p=0,m=[{x:d+Ji,y:u},{x:f,y:u},{x:f,y:p},{x:d,y:p},{x:d,y:u+Ji},{x:d+Ji,y:u}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=tt.svg(n),k=J(t,{}),v=ut(m),S=b.path(v,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&y.attr("style",x)}else y=Ae(n,c,h,m);return i&&y.attr("style",i),rt(t,y),t.intersect=function(b){return Q.polygon(t,m,b)},n}g(Eg,"card");function $g(e,t){const{nodeStyles:r}=et(t);t.label="";const i=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=tt.svg(i),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ut(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return Q.polygon(t,a,f)},i}g($g,"choice");async function Jn(e,t,r){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await at(e,t,ot(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=tt.svg(o),p=J(t,{}),m=u.circle(0,0,h*2,p);d=o.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Ft(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return rt(t,d),t.calcIntersect=function(u,p){const m=u.width/2;return Q.circle(u,m,p)},t.intersect=function(u){return Y.info("Circle intersect",t,h,u),Q.circle(t,h,u)},o}g(Jn,"circle");function Ig(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
232
- M ${s.x},${s.y} L ${a.x},${a.y}`}g(Ig,"createLine");function Pg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=tt.svg(s),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=Ig(o),d=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),rt(t,f),t.intersect=function(u){return Y.info("crossedCircle intersect",t,{radius:o,point:u}),Q.circle(t,o,u)},s}g(Pg,"crossedCircle");function ve(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(ve,"generateCirclePoints");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...ve(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...ve(c/2+d*2,-d,d,20,-180,-270),...ve(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...ve(c/2,h/2,d,20,0,90)],p=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...ve(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...ve(c/2+c*.1,-d,d,20,-180,-270),...ve(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...ve(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=tt.svg(s),y=J(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ut(u).replace("Z",""),k=m.path(b,y),v=ut(p),S=m.path(v,{...y}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,_),t.intersect=function(F){return Q.polygon(t,p,F)},s}g(Og,"curlyBraceLeft");function Se(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:u,y:p})}return a}g(Se,"generateCirclePoints");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Se(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Se(c/2+d*2,-d,d,20,-180,-270),...Se(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Se(c/2,h/2,d,20,0,90)],p=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Se(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Se(c/2+d*2,-d,d,20,-180,-270),...Se(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Se(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=tt.svg(s),y=J(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ut(u).replace("Z",""),k=m.path(b,y),v=ut(p),S=m.path(v,{...y}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,_),t.intersect=function(F){return Q.polygon(t,p,F)},s}g(Rg,"curlyBraceRight");function At(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(At,"generateCirclePoints");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...At(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...At(c/2+d*2,-d,d,20,-180,-270),...At(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...At(c/2,h/2,d,20,0,90)],p=[...At(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...At(-c/2-d/2,-d,d,20,0,90),...At(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...At(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...At(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...At(c/2+d*2,-d,d,20,-180,-270),...At(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...At(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...At(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...At(-c/2-d/2,-d,d,20,0,90),...At(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...At(-c/2+d+d/2,h/2,d,30,-180,-270)],y=tt.svg(s),x=J(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=ut(u).replace("Z",""),v=y.path(k,x),_=ut(p).replace("Z",""),F=y.path(_,x),T=ut(m),M=y.path(T,{...x}),P=s.insert("g",":first-child");return P.insert(()=>M,":first-child").attr("stroke-opacity",0),P.insert(()=>v,":first-child"),P.insert(()=>F,":first-child"),P.attr("class","text"),f&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,P),t.intersect=function(O){return Q.polygon(t,m,O)},s}g(Dg,"curlyBraces");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await at(e,t,ot(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),u=f/2,{cssStyles:p}=t,m=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=d,b=f,k=x-u,v=b/4,S=[{x:k,y:0},{x:v,y:0},{x:0,y:b/2},{x:v,y:b},{x:k,y:b},...Mi(-k,-b/2,u,50,270,90)],_=ut(S),F=m.path(_,y),T=c.insert(()=>F,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(${-d/2}, ${-f/2})`),rt(t,T),t.intersect=function(M){return Q.polygon(t,S,M)},c}g(Ng,"curvedTrapezoid");var Rv=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Dv=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Nv=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),yh=8,xh=8;async function qg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<xh&&(t.width=xh);const b=y/2/(2.5+y/50);t.height=(t.height??0)-o-b*3,t.height<yh&&(t.height=yh)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t.width?t.width:l.width)+a,d=h/2,f=d/(2.5+h/50),u=(t.height?t.height:l.height)+o+f;let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=tt.svg(n),x=Dv(0,0,h,u,d,f),b=Nv(0,f,h,u,d,f),k=J(t,{}),v=y.path(x,k),S=y.path(b,J(t,{fill:"none"}));p=n.insert(()=>S,":first-child"),p=n.insert(()=>v,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{const y=Rv(0,0,h,u,d,f);p=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Ft(m)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),rt(t,p),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const x=Q.rect(t,y),b=x.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=f-k,y.y-(t.y??0)>0&&(k=-k),x.y+=k}return x},n}g(qg,"cylinder");async function Zr(e,t,r){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await at(e,t,ot(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:u}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(f=r.rx,u=r.ry),t.look==="handDrawn"){const m=tt.svg(o),y=J(t,{}),x=f||u?m.path(ze(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Ft(p))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Ft(f)).attr("ry",Ft(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return rt(t,d),t.calcIntersect=function(m,y){return Q.rect(m,y)},t.intersect=function(m){return Q.rect(t,m)},o}g(Zr,"drawRect");async function zg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Zr(e,t,l);if(t.look==="handDrawn"){const u=tt.svg(c),p=J(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let x=null;if(y instanceof SVGGraphicsElement)x=y.getBBox();else return c;return c.insert(()=>u.line(x.x,x.y,x.x+x.width,x.y,p),".basic.label-container g.label"),c.insert(()=>u.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,p),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}g(zg,"datastore");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=n.width+s,h=n.height+o,d=h*.2,f=-c/2,u=-h/2-d/2,{cssStyles:p}=t,m=tt.svg(a),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:f,y:u+d},{x:-f,y:u+d},{x:-f,y:-u},{x:f,y:-u},{x:f,y:u},{x:-f,y:u},{x:-f,y:u+d}],b=m.polygon(x.map(v=>[v.x,v.y]),y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),rt(t,k),t.intersect=function(v){return Q.rect(t,v)},a}g(Wg,"dividedRectangle");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=et(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=tt.svg(n),p=J(t,{roughness:.2,strokeWidth:2.5}),m=J(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,p),x=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Ft(t.cssClasses)).attr("style",Ft(f)),d.node()?.appendChild(y),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),p=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return rt(t,d),t.intersect=function(u){return Y.info("DoubleCircle intersect",t,c,u),Q.circle(t,c,u)},n}g(jg,"doublecircle");function Hg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=tt.svg(o),{nodeBorder:c}=r,h=J(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=o.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),rt(t,f),t.intersect=function(u){return Y.info("filledCircle intersect",t,{radius:a,point:u}),Q.circle(t,a,u)},o}g(Hg,"filledCircle");var Ch=10,bh=10;async function Yg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<Ch&&(t.height=Ch),t.width=(t?.width??0)-o-o/2,t.width<bh&&(t.width=bh));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,p=tt.svg(a),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ut(f),x=p.path(y,m),b=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,rt(t,b),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(k){return Y.info("Triangle intersect",t,f,k),Q.polygon(t,f,k)},a}g(Yg,"flippedTriangle");function Ug(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=et(t);t.label="";const a=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,f=tt.svg(a),u=J(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=f.rectangle(h,d,l,c,u),m=a.insert(()=>p,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),rt(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return Q.rect(t,x)},a}g(Ug,"forkJoin");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,f=d/2,{cssStyles:u}=t,p=tt.svg(l),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...Mi(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],x=ut(y),b=p.path(x,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),rt(t,k),t.intersect=function(v){return Y.info("Pill intersect",t,{radius:f,point:v}),Q.polygon(t,y,v)},l}g(Xg,"halfRoundedRectangle");var qv=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=et(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await at(e,t,ot(t)),f=(t?.height?t?.height:d.height)+l,u=f/s,p=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:p-u,y:0},{x:p,y:-f/2},{x:p-u,y:-f},{x:u,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=tt.svg(h),k=J(t,{}),v=qv(0,0,p,f,u),S=b.path(v,k);y=h.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),x&&y.attr("style",x)}else y=Ae(h,p,f,m);return i&&y.attr("style",i),t.width=p,t.height=f,rt(t,y),t.intersect=function(b){return Q.polygon(t,m,b)},h}g(Gg,"hexagon");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await at(e,t,ot(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=tt.svg(s),c=J(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=ut(h),f=l.path(d,c),u=s.insert(()=>f,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-o/2}, ${-a/2})`),rt(t,u),t.intersect=function(p){return Y.info("Pill intersect",t,{points:h}),Q.polygon(t,h,p)},s}g(Vg,"hourglass");async function Zg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",u=n,p=n,{nodeBorder:m}=r,{stylesMap:y}=Gr(t),x=-p/2,b=-u/2,k=t.label?8:0,v=tt.svg(c),S=J(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=v.rectangle(x,b,p,u,S),F=Math.max(p,h.width),T=u+h.height+k,M=v.rectangle(-F/2,-T/2,F,T,{...S,fill:"transparent",stroke:"none"}),P=c.insert(()=>_,":first-child"),O=c.insert(()=>M);if(t.icon){const X=c.append("g");X.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const j=X.node().getBBox(),R=j.width,$=j.height,A=j.x,N=j.y;X.attr("transform",`translate(${-R/2-A},${f?h.height/2+k/2-$/2-N:-h.height/2-k/2-$/2-N})`),X.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-T/2:T/2-h.height})`),P.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),rt(t,O),t.intersect=function(X){if(Y.info("iconSquare intersect",t,X),!t.label)return Q.rect(t,X);const j=t.x??0,R=t.y??0,$=t.height??0;let A=[];return f?A=[{x:j-h.width/2,y:R-$/2},{x:j+h.width/2,y:R-$/2},{x:j+h.width/2,y:R-$/2+h.height+k},{x:j+p/2,y:R-$/2+h.height+k},{x:j+p/2,y:R+$/2},{x:j-p/2,y:R+$/2},{x:j-p/2,y:R-$/2+h.height+k},{x:j-h.width/2,y:R-$/2+h.height+k}]:A=[{x:j-p/2,y:R-$/2},{x:j+p/2,y:R-$/2},{x:j+p/2,y:R-$/2+u},{x:j+h.width/2,y:R-$/2+u},{x:j+h.width/2/2,y:R+$/2},{x:j-h.width/2,y:R+$/2},{x:j-h.width/2,y:R-$/2+u},{x:j-p/2,y:R-$/2+u}],Q.polygon(t,A,X)},c}g(Zg,"icon");async function Kg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await at(e,t,"icon-shape default"),f=20,u=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Gr(t),b=tt.svg(c),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=x.get("fill");k.stroke=v??y;const S=c.append("g");t.icon&&S.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),F=_.width,T=_.height,M=_.x,P=_.y,O=Math.max(F,T)*Math.SQRT2+f*2,X=b.circle(0,0,O,k),j=Math.max(O,h.width),R=O+h.height+u,$=b.rectangle(-j/2,-R/2,j,R,{...k,fill:"transparent",stroke:"none"}),A=c.insert(()=>X,":first-child"),N=c.insert(()=>$);return S.attr("transform",`translate(${-F/2-M},${p?h.height/2+u/2-T/2-P:-h.height/2-u/2-T/2-P})`),S.attr("style",`color: ${x.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-R/2:R/2-h.height})`),A.attr("transform",`translate(0,${p?h.height/2+u/2:-h.height/2-u/2})`),rt(t,N),t.intersect=function(I){return Y.info("iconSquare intersect",t,I),Q.rect(t,I)},c}g(Kg,"iconCircle");async function Qg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await at(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Gr(t),k=-m/2,v=-p/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const T=b.get("fill");F.stroke=T??x;const M=_.path(ze(k,v,m,p,5),F),P=Math.max(m,h.width),O=p+h.height+S,X=_.rectangle(-P/2,-O/2,P,O,{...F,fill:"transparent",stroke:"none"}),j=c.insert(()=>M,":first-child").attr("class","icon-shape2"),R=c.insert(()=>X);if(t.icon){const $=c.append("g");$.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=$.node().getBBox(),N=A.width,I=A.height,E=A.x,D=A.y;$.attr("transform",`translate(${-N/2-E},${u?h.height/2+S/2-I/2-D:-h.height/2-S/2-I/2-D})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),rt(t,R),t.intersect=function($){if(Y.info("iconSquare intersect",t,$),!t.label)return Q.rect(t,$);const A=t.x??0,N=t.y??0,I=t.height??0;let E=[];return u?E=[{x:A-h.width/2,y:N-I/2},{x:A+h.width/2,y:N-I/2},{x:A+h.width/2,y:N-I/2+h.height+S},{x:A+m/2,y:N-I/2+h.height+S},{x:A+m/2,y:N+I/2},{x:A-m/2,y:N+I/2},{x:A-m/2,y:N-I/2+h.height+S},{x:A-h.width/2,y:N-I/2+h.height+S}]:E=[{x:A-m/2,y:N-I/2},{x:A+m/2,y:N-I/2},{x:A+m/2,y:N-I/2+p},{x:A+h.width/2,y:N-I/2+p},{x:A+h.width/2/2,y:N+I/2},{x:A-h.width/2,y:N+I/2},{x:A-h.width/2,y:N-I/2+p},{x:A-m/2,y:N-I/2+p}],Q.polygon(t,E,$)},c}g(Qg,"iconRounded");async function Jg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await at(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Gr(t),k=-m/2,v=-p/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const T=b.get("fill");F.stroke=T??x;const M=_.path(ze(k,v,m,p,.1),F),P=Math.max(m,h.width),O=p+h.height+S,X=_.rectangle(-P/2,-O/2,P,O,{...F,fill:"transparent",stroke:"none"}),j=c.insert(()=>M,":first-child"),R=c.insert(()=>X);if(t.icon){const $=c.append("g");$.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=$.node().getBBox(),N=A.width,I=A.height,E=A.x,D=A.y;$.attr("transform",`translate(${-N/2-E},${u?h.height/2+S/2-I/2-D:-h.height/2-S/2-I/2-D})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),rt(t,R),t.intersect=function($){if(Y.info("iconSquare intersect",t,$),!t.label)return Q.rect(t,$);const A=t.x??0,N=t.y??0,I=t.height??0;let E=[];return u?E=[{x:A-h.width/2,y:N-I/2},{x:A+h.width/2,y:N-I/2},{x:A+h.width/2,y:N-I/2+h.height+S},{x:A+m/2,y:N-I/2+h.height+S},{x:A+m/2,y:N+I/2},{x:A-m/2,y:N+I/2},{x:A-m/2,y:N-I/2+h.height+S},{x:A-h.width/2,y:N-I/2+h.height+S}]:E=[{x:A-m/2,y:N-I/2},{x:A+m/2,y:N-I/2},{x:A+m/2,y:N-I/2+p},{x:A+h.width/2,y:N-I/2+p},{x:A+h.width/2/2,y:N+I/2},{x:A-h.width/2,y:N+I/2},{x:A-h.width/2,y:N-I/2+p},{x:A-m/2,y:N-I/2+p}],Q.polygon(t,E,$)},c}g(Jg,"iconSquare");async function tp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=et(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:u}=await at(e,t,"image-shape default"),p=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=tt.svg(d),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=b.rectangle(m,y,c,h,k),S=Math.max(c,f.width),_=h+f.height+x,F=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),T=d.insert(()=>v,":first-child"),M=d.insert(()=>F);if(t.img){const P=d.append("image");P.attr("href",t.img),P.attr("width",c),P.attr("height",h),P.attr("preserveAspectRatio","none"),P.attr("transform",`translate(${-c/2},${p?_/2-h:-_/2})`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),T.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),rt(t,M),t.intersect=function(P){if(Y.info("iconSquare intersect",t,P),!t.label)return Q.rect(t,P);const O=t.x??0,X=t.y??0,j=t.height??0;let R=[];return p?R=[{x:O-f.width/2,y:X-j/2},{x:O+f.width/2,y:X-j/2},{x:O+f.width/2,y:X-j/2+f.height+x},{x:O+c/2,y:X-j/2+f.height+x},{x:O+c/2,y:X+j/2},{x:O-c/2,y:X+j/2},{x:O-c/2,y:X-j/2+f.height+x},{x:O-f.width/2,y:X-j/2+f.height+x}]:R=[{x:O-c/2,y:X-j/2},{x:O+c/2,y:X-j/2},{x:O+c/2,y:X-j/2+h},{x:O+f.width/2,y:X-j/2+h},{x:O+f.width/2/2,y:X+j/2},{x:O-f.width/2,y:X+j/2},{x:O-f.width/2,y:X-j/2+h},{x:O-c/2,y:X-j/2+h}],Q.polygon(t,R,P)},d}g(tp,"imageSquare");async function ep(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(o??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&f.attr("style",u)}else f=Ae(n,c,h,d);return i&&f.attr("style",i),t.width=c,t.height=h,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(ep,"inv_trapezoid");async function rp(e,t){const{shapeSvg:r,bbox:i,label:s}=await at(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),rt(t,o),t.intersect=function(l){return Q.rect(t,l)},r}g(rp,"labelRect");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ae(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(ip,"lean_left");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ae(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(sp,"lean_right");function op(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",ot(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=tt.svg(s),d=J(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=ut(c),u=h.path(f,d),p=s.insert(()=>u,":first-child");return p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${a/2},${-n})`),rt(t,p),t.intersect=function(m){return Y.info("lightningBolt intersect",t,m),Q.polygon(t,c,m)},s}g(op,"lightningBolt");var zv=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Wv=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),jv=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),kh=10,wh=10;async function ap(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<wh&&(t.width=wh);const k=x/2/(2.5+x/50);t.height=(t.height??0)-a-k*3,t.height<kh&&(t.height=kh)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,f=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+f+a*2,p=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const x=tt.svg(n),b=Wv(0,0,h,u,d,f,p),k=jv(0,f,h,u,d,f),v=J(t,{}),S=x.path(b,v),_=x.path(k,v);n.insert(()=>_,":first-child").attr("class","line"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const x=zv(0,0,h,u,d,f,p);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Ft(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),rt(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(x){const b=Q.rect(t,x),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let v=f*f*(1-k*k/(d*d));v>0&&(v=Math.sqrt(v)),v=f-v,x.y-(t.y??0)>0&&(v=-v),b.y+=v}return b},n}g(ap,"linedCylinder");async function np(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const v=t.width;t.width=(v??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,u=d+f,{cssStyles:p}=t,m=tt.svg(n),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...qe(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,f,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(x.map(v=>[v.x,v.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),rt(t,k),t.intersect=function(v){return Q.polygon(t,x,v)},n}g(np,"linedWaveEdgedRect");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,ot(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,p=f-2*n,m=-u/2,y=-p/2,{cssStyles:x}=t,b=tt.svg(l),k=J(t,{}),v=[{x:m-n,y:y+n},{x:m-n,y:y+p+n},{x:m+u-n,y:y+p+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y:y+p-n},{x:m+u+n,y:y+p-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],S=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ut(v);let F=b.path(_,k);const T=ut(S);let M=b.path(T,k);t.look!=="handDrawn"&&(F=$a(F),M=$a(M));const P=l.insert("g",":first-child");return P.insert(()=>F),P.insert(()=>M),P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&P.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))})`),rt(t,P),t.intersect=function(O){return Q.polygon(t,v,O)},l}g(lp,"multiRect");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(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?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,f=Math.max(o.height,t?.height??0)+c*3,u=t.look==="neo"?f/4:f/8,p=f+(h?u/2:-u/2),m=-d/2,y=-p/2,x=10,{cssStyles:b}=t,k=qe(m-x,y+p+x,m+d-x,y+p+x,u,.8),v=k?.[k.length-1],S=[{x:m-x,y:y+x},{x:m-x,y:y+p+x},...k,{x:m+d-x,y:v.y-x},{x:m+d,y:v.y-x},{x:m+d,y:v.y-2*x},{x:m+d+x,y:v.y-2*x},{x:m+d+x,y:y-x},{x:m+x,y:y-x},{x:m+x,y},{x:m,y},{x:m,y:y+x}],_=[{x:m,y:y+x},{x:m+d-x,y:y+x},{x:m+d-x,y:v.y-x},{x:m+d,y:v.y-x},{x:m+d,y},{x:m,y}],F=tt.svg(s),T=J(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const M=ut(S),P=F.path(M,T),O=ut(_),X=F.path(O,T),j=s.insert(()=>P,":first-child");return j.insert(()=>X),j.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-u/2-(o.y-(o.top??0))})`),rt(t,j),t.intersect=function(R){return Q.polygon(t,S,R)},s}g(hp,"multiWaveEdgedRectangle");async function cp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i,t.useHtmlLabels||Ot(Ct())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:u}=t,p=tt.svg(a),m=J(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=p.rectangle(d,f,c,h,m),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,x),t.intersect=function(b){return Q.rect(t,b)},a}g(cp,"note");var Hv=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function dp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await at(e,t,ot(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+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 d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=tt.svg(s),p=J(t,{}),m=Hv(0,0,l),y=u.path(m,p);d=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=Ae(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),rt(t,d),t.calcIntersect=function(u,p){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=Q.polygon(u,y,p);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(dp,"question");async function up(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width??l.width)+(t.look==="neo"?o*2:o),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),f=-h/2,u=-d/2,p=u/2,m=[{x:f+p,y:u},{x:f,y:0},{x:f+p,y:-u},{x:-f,y:-u},{x:-f,y:u}],{cssStyles:y}=t,x=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ut(m),v=x.path(k,b),S=n.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-p/2},0)`),c.attr("transform",`translate(${-p/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),rt(t,S),t.intersect=function(_){return Q.polygon(t,m,_)},n}g(up,"rect_left_inv_arrow");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await $e(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Ot(gt())){const T=h.children[0],M=ct(h);d=T.getBoundingClientRect(),M.attr("width",d.width),M.attr("height",d.height)}Y.info("Text 2",l);const f=l||[],u=h.getBBox(),p=await $e(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=p.children[0],y=ct(p);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const x=(t.padding||0)/2;ct(p).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+x+5)+")"),ct(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),v=-d.width/2-x,S=-d.height/2-x;let _,F;if(t.look==="handDrawn"){const T=tt.svg(o),M=J(t,{}),P=T.path(ze(v,S,b,k,t.rx||0),M),O=T.line(-d.width/2-x,-d.height/2-x+u.height+x,d.width/2+x,-d.height/2-x+u.height+x,M);F=o.insert(()=>(Y.debug("Rough node insert CXC",P),O),":first-child"),_=o.insert(()=>(Y.debug("Rough node insert CXC",P),P),":first-child")}else _=a.insert("rect",":first-child"),F=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),F.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+u.height+x).attr("y2",-d.height/2-x+u.height+x);return rt(t,_),t.intersect=function(T){return Q.rect(t,T)},o}g(fp,"rectWithTitle");async function gp(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Zr(e,t,s)}g(gp,"roundedRect");var He=8;async function pp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?He:He*2),h=(t?.height??n.height)+o*2,d=c-He,f=h,u=He-c/2,p=-h/2,{cssStyles:m}=t,y=tt.svg(a),x=J(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:u,y:p},{x:u+d,y:p},{x:u+d,y:p+f},{x:u-He,y:p+f},{x:u-He,y:p},{x:u,y:p},{x:u,y:p+f}],k=y.polygon(b.map(S=>[S.x,S.y]),x),v=a.insert(()=>k,":first-child");return v.attr("class","basic label-container outer-path").attr("style",Ft(m)),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${He/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,v),t.intersect=function(S){return Q.rect(t,S)},a}g(pp,"shadedProcess");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,u=d/1.5,p=-f/2,m=-u/2,{cssStyles:y}=t,x=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:p,y:m},{x:p,y:m+u},{x:p+f,y:m+u},{x:p+f,y:m-u/2}],v=ut(k),S=x.path(v,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),rt(t,_),t.intersect=function(F){return Q.polygon(t,k,F)},n}g(mp,"slopedRect");async function yp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Zr(e,t,o)}g(yp,"squareRect");async function xp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:f}=t,u=tt.svg(n),p=J(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Mi(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Mi(h/2-d,0,d,50,270,450)],y=ut(m),x=u.path(y,p),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),rt(t,b),t.intersect=function(k){return Q.polygon(t,m,k)},n}g(xp,"stadium");async function Cp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Zr(e,t,r)}g(Cp,"state");function bp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,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),d=tt.svg(h),f=J(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const u=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),p=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>u,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${k})`)}return rt(t,x),t.intersect=function(b){return Q.circle(t,(t.width??0)/2,b)},h}g(bp,"stateEnd");function kp(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=tt.svg(o).circle(0,0,t.width,_2(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return rt(t,a),t.intersect=function(n){return Q.circle(t,(t.width??7)/2,n)},o}g(kp,"stateStart");var dr=8;async function wp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width??l.width)+2*dr+o,h=(t?.height??l.height)+a,d=c-2*dr,f=h,u=-c/2,p=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=tt.svg(n),x=J(t,{}),b=y.rectangle(u,p,d+16,f,x),k=y.line(u+dr,p,u+dr,p+f,x),v=y.line(u+dr+d,p,u+dr+d,p+f,x);n.insert(()=>k,":first-child"),n.insert(()=>v,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ft(_)),rt(t,S)}else{const y=Ae(n,d,f,m);i&&y.attr("style",i),rt(t,y)}return t.intersect=function(y){return Q.polygon(t,m,y)},n}g(wp,"subroutine");var Ro=.2;async function vp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Ro*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height?t?.height:l.height)+a*2,h=Ro*c,d=Ro*c,u=(t?.width?t?.width:l.width)+o*2+h-h,p=c,m=-u/2,y=-p/2,{cssStyles:x}=t,b=tt.svg(n),k=J(t,{}),v=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+p},{x:m-h/2,y:y+p}],S=[{x:m+u-h/2,y:y+p},{x:m+u+h/2,y:y+p},{x:m+u+h/2,y:y+p-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ut(v),F=b.path(_,k),T=ut(S),M=b.path(T,{...k,fillStyle:"solid"}),P=n.insert(()=>M,":first-child");return P.insert(()=>F,":first-child"),P.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&P.selectAll("path").attr("style",i),rt(t,P),t.intersect=function(O){return Q.polygon(t,v,O)},n}g(vp,"taggedRect");async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,ot(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:u}=t,p=tt.svg(s),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...qe(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-d*.4,k=[{x:x+n-h,y:(b+l)*1.3},{x:x+n,y:b+l-d},{x:x+n,y:(b+l)*.9},...qe(x+n,(b+l)*1.25,x+n-h,(b+l)*1.3,-l*.02,.5)],v=ut(y),S=p.path(v,m),_=ut(k),F=p.path(_,{...m,fillStyle:"solid"}),T=s.insert(()=>F,":first-child");return T.insert(()=>S,":first-child"),T.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),rt(t,T),t.intersect=function(M){return Q.polygon(t,y,M)},s}g(Sp,"taggedWaveEdgedRectangle");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await at(e,t,ot(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/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",a).attr("height",n),rt(t,h),t.intersect=function(d){return Q.rect(t,d)},s}g(Tp,"text");var Yv=g((e,t,r,i,s,o)=>`M${e},${t}
228
+ `);return eg(i)}g(rg,"preprocessMarkdown");function ig(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}g(ig,"nonMarkdownToLines");function sg(e,t={}){const r=rg(e,t),i=yt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
229
+ `).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[o].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return g(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}g(sg,"markdownToLines");function og(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(og,"nonMarkdownToHTML");function ag(e,{markdownAutoWrap:t}={}){const r=yt.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(U.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(ag,"markdownToHTML");function ng(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(ng,"splitTextToChars");function lg(e,t){const r=ng(t.content);return Kn(e,[],r,t.type)}g(lg,"splitWordToFitWidth");function Kn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Kn(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Kn,"splitWordToFitWidthRecursion");function hg(e,t){if(e.some(({content:r})=>r.includes(`
230
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return zs(e,t)}g(hg,"splitLineToFitWidth");function zs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return zs(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=lg(t,o);r.push([n]),l.content&&e.unshift(l)}return zs(e,t,r)}g(zs,"splitLineToFitWidthRecursion");function Fa(e,t){t&&e.attr("style",t)}g(Fa,"applyStyle");var hh=16384;async function cg(e,t,r,i,s=!1,o=Ct()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,hh)}px`),a.attr("height",`${Math.min(10*r,hh)}px`);const n=a.append("xhtml:div"),l=Rr(t.label)?await tn(t.label.replace(Ur.lineBreakRegex,`
231
+ `),o):Kt(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Fa(h,t.labelStyle),h.attr("class",`${c} ${i}`),Fa(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");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}g(cg,"addHtmlSpan");function fo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(fo,"createTspan");function dg(e,t,r){const i=e.append("text"),s=fo(i,1,t);go(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}g(dg,"computeWidthOfText");function ug(e,t,r){const i=e.append("text"),s=fo(i,1,t);go(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}g(ug,"computeDimensionOfText");function fg(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=g(u=>dg(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:hg(h,d);for(const u of f){const p=fo(l,c,1.1,s);go(p,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}g(fg,"createFormattedText");function Ma(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(Ma,"decodeHTMLEntities");function go(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(Ma(r.content)):s.text(" "+Ma(r.content))})}g(go,"updateTextContentAndStyles");async function gg(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await Sw(n)?await Vr(n,void 0,{class:"label-icon"}):`<i class='${Kt(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(gg,"replaceIconSubstring");var he=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(U.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?ag(t,h):og(t),f=await gg(Ne(d),h),u=t.replace(/\\\\/g,"\\"),p={isNode:n,label:Rr(t)?u:f,labelStyle:r.replace("fill:","color:")};return await cg(e,p,l,s,c,h)}else{const d=Ne(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?sg(d.replace("<br>","<br/>"),h):ig(d),u=fg(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(u).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");dt(u).select("rect").attr("style",p.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");dt(u).select("text").attr("style",m)}return i?dt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):dt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function Eo(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function lv(e,t){return e[0]===t[0]&&e[1]===t[1]}function hv(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Eo(c,n,s);const l=(function(c,h,d){const f=[];for(const b of c){const k=[...b];lv(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const u=[];h=Math.max(h,.1);const p=[];for(const b of f)for(let k=0;k<b.length-1;k++){const v=b[k],S=b[k+1];if(v[1]!==S[1]){const _=Math.min(v[1],S[1]);p.push({ymin:_,ymax:Math.max(v[1],S[1]),x:_===v[1]?v[0]:S[0],islope:(S[0]-v[0])/(S[1]-v[1])})}}if(p.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!p.length)return u;let m=[],y=p[0].ymin,x=0;for(;m.length||p.length;){if(p.length){let b=-1;for(let k=0;k<p.length&&!(p[k].ymin>y);k++)b=k;p.splice(0,b+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const k=b+1;if(k>=m.length)break;const v=m[b].edge,S=m[k].edge;u.push([[Math.round(v.x),y],[Math.round(S.x),y]])}y+=d,m.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return u})(a,o,i);if(s){for(const c of a)Eo(c,n,-s);(function(c,h,d){const f=[];c.forEach((u=>f.push(...u))),Eo(f,h,d)})(l,n,-s)}return l}function Ni(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),hv(e,s,i,o||1)}class Qn{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ni(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 po(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 cv extends Qn{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ni(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)po([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class dv extends Qn{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class uv{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ni(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=po(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let p=0;p<h;p++){const m=u+d+p*s,y=f-a+2*Math.random()*a,x=m-a+2*Math.random()*a,b=this.helper.ellipse(y,x,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class fv{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ni(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=po(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const p=u*(i+s),m=p+i,y=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),o}}class gv{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=Ni(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=po(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,u=2*(d+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],x=[m[0]+p*Math.cos(h+Math.PI/4),m[1]+p*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),s}}const Wt={};class pv{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const mv=0,$o=1,ch=2,Zi={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 Po(e,t){return e.type===t}function Jn(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:mv,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:$o,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:ch,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!Po(o,ch);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return Jn("M0,0"+e);s++,a=Zi[o.text],i=o.text}else Po(o,$o)?a=Zi[i]:(s++,a=Zi[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!Po(c,$o))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Zi[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function pg(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.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));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function mg(e){const t=[];let r="",i=0,s=0,o=0,a=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,[o,a]=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 d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=s+(s-l)):(d=i,f=s),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,f]=h;let u=0,p=0;r==="Q"||r==="T"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s);const m=i+2*(u-i)/3,y=s+2*(p-s)/3,x=d+2*(u-d)/3,b=f+2*(p-f)/3;t.push({key:"C",data:[m,y,x,b,d,f]}),n=u,l=p,i=d,s=f;break}case"Q":{const[d,f,u,p]=h,m=i+2*(d-i)/3,y=s+2*(f-s)/3,x=u+2*(d-u)/3,b=p+2*(f-p)/3;t.push({key:"C",data:[m,y,x,b,u,p]}),n=d,l=f,i=u,s=p;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],p=h[3],m=h[4],y=h[5],x=h[6];d===0||f===0?(t.push({key:"C",data:[i,s,y,x,y,x]}),i=y,s=x):(i!==y||s!==x)&&(yg(i,s,y,x,d,f,u,p,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function ii(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function yg(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],u=0,p=0,m=0,y=0;if(c)[u,p,m,y]=c;else{[e,t]=ii(e,t,-h),[r,i]=ii(r,i,-h);const j=(e-r)/2,I=(t-i)/2;let $=j*j/(s*s)+I*I/(o*o);$>1&&($=Math.sqrt($),s*=$,o*=$);const A=s*s,N=o*o,P=A*N-A*I*I-N*j*j,E=A*I*I+N*j*j,R=(n===l?-1:1)*Math.sqrt(Math.abs(P/E));m=R*s*I/o+(e+r)/2,y=R*-o*j/s+(t+i)/2,u=Math.asin(parseFloat(((t-y)/o).toFixed(9))),p=Math.asin(parseFloat(((i-y)/o).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(p=Math.PI-p),u<0&&(u=2*Math.PI+u),p<0&&(p=2*Math.PI+p),l&&u>p&&(u-=2*Math.PI),!l&&p>u&&(p-=2*Math.PI)}let x=p-u;if(Math.abs(x)>120*Math.PI/180){const j=p,I=r,$=i;p=l&&p>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=yg(r=m+s*Math.cos(p),i=y+o*Math.sin(p),I,$,s,o,a,0,l,[p,j,m,y])}x=p-u;const b=Math.cos(u),k=Math.sin(u),v=Math.cos(p),S=Math.sin(p),_=Math.tan(x/4),F=4/3*s*_,T=4/3*o*_,D=[e,t],M=[e+F*k,t-T*b],O=[r+F*S,i-T*v],X=[r,i];if(M[0]=2*D[0]-M[0],M[1]=2*D[1]-M[1],c)return[M,O,X].concat(f);{f=[M,O,X].concat(f);const j=[];for(let I=0;I<f.length;I+=3){const $=ii(f[I][0],f[I][1],h),A=ii(f[I+1][0],f[I+1][1],h),N=ii(f[I+2][0],f[I+2][1],h);j.push([$[0],$[1],A[0],A[1],N[0],N[1]])}return j}}const yv={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return Ws(e,t,r)},ellipse:function(e,t,r,i,s){const o=Cg(r,i,s);return Aa(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return qe(e,t,r,i,s,!0)}};function xg(e,t,r,i,s){return{type:"path",ops:qe(e,t,r,i,s)}}function ds(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...qe(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...qe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?xg(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function xv(e,t,r,i,s){return(function(o,a){return ds(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function dh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ki(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ki(r[0],1.5*(1+.22*t.roughness),gh(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Ki(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ki(a,1.5*(1+.22*t.roughness),gh(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 Cg(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=nt(a*l,r),n+=nt(n*l,r),{increment:o,rx:a,ry:n}}function Aa(e,t,r,i){const[s,o]=ph(i.increment,e,t,i.rx,i.ry,1,i.increment*Ws(.1,Ws(.4,1,r),r),r);let a=js(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=ph(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=js(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function uh(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=nt(.01*d,l),f+=nt(.01*f,l);let u=s,p=o;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(p-u)/2),x=mh(y,c,h,d,f,u,p,1,l);if(!l.disableMultiStroke){const b=mh(y,c,h,d,f,u,p,1.5,l);x.push(...b)}return a&&(n?x.push(...qe(c,h,c+d*Math.cos(u),h+f*Math.sin(u),l),...qe(c,h,c+d*Math.cos(p),h+f*Math.sin(p),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:x}}function fh(e,t){const r=mg(pg(Jn(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...qe(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,u]=n;i.push(...Cv(l,c,h,d,f,u,o,t)),o=[f,u];break}case"Z":i.push(...qe(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Io(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+nt(s,t),i[0][1]+nt(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+nt(s,t),i[a][1]+nt(s,t)]})}}return{type:"fillPath",ops:r}}function cr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Wt[s])switch(s){case"zigzag":Wt[s]||(Wt[s]=new cv(i));break;case"cross-hatch":Wt[s]||(Wt[s]=new dv(i));break;case"dots":Wt[s]||(Wt[s]=new uv(i));break;case"dashed":Wt[s]||(Wt[s]=new fv(i));break;case"zigzag-line":Wt[s]||(Wt[s]=new gv(i));break;default:s="hachure",Wt[s]||(Wt[s]=new Qn(i))}return Wt[s]})(t,yv).fillPolygons(e,t)}function gh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function bg(e){return e.randomizer||(e.randomizer=new pv(e.seed||0)),e.randomizer.next()}function Ws(e,t,r,i=1){return r.roughness*i*(bg(r)*(t-e)+e)}function nt(e,t,r=1){return Ws(-e,e,t,r)}function qe(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=Ea(e,t,r,i,s,!0,!1);if(a)return n;const l=Ea(e,t,r,i,s,!0,!0);return n.concat(l)}function Ea(e,t,r,i,s,o,a){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 d=h/2,f=.2+.2*bg(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,p=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=nt(u,s,c),p=nt(p,s,c);const m=[],y=()=>nt(d,s,c),x=()=>nt(h,s,c),b=s.preserveVertices;return a?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,s,c)),t+(b?0:nt(h,s,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*f+y(),p+t+(i-t)*f+y(),u+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*f+x(),p+t+(i-t)*f+x(),u+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function Ki(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+nt(t,r),e[s][1]+nt(t,r)]),s===e.length-1&&i.push([e[s][0]+nt(t,r),e[s][1]+nt(t,r)]);return js(i,null,r)}function js(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Ea(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function ph(e,t,r,i,s,o,a,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 d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}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=nt(.5,n)-Math.PI/2;c.push([nt(o,n)+t+.9*i*Math.cos(h-e),nt(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const u=[nt(o,n)+t+i*Math.cos(f),nt(o,n)+r+s*Math.sin(f)];l.push(u),c.push(u)}c.push([nt(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),nt(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([nt(o,n)+t+.98*i*Math.cos(h+a),nt(o,n)+r+.98*s*Math.sin(h+a)]),c.push([nt(o,n)+t+.9*i*Math.cos(h+.5*a),nt(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function mh(e,t,r,i,s,o,a,n,l){const c=o+nt(.1,l),h=[];h.push([nt(n,l)+t+.9*i*Math.cos(c-e),nt(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([nt(n,l)+t+i*Math.cos(d),nt(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),js(h,null,l)}function Cv(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:nt(c[0],n)),a[1]+(f?0:nt(c[0],n))]}),h=f?[s,o]:[s+nt(c[u],n),o+nt(c[u],n)],l.push({op:"bcurveTo",data:[e+nt(c[u],n),t+nt(c[u],n),r+nt(c[u],n),i+nt(c[u],n),h[0],h[1]]});return l}function si(e){return[...e]}function yh(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(si(e[0]),si(e[1]),si(e[2]),si(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(si(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function us(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function bv(e,t,r){const i=us(t,r);if(i===0)return us(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),us(e,Xe(t,r,s))}function Xe(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function $a(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let u=3*h[0]-2*c[0]-f[0];u*=u;let p=3*h[1]-2*c[1]-f[1];p*=p;let m=3*d[0]-2*f[0]-c[0];m*=m;let y=3*d[1]-2*f[1]-c[1];return y*=y,u<m&&(u=m),p<y&&(p=y),u+p})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(us(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=Xe(l,c,.5),u=Xe(c,h,.5),p=Xe(h,d,.5),m=Xe(f,u,.5),y=Xe(u,p,.5),x=Xe(m,y,.5);$a([l,f,m,x],0,r,s),$a([x,y,p,d],0,r,s)}var o,a;return s}function kv(e,t){return Hs(e,0,e.length,t)}function Hs(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=bv(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Hs(e,t,c+1,i,o),Hs(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Oo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)$a(e,3*o,t,i);return r&&r>0?Hs(i,0,i.length,r):i}const Yt="none";class Ys{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[xg(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=xv(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Io([c],a)):n.push(cr([c],a))}return a.stroke!==Yt&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Cg(i,s,a),c=Aa(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Aa(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(cr([c.estimatedPoints],a));return a.stroke!==Yt&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[ds(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=uh(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const u=uh(t,r,i,s,o,a,!0,!1,f);u.type="fillPath",h.push(u)}else h.push((function(f,u,p,m,y,x,b){const k=f,v=u;let S=Math.abs(p/2),_=Math.abs(m/2);S+=nt(.01*S,b),_+=nt(.01*_,b);let F=y,T=x;for(;F<0;)F+=2*Math.PI,T+=2*Math.PI;T-F>2*Math.PI&&(F=0,T=2*Math.PI);const D=(T-F)/b.curveStepCount,M=[];for(let O=F;O<=T;O+=D)M.push([k+S*Math.cos(O),v+_*Math.sin(O)]);return M.push([k+S*Math.cos(T),v+_*Math.sin(T)]),M.push([k,v]),cr([M],b)})(t,r,i,s,o,a,c));return c.stroke!==Yt&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=dh(t,i);if(i.fill&&i.fill!==Yt)if(i.fillStyle==="solid"){const a=dh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Oo(yh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Oo(yh(c),10,(1+i.roughness)/2))}a.length&&s.push(cr([a],i))}return i.stroke!==Yt&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=ds(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Io([t],i)):s.push(cr([t],i))),i.stroke!==Yt&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Yt,a=i.stroke!==Yt,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const u=mg(pg(Jn(h))),p=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...Oo(x,d)),x=[]},k=()=>{b(),m.length&&(p.push(m),m=[])};for(const{key:S,data:_}of u)switch(S){case"M":k(),y=[_[0],_[1]],m.push(y);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const F=m.length?m[m.length-1]:y;x.push([F[0],F[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(k(),!f)return p;const v=[];for(const S of p){const _=kv(S,f);_.length&&v.push(_)}return v})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=fh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=fh(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(Io(l,i));else s.push(cr(l,i));return a&&(n?l.forEach((h=>{s.push(ds(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Yt};break;case"fillPath":a={d:this.opsToPath(o),stroke:Yt,strokeWidth:0,fill:i.fill||Yt};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Yt,strokeWidth:i,fill:Yt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class wv{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,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 Qi="http://www.w3.org/2000/svg";class vv{constructor(t,r){this.svg=t,this.gen=new Ys(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Qi,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Qi,"path"),l.setAttribute("d",this.opsToPath(n,a)),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(Qi,"path"),l.setAttribute("d",this.opsToPath(n,a)),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&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Qi,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,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 tt={canvas:(e,t)=>new wv(e,t),svg:(e,t)=>new vv(e,t),generator:e=>new Ys(e),newSeed:()=>Ys.newSeed()},at=g(async(e,t,r)=>{let i;const s=t.useHtmlLabels||Ce(gt()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",Ft(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 he(a,Kt(Ne(n),gt()),{useHtmlLabels:s,width:t.width||gt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},gt());let d=h.getBBox();const f=(t?.padding??0)/2;if(s){const u=h.children[0],p=dt(h);await zn(u,n),d=u.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return s?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:f,label:a}},"labelHelper"),Ro=g(async(e,t,r)=>{const i=r.useHtmlLabels??Ot(gt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await he(s,Kt(Ne(t),gt()),{useHtmlLabels:i,width:r.width||gt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const n=r.padding/2;if(Ot(gt())){const l=o.children[0],c=dt(o);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),rt=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),st=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ft(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(ft,"createPathFromPoints");function ze(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,f=t+c/2;for(let u=0;u<=50;u++){const p=u/50,m=e+p*l,y=f+s*Math.sin(d*(m-e));a.push({x:m,y})}return a}g(ze,"generateFullSineWavePoints");function Mi(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(Mi,"generateCirclePoints");function Pa(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"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=g((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(Pa,"mergePaths");var Sv=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),hr=Sv,Tv=g(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=gt(),n=Ot(a);return await he(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Pe=Tv,We=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Bv=g(async(e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=et(t),f=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),u=Ce(r.flowchart.htmlLabels),p=t.direction==="LR",m=f.insert("g").attr("class","cluster-label swimlane-label"),y=await he(m,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let x=y.getBBox();if(u){const j=y.children[0],I=dt(y);x=j.getBoundingClientRect(),I.attr("width",x.width),I.attr("height",x.height)}const b=t.padding??0,k=t.width<=x.width+b?x.width+b:t.width;t.width<=x.width+b?t.diff=(k-t.width)/2-b:t.diff=-b;const v=t.height,S=t.y-v/2,_=t.y+v/2,F=t.x-k/2,T=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+v/3,D=p?4:0,M=x.height+2*D;let O,X;if(p){const j=Math.max(M,x.height+2*D),I=F+j,$=Math.max(0,k-j);if(t.look==="handDrawn"){const P=tt.svg(f),E=J(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),R=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),B=P.rectangle(F,S,j,v,E);O=f.insert(()=>B,":first-child");const H=P.rectangle(I,S,$,v,R);X=f.insert(()=>H,":first-child"),O.select("path:nth-child(2)").attr("style",h.join(";")),O.select("path").attr("style",d.join(";").replace("fill","stroke"))}else O=f.insert("rect",":first-child"),X=f.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",c).attr("x",F).attr("y",S).attr("width",j).attr("height",v).attr("fill",o).attr("stroke",n),X.attr("class","swimlane-body").attr("style",c).attr("x",I).attr("y",S).attr("width",$).attr("height",v).attr("fill","none").attr("stroke",n);const A=F+j/2,N=t.y;m.attr("transform",`translate(${A}, ${N}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const j=Math.max(0,T-S),I=Math.min(M,j),$=S+I,A=Math.max(0,_-$),N=t.x-k/2;if(t.look==="handDrawn"){const R=tt.svg(f),B=J(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),H=J(t,{roughness:.7,fill:"none",stroke:n,seed:s}),W=R.rectangle(N,S,k,I,B);O=f.insert(()=>W,":first-child");const G=R.rectangle(N,$,k,A,H);X=f.insert(()=>G,":first-child"),O.select("path:nth-child(2)").attr("style",h.join(";")),O.select("path").attr("style",d.join(";").replace("fill","stroke"))}else O=f.insert("rect",":first-child"),X=f.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",c).attr("x",N).attr("y",S).attr("width",k).attr("height",I).attr("fill",o).attr("stroke",n),X.attr("class","swimlane-body").attr("style",c).attr("x",N).attr("y",$).attr("width",k).attr("height",A).attr("fill","none").attr("stroke",n);const P=t.x-x.width/2,E=S+(I-x.height)/2;m.attr("transform",`translate(${P}, ${E})`)}if(U.trace("Swimlane data ",t,JSON.stringify(t)),l){const j=m.select("span");j&&j.attr("style",l)}return t.offsetX=0,t.width=k,t.height=v,t.offsetY=x.height-b/2,t.intersect=function(j){return hr(t,j)},{cluster:f,labelBBox:x}},"swimlane"),kg=g(async(e,t)=>{U.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=et(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Ot(r),u=d.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await he(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):p=await Pe(u,t.label,t.labelStyle||"",!1,!0);let m=p.getBBox();if(Ot(r)){const F=p.children[0],T=dt(p);m=F.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;U.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const F=tt.svg(d),T=J(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),D=F.path(We(b,k,y,x,0),T);v=d.insert(()=>(U.debug("Rough node insert CXC",D),D),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=d.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=ho(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const F=u.select("span");F&&F.attr("style",n)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return hr(t,F)},{cluster:d,labelBBox:m}},"rect"),_v=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return hr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Lv=g(async(e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,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"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const u=await Pe(d,t.label,t.labelStyle,void 0,!0);let p=u.getBBox();if(Ot(r)){const D=u.children[0],M=dt(u);p=D.getBoundingClientRect(),M.attr("width",p.width),M.attr("height",p.height)}const m=0*t.padding,y=m/2,x=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,k=t.height+m-p.height-6,v=t.x-x/2,S=t.y-b/2;t.width=x;const _=t.y-t.height/2-y+p.height+2;let F;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),M=tt.svg(c),O=t.rx||t.ry?M.path(We(v,S,x,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):M.rectangle(v,S,x,b,{seed:s});F=c.insert(()=>O,":first-child");const X=M.rectangle(v,_,x,k,{fill:D?o:a,fillStyle:D?"hachure":"solid",stroke:l,seed:s});F=c.insert(()=>O,":first-child"),f=c.insert(()=>X)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",v).attr("y",S).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",x).attr("height",k);d.attr("transform",`translate(${t.x-p.width/2}, ${S+1-(Ot(r)?0:3)})`);const T=F.node().getBBox();return t.height=T.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(D){return hr(t,D)},{cluster:c,labelBBox:p}},"roundedWithTitle"),Fv=g(async(e,t)=>{U.info("Creating subgraph rect for ",t.id,t);const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=et(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Ot(r),u=d.insert("g").attr("class","cluster-label "),p=await he(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=p.getBBox();if(Ot(r)){const F=p.children[0],T=dt(p);m=F.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,k=t.y-x/2;U.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const F=tt.svg(d),T=J(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),D=F.path(We(b,k,y,x,t.rx),T);v=d.insert(()=>(U.debug("Rough node insert CXC",D),D),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=d.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=ho(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const F=u.select("span");F&&F.attr("style",n)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(F){return hr(t,F)},{cluster:d,labelBBox:m}},"kanbanSection"),Mv=g((e,t)=>{const r=gt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=tt.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=u.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return hr(t,m)},{cluster:a,labelBBox:{}}},"divider"),Av=kg,Ev={rect:kg,squareRect:Av,roundedWithTitle:Lv,noteGroup:_v,divider:Mv,kanbanSection:Fv,swimlane:Bv},wg=new Map,vg=g(async(e,t)=>{const r=t.shape||"rect",i=await Ev[r](e,t);return wg.set(t.id,i),i},"insertCluster"),$v=g(()=>{wg=new Map},"clear");function Sg(e,t){return e.intersect(t)}g(Sg,"intersectNode");var Pv=Sg;function Tg(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}g(Tg,"intersectEllipse");var Bg=Tg;function _g(e,t,r){return Bg(e,t,t,r)}g(_g,"intersectCircle");var Iv=_g;function Lg(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&Ia(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+f,p=h*t.x+d*t.y+f;if(Math.abs(u)<c&&Math.abs(p)<c&&Ia(u,p))return;const m=s*d-h*o;if(m===0)return;const y=Math.abs(m/2);let x=o*f-d*a;const b=x<0?(x-y)/m:(x+y)/m;x=h*a-s*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:b,y:k}}}g(Lg,"intersectLine");function Ia(e,t){return e*t>0}g(Ia,"sameSign");var Ov=Lg;function Fg(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],u=Ov(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});u&&o.push(u)}return o.length?(o.length>1&&o.sort(function(h,d){let f=h.x-r.x,u=h.y-r.y,p=Math.sqrt(f*f+u*u),m=d.x-r.x,y=d.y-r.y,x=Math.sqrt(m*m+y*y);return p<x?-1:p===x?0:1}),o[0]):e}g(Fg,"intersectPolygon");var Rv=Fg,Q={node:Pv,circle:Iv,ellipse:Bg,polygon:Rv,rect:hr};function Mg(e,t){const{labelStyles:r}=et(t);t.labelStyle=r;const i=st(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=tt.svg(o),c=J(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Ft(n)),rt(t,d),t.intersect=function(f){return U.info("Circle intersect",t,a,f),Q.circle(t,a,f)},o}g(Mg,"anchor");function Oa(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,u=d/s,p=f/o,m=Math.sqrt(u**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*o*Math.sin(h)*(a?-1:1),b=c-y*s*Math.cos(h)*(a?-1:1),k=Math.atan2((t-b)/o,(e-x)/s);let S=Math.atan2((i-b)/o,(r-x)/s)-k;a&&S<0&&(S+=2*Math.PI),!a&&S>0&&(S-=2*Math.PI);const _=[];for(let F=0;F<20;F++){const T=F/19,D=k+T*S,M=x+s*Math.cos(D),O=b+o*Math.sin(D);_.push({x:M,y:O})}return _}g(Oa,"generateArcPoints");function Ag(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(Ag,"calculateArcSagitta");async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=g(D=>D+a,"calcTotalHeight"),l=g(D=>{const M=D/2;return[M/(2.5+D/50),M]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await at(e,t,st(t)),d=n(t?.height?t?.height:h.height),[f,u]=l(d),p=Ag(d,f,u),y=(t?.width?t?.width:h.width)+o*2+p-p,x=d,{cssStyles:b}=t,k=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...Oa(-y/2,-x/2,-y/2,x/2,f,u,!1),{x:y/2,y:x/2},...Oa(y/2,x/2,y/2,-x/2,f,u,!0)],v=tt.svg(c),S=J(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=ft(k),F=v.path(_,S),T=c.insert(()=>F,":first-child");return T.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${f/2}, 0)`),rt(t,T),t.intersect=function(D){return Q.polygon(t,k,D)},c}g(Eg,"bowTieRect");function Ee(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Ee,"insertPolygonShape");var Ji=12;async function $g(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+Ji),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,u=-h,p=0,m=[{x:d+Ji,y:u},{x:f,y:u},{x:f,y:p},{x:d,y:p},{x:d,y:u+Ji},{x:d+Ji,y:u}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=tt.svg(n),k=J(t,{}),v=ft(m),S=b.path(v,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&y.attr("style",x)}else y=Ee(n,c,h,m);return i&&y.attr("style",i),rt(t,y),t.intersect=function(b){return Q.polygon(t,m,b)},n}g($g,"card");function Pg(e,t){const{nodeStyles:r}=et(t);t.label="";const i=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=tt.svg(i),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ft(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return Q.polygon(t,a,f)},i}g(Pg,"choice");async function tl(e,t,r){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await at(e,t,st(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=tt.svg(o),p=J(t,{}),m=u.circle(0,0,h*2,p);d=o.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Ft(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return rt(t,d),t.calcIntersect=function(u,p){const m=u.width/2;return Q.circle(u,m,p)},t.intersect=function(u){return U.info("Circle intersect",t,h,u),Q.circle(t,h,u)},o}g(tl,"circle");function Ig(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
232
+ M ${s.x},${s.y} L ${a.x},${a.y}`}g(Ig,"createLine");function Og(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=tt.svg(s),l=J(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=Ig(o),d=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),rt(t,f),t.intersect=function(u){return U.info("crossedCircle intersect",t,{radius:o,point:u}),Q.circle(t,o,u)},s}g(Og,"crossedCircle");function Se(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(Se,"generateCirclePoints");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,st(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Se(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Se(c/2+d*2,-d,d,20,-180,-270),...Se(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Se(c/2,h/2,d,20,0,90)],p=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Se(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Se(c/2+c*.1,-d,d,20,-180,-270),...Se(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Se(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=tt.svg(s),y=J(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(u).replace("Z",""),k=m.path(b,y),v=ft(p),S=m.path(v,{...y}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,_),t.intersect=function(F){return Q.polygon(t,p,F)},s}g(Rg,"curlyBraceLeft");function Te(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:u,y:p})}return a}g(Te,"generateCirclePoints");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,st(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Te(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Te(c/2+d*2,-d,d,20,-180,-270),...Te(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Te(c/2,h/2,d,20,0,90)],p=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Te(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Te(c/2+d*2,-d,d,20,-180,-270),...Te(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Te(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=tt.svg(s),y=J(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=ft(u).replace("Z",""),k=m.path(b,y),v=ft(p),S=m.path(v,{...y}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,_),t.intersect=function(F){return Q.polygon(t,p,F)},s}g(Dg,"curlyBraceRight");function At(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(At,"generateCirclePoints");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,st(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...At(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...At(c/2+d*2,-d,d,20,-180,-270),...At(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...At(c/2,h/2,d,20,0,90)],p=[...At(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...At(-c/2-d/2,-d,d,20,0,90),...At(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...At(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...At(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...At(c/2+d*2,-d,d,20,-180,-270),...At(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...At(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...At(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...At(-c/2-d/2,-d,d,20,0,90),...At(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...At(-c/2+d+d/2,h/2,d,30,-180,-270)],y=tt.svg(s),x=J(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=ft(u).replace("Z",""),v=y.path(k,x),_=ft(p).replace("Z",""),F=y.path(_,x),T=ft(m),D=y.path(T,{...x}),M=s.insert("g",":first-child");return M.insert(()=>D,":first-child").attr("stroke-opacity",0),M.insert(()=>v,":first-child"),M.insert(()=>F,":first-child"),M.attr("class","text"),f&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),rt(t,M),t.intersect=function(O){return Q.polygon(t,m,O)},s}g(Ng,"curlyBraces");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await at(e,t,st(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),u=f/2,{cssStyles:p}=t,m=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=d,b=f,k=x-u,v=b/4,S=[{x:k,y:0},{x:v,y:0},{x:0,y:b/2},{x:v,y:b},{x:k,y:b},...Mi(-k,-b/2,u,50,270,90)],_=ft(S),F=m.path(_,y),T=c.insert(()=>F,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(${-d/2}, ${-f/2})`),rt(t,T),t.intersect=function(D){return Q.polygon(t,S,D)},c}g(qg,"curvedTrapezoid");var Dv=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Nv=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),qv=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),xh=8,Ch=8;async function zg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<Ch&&(t.width=Ch);const b=y/2/(2.5+y/50);t.height=(t.height??0)-o-b*3,t.height<xh&&(t.height=xh)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,st(t)),h=(t.width?t.width:l.width)+a,d=h/2,f=d/(2.5+h/50),u=(t.height?t.height:l.height)+o+f;let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=tt.svg(n),x=Nv(0,0,h,u,d,f),b=qv(0,f,h,u,d,f),k=J(t,{}),v=y.path(x,k),S=y.path(b,J(t,{fill:"none"}));p=n.insert(()=>S,":first-child"),p=n.insert(()=>v,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{const y=Dv(0,0,h,u,d,f);p=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Ft(m)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),rt(t,p),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const x=Q.rect(t,y),b=x.x-(t.x??0);if(d!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-b*b/(d*d));k>0&&(k=Math.sqrt(k)),k=f-k,y.y-(t.y??0)>0&&(k=-k),x.y+=k}return x},n}g(zg,"cylinder");async function Zr(e,t,r){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await at(e,t,st(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:u}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(f=r.rx,u=r.ry),t.look==="handDrawn"){const m=tt.svg(o),y=J(t,{}),x=f||u?m.path(We(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Ft(p))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Ft(f)).attr("ry",Ft(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return rt(t,d),t.calcIntersect=function(m,y){return Q.rect(m,y)},t.intersect=function(m){return Q.rect(t,m)},o}g(Zr,"drawRect");async function Wg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Zr(e,t,l);if(t.look==="handDrawn"){const u=tt.svg(c),p=J(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let x=null;if(y instanceof SVGGraphicsElement)x=y.getBBox();else return c;return c.insert(()=>u.line(x.x,x.y,x.x+x.width,x.y,p),".basic.label-container g.label"),c.insert(()=>u.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,p),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}g(Wg,"datastore");async function jg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=n.width+s,h=n.height+o,d=h*.2,f=-c/2,u=-h/2-d/2,{cssStyles:p}=t,m=tt.svg(a),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:f,y:u+d},{x:-f,y:u+d},{x:-f,y:-u},{x:f,y:-u},{x:f,y:u},{x:-f,y:u},{x:-f,y:u+d}],b=m.polygon(x.map(v=>[v.x,v.y]),y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),rt(t,k),t.intersect=function(v){return Q.rect(t,v)},a}g(jg,"dividedRectangle");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=et(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=tt.svg(n),p=J(t,{roughness:.2,strokeWidth:2.5}),m=J(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,p),x=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Ft(t.cssClasses)).attr("style",Ft(f)),d.node()?.appendChild(y),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),p=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return rt(t,d),t.intersect=function(u){return U.info("DoubleCircle intersect",t,c,u),Q.circle(t,c,u)},n}g(Hg,"doublecircle");function Yg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=tt.svg(o),{nodeBorder:c}=r,h=J(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=o.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),rt(t,f),t.intersect=function(u){return U.info("filledCircle intersect",t,{radius:a,point:u}),Q.circle(t,a,u)},o}g(Yg,"filledCircle");var bh=10,kh=10;async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<bh&&(t.height=bh),t.width=(t?.width??0)-o-o/2,t.width<kh&&(t.width=kh));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,p=tt.svg(a),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ft(f),x=p.path(y,m),b=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,rt(t,b),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(k){return U.info("Triangle intersect",t,f,k),Q.polygon(t,f,k)},a}g(Ug,"flippedTriangle");function Xg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=et(t);t.label="";const a=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,f=tt.svg(a),u=J(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=f.rectangle(h,d,l,c,u),m=a.insert(()=>p,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),rt(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return Q.rect(t,x)},a}g(Xg,"forkJoin");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await at(e,t,st(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,f=d/2,{cssStyles:u}=t,p=tt.svg(l),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...Mi(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],x=ft(y),b=p.path(x,m),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),rt(t,k),t.intersect=function(v){return U.info("Pill intersect",t,{radius:f,point:v}),Q.polygon(t,y,v)},l}g(Gg,"halfRoundedRectangle");var zv=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=et(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await at(e,t,st(t)),f=(t?.height?t?.height:d.height)+l,u=f/s,p=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:p-u,y:0},{x:p,y:-f/2},{x:p-u,y:-f},{x:u,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const b=tt.svg(h),k=J(t,{}),v=zv(0,0,p,f,u),S=b.path(v,k);y=h.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),x&&y.attr("style",x)}else y=Ee(h,p,f,m);return i&&y.attr("style",i),t.width=p,t.height=f,rt(t,y),t.intersect=function(b){return Q.polygon(t,m,b)},h}g(Vg,"hexagon");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await at(e,t,st(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=tt.svg(s),c=J(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=ft(h),f=l.path(d,c),u=s.insert(()=>f,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-o/2}, ${-a/2})`),rt(t,u),t.intersect=function(p){return U.info("Pill intersect",t,{points:h}),Q.polygon(t,h,p)},s}g(Zg,"hourglass");async function Kg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await at(e,t,"icon-shape default"),f=t.pos==="t",u=n,p=n,{nodeBorder:m}=r,{stylesMap:y}=Gr(t),x=-p/2,b=-u/2,k=t.label?8:0,v=tt.svg(c),S=J(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=v.rectangle(x,b,p,u,S),F=Math.max(p,h.width),T=u+h.height+k,D=v.rectangle(-F/2,-T/2,F,T,{...S,fill:"transparent",stroke:"none"}),M=c.insert(()=>_,":first-child"),O=c.insert(()=>D);if(t.icon){const X=c.append("g");X.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const j=X.node().getBBox(),I=j.width,$=j.height,A=j.x,N=j.y;X.attr("transform",`translate(${-I/2-A},${f?h.height/2+k/2-$/2-N:-h.height/2-k/2-$/2-N})`),X.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-T/2:T/2-h.height})`),M.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),rt(t,O),t.intersect=function(X){if(U.info("iconSquare intersect",t,X),!t.label)return Q.rect(t,X);const j=t.x??0,I=t.y??0,$=t.height??0;let A=[];return f?A=[{x:j-h.width/2,y:I-$/2},{x:j+h.width/2,y:I-$/2},{x:j+h.width/2,y:I-$/2+h.height+k},{x:j+p/2,y:I-$/2+h.height+k},{x:j+p/2,y:I+$/2},{x:j-p/2,y:I+$/2},{x:j-p/2,y:I-$/2+h.height+k},{x:j-h.width/2,y:I-$/2+h.height+k}]:A=[{x:j-p/2,y:I-$/2},{x:j+p/2,y:I-$/2},{x:j+p/2,y:I-$/2+u},{x:j+h.width/2,y:I-$/2+u},{x:j+h.width/2/2,y:I+$/2},{x:j-h.width/2,y:I+$/2},{x:j-h.width/2,y:I-$/2+u},{x:j-p/2,y:I-$/2+u}],Q.polygon(t,A,X)},c}g(Kg,"icon");async function Qg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await at(e,t,"icon-shape default"),f=20,u=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Gr(t),b=tt.svg(c),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=x.get("fill");k.stroke=v??y;const S=c.append("g");t.icon&&S.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),F=_.width,T=_.height,D=_.x,M=_.y,O=Math.max(F,T)*Math.SQRT2+f*2,X=b.circle(0,0,O,k),j=Math.max(O,h.width),I=O+h.height+u,$=b.rectangle(-j/2,-I/2,j,I,{...k,fill:"transparent",stroke:"none"}),A=c.insert(()=>X,":first-child"),N=c.insert(()=>$);return S.attr("transform",`translate(${-F/2-D},${p?h.height/2+u/2-T/2-M:-h.height/2-u/2-T/2-M})`),S.attr("style",`color: ${x.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-I/2:I/2-h.height})`),A.attr("transform",`translate(0,${p?h.height/2+u/2:-h.height/2-u/2})`),rt(t,N),t.intersect=function(P){return U.info("iconSquare intersect",t,P),Q.rect(t,P)},c}g(Qg,"iconCircle");async function Jg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await at(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Gr(t),k=-m/2,v=-p/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const T=b.get("fill");F.stroke=T??x;const D=_.path(We(k,v,m,p,5),F),M=Math.max(m,h.width),O=p+h.height+S,X=_.rectangle(-M/2,-O/2,M,O,{...F,fill:"transparent",stroke:"none"}),j=c.insert(()=>D,":first-child").attr("class","icon-shape2"),I=c.insert(()=>X);if(t.icon){const $=c.append("g");$.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=$.node().getBBox(),N=A.width,P=A.height,E=A.x,R=A.y;$.attr("transform",`translate(${-N/2-E},${u?h.height/2+S/2-P/2-R:-h.height/2-S/2-P/2-R})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),rt(t,I),t.intersect=function($){if(U.info("iconSquare intersect",t,$),!t.label)return Q.rect(t,$);const A=t.x??0,N=t.y??0,P=t.height??0;let E=[];return u?E=[{x:A-h.width/2,y:N-P/2},{x:A+h.width/2,y:N-P/2},{x:A+h.width/2,y:N-P/2+h.height+S},{x:A+m/2,y:N-P/2+h.height+S},{x:A+m/2,y:N+P/2},{x:A-m/2,y:N+P/2},{x:A-m/2,y:N-P/2+h.height+S},{x:A-h.width/2,y:N-P/2+h.height+S}]:E=[{x:A-m/2,y:N-P/2},{x:A+m/2,y:N-P/2},{x:A+m/2,y:N-P/2+p},{x:A+h.width/2,y:N-P/2+p},{x:A+h.width/2/2,y:N+P/2},{x:A-h.width/2,y:N+P/2},{x:A-h.width/2,y:N-P/2+p},{x:A-m/2,y:N-P/2+p}],Q.polygon(t,E,$)},c}g(Jg,"iconRounded");async function tp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=et(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await at(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Gr(t),k=-m/2,v=-p/2,S=t.label?8:0,_=tt.svg(c),F=J(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const T=b.get("fill");F.stroke=T??x;const D=_.path(We(k,v,m,p,.1),F),M=Math.max(m,h.width),O=p+h.height+S,X=_.rectangle(-M/2,-O/2,M,O,{...F,fill:"transparent",stroke:"none"}),j=c.insert(()=>D,":first-child"),I=c.insert(()=>X);if(t.icon){const $=c.append("g");$.html(`<g>${await Vr(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=$.node().getBBox(),N=A.width,P=A.height,E=A.x,R=A.y;$.attr("transform",`translate(${-N/2-E},${u?h.height/2+S/2-P/2-R:-h.height/2-S/2-P/2-R})`),$.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-O/2:O/2-h.height})`),j.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),rt(t,I),t.intersect=function($){if(U.info("iconSquare intersect",t,$),!t.label)return Q.rect(t,$);const A=t.x??0,N=t.y??0,P=t.height??0;let E=[];return u?E=[{x:A-h.width/2,y:N-P/2},{x:A+h.width/2,y:N-P/2},{x:A+h.width/2,y:N-P/2+h.height+S},{x:A+m/2,y:N-P/2+h.height+S},{x:A+m/2,y:N+P/2},{x:A-m/2,y:N+P/2},{x:A-m/2,y:N-P/2+h.height+S},{x:A-h.width/2,y:N-P/2+h.height+S}]:E=[{x:A-m/2,y:N-P/2},{x:A+m/2,y:N-P/2},{x:A+m/2,y:N-P/2+p},{x:A+h.width/2,y:N-P/2+p},{x:A+h.width/2/2,y:N+P/2},{x:A-h.width/2,y:N+P/2},{x:A-h.width/2,y:N-P/2+p},{x:A-m/2,y:N-P/2+p}],Q.polygon(t,E,$)},c}g(tp,"iconSquare");async function ep(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=et(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:u}=await at(e,t,"image-shape default"),p=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=tt.svg(d),k=J(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=b.rectangle(m,y,c,h,k),S=Math.max(c,f.width),_=h+f.height+x,F=b.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),T=d.insert(()=>v,":first-child"),D=d.insert(()=>F);if(t.img){const M=d.append("image");M.attr("href",t.img),M.attr("width",c),M.attr("height",h),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-c/2},${p?_/2-h:-_/2})`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),T.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),rt(t,D),t.intersect=function(M){if(U.info("iconSquare intersect",t,M),!t.label)return Q.rect(t,M);const O=t.x??0,X=t.y??0,j=t.height??0;let I=[];return p?I=[{x:O-f.width/2,y:X-j/2},{x:O+f.width/2,y:X-j/2},{x:O+f.width/2,y:X-j/2+f.height+x},{x:O+c/2,y:X-j/2+f.height+x},{x:O+c/2,y:X+j/2},{x:O-c/2,y:X+j/2},{x:O-c/2,y:X-j/2+f.height+x},{x:O-f.width/2,y:X-j/2+f.height+x}]:I=[{x:O-c/2,y:X-j/2},{x:O+c/2,y:X-j/2},{x:O+c/2,y:X-j/2+h},{x:O+f.width/2,y:X-j/2+h},{x:O+f.width/2/2,y:X+j/2},{x:O-f.width/2,y:X+j/2},{x:O-f.width/2,y:X-j/2+h},{x:O-c/2,y:X-j/2+h}],Q.polygon(t,I,M)},d}g(ep,"imageSquare");async function rp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(o??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ft(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&f.attr("style",u)}else f=Ee(n,c,h,d);return i&&f.attr("style",i),t.width=c,t.height=h,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(rp,"inv_trapezoid");async function ip(e,t){const{shapeSvg:r,bbox:i,label:s}=await at(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),rt(t,o),t.intersect=function(l){return Q.rect(t,l)},r}g(ip,"labelRect");async function sp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ft(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ee(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(sp,"lean_left");async function op(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ft(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ee(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(op,"lean_right");function ap(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",st(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=tt.svg(s),d=J(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=ft(c),u=h.path(f,d),p=s.insert(()=>u,":first-child");return p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${a/2},${-n})`),rt(t,p),t.intersect=function(m){return U.info("lightningBolt intersect",t,m),Q.polygon(t,c,m)},s}g(ap,"lightningBolt");var Wv=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),jv=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Hv=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),wh=10,vh=10;async function np(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<vh&&(t.width=vh);const k=x/2/(2.5+x/50);t.height=(t.height??0)-a-k*3,t.height<wh&&(t.height=wh)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,st(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,f=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+f+a*2,p=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const x=tt.svg(n),b=jv(0,0,h,u,d,f,p),k=Hv(0,f,h,u,d,f),v=J(t,{}),S=x.path(b,v),_=x.path(k,v);n.insert(()=>_,":first-child").attr("class","line"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const x=Wv(0,0,h,u,d,f,p);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Ft(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),rt(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(x){const b=Q.rect(t,x),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-f)){let v=f*f*(1-k*k/(d*d));v>0&&(v=Math.sqrt(v)),v=f-v,x.y-(t.y??0)>0&&(v=-v),b.y+=v}return b},n}g(np,"linedCylinder");async function lp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const v=t.width;t.width=(v??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await at(e,t,st(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,u=d+f,{cssStyles:p}=t,m=tt.svg(n),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...ze(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,f,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],b=m.polygon(x.map(v=>[v.x,v.y]),y),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),rt(t,k),t.intersect=function(v){return Q.polygon(t,x,v)},n}g(lp,"linedWaveEdgedRect");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,st(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,p=f-2*n,m=-u/2,y=-p/2,{cssStyles:x}=t,b=tt.svg(l),k=J(t,{}),v=[{x:m-n,y:y+n},{x:m-n,y:y+p+n},{x:m+u-n,y:y+p+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y:y+p-n},{x:m+u+n,y:y+p-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],S=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ft(v);let F=b.path(_,k);const T=ft(S);let D=b.path(T,k);t.look!=="handDrawn"&&(F=Pa(F),D=Pa(D));const M=l.insert("g",":first-child");return M.insert(()=>F),M.insert(()=>D),M.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&M.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))})`),rt(t,M),t.intersect=function(O){return Q.polygon(t,v,O)},l}g(hp,"multiRect");async function cp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,st(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?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,f=Math.max(o.height,t?.height??0)+c*3,u=t.look==="neo"?f/4:f/8,p=f+(h?u/2:-u/2),m=-d/2,y=-p/2,x=10,{cssStyles:b}=t,k=ze(m-x,y+p+x,m+d-x,y+p+x,u,.8),v=k?.[k.length-1],S=[{x:m-x,y:y+x},{x:m-x,y:y+p+x},...k,{x:m+d-x,y:v.y-x},{x:m+d,y:v.y-x},{x:m+d,y:v.y-2*x},{x:m+d+x,y:v.y-2*x},{x:m+d+x,y:y-x},{x:m+x,y:y-x},{x:m+x,y},{x:m,y},{x:m,y:y+x}],_=[{x:m,y:y+x},{x:m+d-x,y:y+x},{x:m+d-x,y:v.y-x},{x:m+d,y:v.y-x},{x:m+d,y},{x:m,y}],F=tt.svg(s),T=J(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const D=ft(S),M=F.path(D,T),O=ft(_),X=F.path(O,T),j=s.insert(()=>M,":first-child");return j.insert(()=>X),j.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-u/2-(o.y-(o.top??0))})`),rt(t,j),t.intersect=function(I){return Q.polygon(t,S,I)},s}g(cp,"multiWaveEdgedRectangle");async function dp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i,t.useHtmlLabels||Ot(Ct())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:u}=t,p=tt.svg(a),m=J(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=p.rectangle(d,f,c,h,m),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,x),t.intersect=function(b){return Q.rect(t,b)},a}g(dp,"note");var Yv=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function up(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await at(e,t,st(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+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 d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=tt.svg(s),p=J(t,{}),m=Yv(0,0,l),y=u.path(m,p);d=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=Ee(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),rt(t,d),t.calcIntersect=function(u,p){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=Q.polygon(u,y,p);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(up,"question");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await at(e,t,st(t)),h=(t?.width??l.width)+(t.look==="neo"?o*2:o),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),f=-h/2,u=-d/2,p=u/2,m=[{x:f+p,y:u},{x:f,y:0},{x:f+p,y:-u},{x:-f,y:-u},{x:-f,y:u}],{cssStyles:y}=t,x=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ft(m),v=x.path(k,b),S=n.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-p/2},0)`),c.attr("transform",`translate(${-p/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),rt(t,S),t.intersect=function(_){return Q.polygon(t,m,_)},n}g(fp,"rect_left_inv_arrow");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Pe(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Ot(gt())){const T=h.children[0],D=dt(h);d=T.getBoundingClientRect(),D.attr("width",d.width),D.attr("height",d.height)}U.info("Text 2",l);const f=l||[],u=h.getBBox(),p=await Pe(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=p.children[0],y=dt(p);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const x=(t.padding||0)/2;dt(p).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+x+5)+")"),dt(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),v=-d.width/2-x,S=-d.height/2-x;let _,F;if(t.look==="handDrawn"){const T=tt.svg(o),D=J(t,{}),M=T.path(We(v,S,b,k,t.rx||0),D),O=T.line(-d.width/2-x,-d.height/2-x+u.height+x,d.width/2+x,-d.height/2-x+u.height+x,D);F=o.insert(()=>(U.debug("Rough node insert CXC",M),O),":first-child"),_=o.insert(()=>(U.debug("Rough node insert CXC",M),M),":first-child")}else _=a.insert("rect",":first-child"),F=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),F.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+u.height+x).attr("y2",-d.height/2-x+u.height+x);return rt(t,_),t.intersect=function(T){return Q.rect(t,T)},o}g(gp,"rectWithTitle");async function pp(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Zr(e,t,s)}g(pp,"roundedRect");var He=8;async function mp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?He:He*2),h=(t?.height??n.height)+o*2,d=c-He,f=h,u=He-c/2,p=-h/2,{cssStyles:m}=t,y=tt.svg(a),x=J(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:u,y:p},{x:u+d,y:p},{x:u+d,y:p+f},{x:u-He,y:p+f},{x:u-He,y:p},{x:u,y:p},{x:u,y:p+f}],k=y.polygon(b.map(S=>[S.x,S.y]),x),v=a.insert(()=>k,":first-child");return v.attr("class","basic label-container outer-path").attr("style",Ft(m)),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${He/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,v),t.intersect=function(S){return Q.rect(t,S)},a}g(mp,"shadedProcess");async function yp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await at(e,t,st(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,u=d/1.5,p=-f/2,m=-u/2,{cssStyles:y}=t,x=tt.svg(n),b=J(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:p,y:m},{x:p,y:m+u},{x:p+f,y:m+u},{x:p+f,y:m-u/2}],v=ft(k),S=x.path(v,b),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),rt(t,_),t.intersect=function(F){return Q.polygon(t,k,F)},n}g(yp,"slopedRect");async function xp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Zr(e,t,o)}g(xp,"squareRect");async function Cp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:f}=t,u=tt.svg(n),p=J(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...Mi(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...Mi(h/2-d,0,d,50,270,450)],y=ft(m),x=u.path(y,p),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),rt(t,b),t.intersect=function(k){return Q.polygon(t,m,k)},n}g(Cp,"stadium");async function bp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Zr(e,t,r)}g(bp,"state");function kp(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,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),d=tt.svg(h),f=J(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const u=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),p=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>u,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const b=e.node()?.ownerSVGElement?.id??"",k=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${k})`)}return rt(t,x),t.intersect=function(b){return Q.circle(t,(t.width??0)/2,b)},h}g(kp,"stateEnd");function wp(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=tt.svg(o).circle(0,0,t.width,L2(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return rt(t,a),t.intersect=function(n){return Q.circle(t,(t.width??7)/2,n)},o}g(wp,"stateStart");var dr=8;async function vp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.width??l.width)+2*dr+o,h=(t?.height??l.height)+a,d=c-2*dr,f=h,u=-c/2,p=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=tt.svg(n),x=J(t,{}),b=y.rectangle(u,p,d+16,f,x),k=y.line(u+dr,p,u+dr,p+f,x),v=y.line(u+dr+d,p,u+dr+d,p+f,x);n.insert(()=>k,":first-child"),n.insert(()=>v,":first-child");const S=n.insert(()=>b,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ft(_)),rt(t,S)}else{const y=Ee(n,d,f,m);i&&y.attr("style",i),rt(t,y)}return t.intersect=function(y){return Q.polygon(t,m,y)},n}g(vp,"subroutine");var Do=.2;async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Do*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.height?t?.height:l.height)+a*2,h=Do*c,d=Do*c,u=(t?.width?t?.width:l.width)+o*2+h-h,p=c,m=-u/2,y=-p/2,{cssStyles:x}=t,b=tt.svg(n),k=J(t,{}),v=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+p},{x:m-h/2,y:y+p}],S=[{x:m+u-h/2,y:y+p},{x:m+u+h/2,y:y+p},{x:m+u+h/2,y:y+p-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ft(v),F=b.path(_,k),T=ft(S),D=b.path(T,{...k,fillStyle:"solid"}),M=n.insert(()=>D,":first-child");return M.insert(()=>F,":first-child"),M.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),rt(t,M),t.intersect=function(O){return Q.polygon(t,v,O)},n}g(Sp,"taggedRect");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await at(e,t,st(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:u}=t,p=tt.svg(s),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...ze(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,b=-f/2-d*.4,k=[{x:x+n-h,y:(b+l)*1.3},{x:x+n,y:b+l-d},{x:x+n,y:(b+l)*.9},...ze(x+n,(b+l)*1.25,x+n-h,(b+l)*1.3,-l*.02,.5)],v=ft(y),S=p.path(v,m),_=ft(k),F=p.path(_,{...m,fillStyle:"solid"}),T=s.insert(()=>F,":first-child");return T.insert(()=>S,":first-child"),T.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),rt(t,T),t.intersect=function(D){return Q.polygon(t,y,D)},s}g(Tp,"taggedWaveEdgedRectangle");async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await at(e,t,st(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/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",a).attr("height",n),rt(t,h),t.intersect=function(d){return Q.rect(t,d)},s}g(Bp,"text");var Uv=g((e,t,r,i,s,o)=>`M${e},${t}
233
233
  a${s},${o} 0,0,1 0,${-i}
234
234
  l${r},0
235
235
  a${s},${o} 0,0,1 0,${i}
236
236
  M${r},${-i}
237
237
  a${s},${o} 0,0,0 0,${i}
238
- l${-r},0`,"createCylinderPathD"),Uv=g((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Xv=g((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),vh=5,Sh=10;async function Bp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-o,t.height<vh&&(t.height=vh);const x=m/2/(2.5+m/50);t.width=(t.width??0)-o-x*3,t.width<Sh&&(t.width=Sh)}const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t.height?t.height:n.height)+o,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+o,{cssStyles:u}=t;let p;if(t.look==="handDrawn"){const m=tt.svg(a),y=Uv(0,0,f,c,d,h),x=Xv(0,0,f,c,d,h),b=m.path(y,J(t,{})),k=m.path(x,J(t,{fill:"none"}));p=a.insert(()=>k,":first-child"),p=a.insert(()=>b,":first-child"),p.attr("class","basic label-container"),u&&p.attr("style",u)}else{const m=Yv(0,0,f,c,d,h);p=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Ft(u)).attr("style",i),p.attr("class","basic label-container outer-path"),u&&p.selectAll("path").attr("style",u),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",d),p.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,p),t.intersect=function(m){const y=Q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}g(Bp,"tiltedCylinder");async function _p(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ut(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ae(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(_p,"trapezoid");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await at(e,t,ot(t)),d=(t?.width?t?.width:h.width)+o*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,p=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],x=ut(y),b=p.path(x,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),rt(t,k),t.intersect=function(v){return Q.polygon(t,y,v)},c}g(Lp,"trapezoidalPentagon");var Th=10,Bh=10;async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<Bh&&(t.width=Bh),t.height=t?.height??0,t.height<Th&&(t.height=Th));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=Ce(gt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:p}=t,m=tt.svg(a),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=ut(u),b=m.path(x,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,rt(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(v){return Y.info("Triangle intersect",t,u,v),Q.polygon(t,u,v)},a}g(Fp,"triangle");async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,ot(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?f/4:f/8,p=f+(n?u:-u),{cssStyles:m}=t,x=14-d,b=x>0?x/2:0,k=tt.svg(l),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=[{x:-d/2-b,y:p/2},...qe(-d/2-b,p/2,d/2+b,p/2,u,.8),{x:d/2+b,y:-p/2},{x:-d/2-b,y:-p/2}],_=ut(S),F=k.path(_,v),T=l.insert(()=>F,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-u-(c.y-(c.top??0))})`),rt(t,T),t.intersect=function(M){return Q.polygon(t,S,M)},l}g(Mp,"waveEdgedRectangle");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const v=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-v*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await at(e,t,ot(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:u}=t,p=tt.svg(n),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:f/2},...qe(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...qe(c/2,-f/2,-c/2,-f/2,d,-1)],x=ut(y),b=p.path(x,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),rt(t,k),t.intersect=function(v){return Q.polygon(t,y,v)},n}g(Ap,"waveRectangle");var bt=10;async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-bt,10),t.height=Math.max((t?.height??0)-o*2-bt,10));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,ot(t)),c=(t?.width?t?.width:n.width)+s*2+bt,h=(t?.height?t?.height:n.height)+o*2+bt,d=c-bt,f=h-bt,u=-d/2,p=-f/2,{cssStyles:m}=t,y=tt.svg(a),x=J(t,{}),b=[{x:u-bt,y:p-bt},{x:u-bt,y:p+f},{x:u+d,y:p+f},{x:u+d,y:p-bt}],k=`M${u-bt},${p-bt} L${u+d},${p-bt} L${u+d},${p+f} L${u-bt},${p+f} L${u-bt},${p-bt}
238
+ l${-r},0`,"createCylinderPathD"),Xv=g((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Gv=g((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Sh=5,Th=10;async function _p(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-o,t.height<Sh&&(t.height=Sh);const x=m/2/(2.5+m/50);t.width=(t.width??0)-o-x*3,t.width<Th&&(t.width=Th)}const{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=(t.height?t.height:n.height)+o,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+o,{cssStyles:u}=t;let p;if(t.look==="handDrawn"){const m=tt.svg(a),y=Xv(0,0,f,c,d,h),x=Gv(0,0,f,c,d,h),b=m.path(y,J(t,{})),k=m.path(x,J(t,{fill:"none"}));p=a.insert(()=>k,":first-child"),p=a.insert(()=>b,":first-child"),p.attr("class","basic label-container"),u&&p.attr("style",u)}else{const m=Uv(0,0,f,c,d,h);p=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Ft(u)).attr("style",i),p.attr("class","basic label-container outer-path"),u&&p.selectAll("path").attr("style",u),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",d),p.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),rt(t,p),t.intersect=function(m){const y=Q.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let b=d*d*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},a}g(_p,"tiltedCylinder");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=tt.svg(n),m=J(t,{}),y=ft(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Ee(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,rt(t,f),t.intersect=function(p){return Q.polygon(t,d,p)},n}g(Lp,"trapezoid");async function Fp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await at(e,t,st(t)),d=(t?.width?t?.width:h.width)+o*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,p=tt.svg(c),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],x=ft(y),b=p.path(x,m),k=c.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),rt(t,k),t.intersect=function(v){return Q.polygon(t,y,v)},c}g(Fp,"trapezoidalPentagon");var Bh=10,_h=10;async function Mp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<_h&&(t.width=_h),t.height=t?.height??0,t.height<Bh&&(t.height=Bh));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=Ce(gt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:p}=t,m=tt.svg(a),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=ft(u),b=m.path(x,y),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,rt(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(v){return U.info("Triangle intersect",t,u,v),Q.polygon(t,u,v)},a}g(Mp,"triangle");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await at(e,t,st(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?f/4:f/8,p=f+(n?u:-u),{cssStyles:m}=t,x=14-d,b=x>0?x/2:0,k=tt.svg(l),v=J(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=[{x:-d/2-b,y:p/2},...ze(-d/2-b,p/2,d/2+b,p/2,u,.8),{x:d/2+b,y:-p/2},{x:-d/2-b,y:-p/2}],_=ft(S),F=k.path(_,v),T=l.insert(()=>F,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-u-(c.y-(c.top??0))})`),rt(t,T),t.intersect=function(D){return Q.polygon(t,S,D)},l}g(Ap,"waveEdgedRectangle");async function Ep(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const v=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-v*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await at(e,t,st(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:u}=t,p=tt.svg(n),m=J(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:f/2},...ze(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...ze(c/2,-f/2,-c/2,-f/2,d,-1)],x=ft(y),b=p.path(x,m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),rt(t,k),t.intersect=function(v){return Q.polygon(t,y,v)},n}g(Ep,"waveRectangle");var bt=10;async function $p(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-bt,10),t.height=Math.max((t?.height??0)-o*2-bt,10));const{shapeSvg:a,bbox:n,label:l}=await at(e,t,st(t)),c=(t?.width?t?.width:n.width)+s*2+bt,h=(t?.height?t?.height:n.height)+o*2+bt,d=c-bt,f=h-bt,u=-d/2,p=-f/2,{cssStyles:m}=t,y=tt.svg(a),x=J(t,{}),b=[{x:u-bt,y:p-bt},{x:u-bt,y:p+f},{x:u+d,y:p+f},{x:u+d,y:p-bt}],k=`M${u-bt},${p-bt} L${u+d},${p-bt} L${u+d},${p+f} L${u-bt},${p+f} L${u-bt},${p-bt}
239
239
  M${u-bt},${p} L${u+d},${p}
240
- M${u},${p-bt} L${u},${p+f}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const v=y.path(k,x),S=a.insert(()=>v,":first-child");return S.attr("transform",`translate(${bt/2}, ${bt/2})`),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(${-(n.width/2)+bt/2-(n.x-(n.left??0))}, ${-(n.height/2)+bt/2-(n.y-(n.top??0))})`),rt(t,S),t.intersect=function(_){return Q.polygon(t,b,_)},a}g(Ep,"windowPane");var _h=new Set(["redux-color","redux-dark-color"]),Gv=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function tl(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Ct(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:K}=Ct(),{background:Z}=K,st={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Z}`]};await tl(e,st)}const c=Ct();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:p}=et(t);if(r.attributes.length===0&&t.label){const K={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};me(t.label,c)+K.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Z=await Zr(e,t,K);if(i!=null&&_h.has(i)){const st=r.colorIndex??0;Z.attr("data-color-id",`color-${st%l.length}`)}if(!Ce(c.htmlLabels)){const st=Z.select("text"),ft=st.node()?.getBBox();st.attr("transform",`translate(${-ft.width/2}, 0)`)}return Z}c.htmlLabels||(h*=1.25,d*=1.25);let m=ot(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await fr(y,t.label??"",c,0,0,["name"],u);x.height+=d;let b=0;const k=[],v=[];let S=0,_=0,F=0,T=0,M=!0,P=!0;for(const K of r.attributes){const Z=await fr(y,K.type,c,0,b,["attribute-type"],u);S=Math.max(S,Z.width+h);const st=await fr(y,K.name,c,0,b,["attribute-name"],u);_=Math.max(_,st.width+h);const ft=await fr(y,K.keys.join(),c,0,b,["attribute-keys"],u);F=Math.max(F,ft.width+h);const dt=await fr(y,K.comment,c,0,b,["attribute-comment"],u);T=Math.max(T,dt.width+h);const pt=Math.max(Z.height,st.height,ft.height,dt.height)+d;v.push({yOffset:b,rowHeight:pt}),b+=pt}let O=4;F<=h&&(M=!1,F=0,O--),T<=h&&(P=!1,T=0,O--);const X=y.node().getBBox();if(x.width+h*2-(S+_+F+T)>0){const K=x.width+h*2-(S+_+F+T);S+=K/O,_+=K/O,F>0&&(F+=K/O),T>0&&(T+=K/O)}const j=S+_+F+T,R=tt.svg(y),$=J(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let A=0;v.length>0&&(A=v.reduce((K,Z)=>K+(Z?.rowHeight??0),0));const N=Math.max(X.width+h*2,t?.width||0,j),I=Math.max((A??0)+x.height,t?.height||0),E=-N/2,D=-I/2;if(y.selectAll("g:not(:first-child)").each((K,Z,st)=>{const ft=ct(st[Z]),dt=ft.attr("transform");let pt=0,_t=0;if(dt){const Yt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(dt);Yt&&(pt=parseFloat(Yt[1]),_t=parseFloat(Yt[2]),ft.attr("class").includes("attribute-name")?pt+=S:ft.attr("class").includes("attribute-keys")?pt+=S+_:ft.attr("class").includes("attribute-comment")&&(pt+=S+_+F))}ft.attr("transform",`translate(${E+h/2+pt}, ${_t+D+x.height+d/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(D+d/2)+")"),i!=null&&_h.has(i)){const K=r.colorIndex??0;y.attr("data-color-id",`color-${K%l.length}`)}const B=R.rectangle(E,D,N,I,$),U=y.insert(()=>B,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[K,Z]of v.entries()){const ft=(K+1)%2===0&&Z.yOffset!==0,dt=R.rectangle(E,x.height+D+Z?.yOffset,N,Z?.rowHeight,{...$,fill:ft?o:a,stroke:n});y.insert(()=>dt,"g.label").attr("style",f.join("")).attr("class",`row-rect-${ft?"even":"odd"}`)}const W=1e-4;let G=gr(E,x.height+D,N+E,x.height+D,W),V=R.polygon(G.map(K=>[K.x,K.y]),$);if(y.insert(()=>V).attr("class","divider"),G=gr(S+E,x.height+D,S+E,I+D,W),V=R.polygon(G.map(K=>[K.x,K.y]),$),y.insert(()=>V).attr("class","divider"),M){const K=S+_+E;G=gr(K,x.height+D,K,I+D,W),V=R.polygon(G.map(Z=>[Z.x,Z.y]),$),y.insert(()=>V).attr("class","divider")}if(P){const K=S+_+F+E;G=gr(K,x.height+D,K,I+D,W),V=R.polygon(G.map(Z=>[Z.x,Z.y]),$),y.insert(()=>V).attr("class","divider")}for(const K of k){const Z=x.height+D+K;G=gr(E,Z,N+E,Z,W),V=R.polygon(G.map(st=>[st.x,st.y]),$),y.insert(()=>V).attr("class","divider")}if(rt(t,U),p&&t.look!=="handDrawn")if(i!=null&&Gv.has(i))y.selectAll("path").attr("style",p);else{const Z=p.split(";")?.filter(st=>st.includes("stroke"))?.map(st=>`${st}`).join("; ");y.selectAll("path").attr("style",Z??""),y.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(K){return Q.rect(t,K)},y}g(tl,"erBox");async function fr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Ho(t)&&(t=Ho(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await he(n,t,{width:me(t,r)+100,style:a,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(Ce(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=ct(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}g(fr,"addText");function gr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(gr,"lineToPolygon");async function $p(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",ot(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ui(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await ui(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await ui(c,b,m,[b.parseClassifier()]);m+=k+o}u=c.node().getBBox().height,u<=0&&(u=s/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await ui(h,b,y,[b.parseClassifier()]);y+=k+o}let x=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(u?u+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}g($p,"textHelper");async function ui(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Ct();let a="useHtmlLabels"in t?t.useHtmlLabels:Ce(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Rr(n)&&(a=!0);const l=await he(s,nn(De(n)),{width:me(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],f=ct(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const p=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",p){const b=o.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,v=parseInt(b,10)*5+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}g(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ct(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(ui,"addText");async function Ip(e,t){const r=gt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??Ce(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await $p(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=et(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const v=-x/2,S=-b/2;let _=p?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(_=o*2);const F=m.rectangle(v-o,S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,b+2*o+_,y),T=c.insert(()=>F,":first-child");T.attr("class","basic label-container outer-path");const M=T.node().getBBox(),P=c.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,O=c.select(".label-group").node().getBBox().height-(p?o/2:0)||0,X=c.select(".members-group").node().getBBox().height-(p?o/2:0)||0,j=(P+O+S+o-(S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((R,$,A)=>{const N=ct(A[$]),I=N.attr("transform");let E=0;if(I){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);W&&(E=parseFloat(W[2]))}let D=E+S+o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(N.attr("class").includes("methods-group")){const U=Math.max(X,a/2);k?D=Math.max(j,P+O+U+S+a*2+o)+a*2:D=P+O+U+S+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?D=E-a:D=E),n||(D-=4);let B=v;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(B=-N.node()?.getBBox().width/2||0,c.selectAll("text").each(function(U,W,G){window.getComputedStyle(G[W]).textAnchor==="middle"&&(B=0)})),N.attr("transform",`translate(${B}, ${D})`)}),l.members.length>0||l.methods.length>0||p){const R=P+O+S+o,$=m.line(M.x,R,M.x+M.width,R+.001,y);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(p||l.members.length>0||l.methods.length>0){const R=P+O+X+S+a*2+o,$=m.line(M.x,k?Math.max(j,R):R,M.x+M.width,(k?Math.max(j,R):R)+.001,y);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),T.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const R=RegExp(/color\s*:\s*([^;]*)/),$=R.exec(u);if($){const A=$[0].replace("color","fill");c.selectAll("tspan").attr("style",A)}else if(d){const A=R.exec(d);if(A){const N=A[0].replace("color","fill");c.selectAll("tspan").attr("style",N)}}}return rt(t,T),t.intersect=function(R){return Q.rect(t,R)},c}g(Ip,"classBox");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=ot(t),{themeVariables:h}=gt(),{borderColorArray:d,requirementEdgeLabelBackground:f}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let p;l?p=await de(u,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):p=await de(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=p;const y=await de(u,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const M=await de(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=M;const P=await de(u,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=P;const O=await de(u,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=O,await de(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const M=await de(u,`${o.type?`Type: ${o.type}`:""}`,m,t.labelStyle);m+=M,await de(u,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,m,t.labelStyle)}const x=(u.node()?.getBBox().width??200)+a,b=(u.node()?.getBBox().height??200)+a,k=-x/2,v=-b/2,S=tt.svg(u),_=J(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=S.rectangle(k,v,x,b,_),T=u.insert(()=>F,":first-child");if(T.attr("class","basic label-container outer-path").attr("style",i),d?.length){const M=t.colorIndex??0;u.attr("data-color-id",`color-${M%d.length}`)}if(u.selectAll(".label").each((M,P,O)=>{const X=ct(O[P]),j=X.attr("transform");let R=0,$=0;if(j){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);E&&(R=parseFloat(E[1]),$=parseFloat(E[2]))}const A=$-b/2;let N=k+a/2;(P===0||P===1)&&(N=R),X.attr("transform",`translate(${N}, ${A+a})`)}),m>p+y+n){const M=v+p+y+n;let P;if(t.look==="neo"){const j=[[k,M],[k+x,M],[k+x,M+.001],[k,M+.001]];P=S.polygon(j,_)}else P=S.line(k,M,k+x,M,_);u.insert(()=>P).attr("class","divider")}return rt(t,T),t.intersect=function(M){return Q.rect(t,M)},i&&t.look!=="handDrawn"&&(f||d?.length)&&u.selectAll("path").attr("style",i),u}g(Pp,"requirementBox");async function de(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=gt(),a=o.htmlLabels??!0,n=await he(s,nn(De(t)),{width:me(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let l;if(a){const c=n.children[0],h=ct(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(de,"addText");var Vv=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Op(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await at(e,t,ot(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;f?{label:p,bbox:m}=await Oo(f,"ticket"in t&&t.ticket||"",u):{label:p,bbox:m}=await Oo(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:x}=await Oo(n,"assigned"in t&&t.assigned||"",u);t.width=a;const b=10,k=t?.width||0,v=Math.max(m.height,x.height)/2,S=Math.max(l.height+b*2,t?.height||0)+v,_=-k/2,F=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-v-l.height/2)+")"),p.attr("transform","translate("+(h-k/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-x.width-2*o)+", "+(-v+l.height/2)+")");let T;const{rx:M,ry:P}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const X=tt.svg(n),j=J(t,{}),R=M||P?X.path(ze(_,F,k,S,M||0),j):X.rectangle(_,F,k,S,j);T=n.insert(()=>R,":first-child"),T.attr("class","basic label-container").attr("style",O||null)}else{T=n.insert("rect",":first-child"),T.attr("class","basic label-container __APA__").attr("style",s).attr("rx",M??5).attr("ry",P??5).attr("x",_).attr("y",F).attr("width",k).attr("height",S);const X="priority"in t&&t.priority;if(X){const j=n.append("line"),R=_+2,$=F+Math.floor((M??0)/2),A=F+S-Math.floor((M??0)/2);j.attr("x1",R).attr("y1",$).attr("x2",R).attr("y2",A).attr("stroke-width","4").attr("stroke",Vv(X))}}return rt(t,T),t.height=S,t.intersect=function(X){return Q.rect(t,X)},n}g(Op,"kanbanItem");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,ot(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,f=o.width+20,u=o.height+20,p=Math.max(l,f),m=Math.max(c,u);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let y;const x=`M0 0
240
+ M${u},${p-bt} L${u},${p+f}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const v=y.path(k,x),S=a.insert(()=>v,":first-child");return S.attr("transform",`translate(${bt/2}, ${bt/2})`),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(${-(n.width/2)+bt/2-(n.x-(n.left??0))}, ${-(n.height/2)+bt/2-(n.y-(n.top??0))})`),rt(t,S),t.intersect=function(_){return Q.polygon(t,b,_)},a}g($p,"windowPane");var Lh=new Set(["redux-color","redux-dark-color"]),Vv=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function el(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Ct(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Z}=Ct(),{background:K}=Z,ot={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${K}`]};await el(e,ot)}const c=Ct();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:p}=et(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};me(t.label,c)+Z.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const K=await Zr(e,t,Z);if(i!=null&&Lh.has(i)){const ot=r.colorIndex??0;K.attr("data-color-id",`color-${ot%l.length}`)}if(!Ce(c.htmlLabels)){const ot=K.select("text"),ct=ot.node()?.getBBox();ot.attr("transform",`translate(${-ct.width/2}, 0)`)}return K}c.htmlLabels||(h*=1.25,d*=1.25);let m=st(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await fr(y,t.label??"",c,0,0,["name"],u);x.height+=d;let b=0;const k=[],v=[];let S=0,_=0,F=0,T=0,D=!0,M=!0;for(const Z of r.attributes){const K=await fr(y,Z.type,c,0,b,["attribute-type"],u);S=Math.max(S,K.width+h);const ot=await fr(y,Z.name,c,0,b,["attribute-name"],u);_=Math.max(_,ot.width+h);const ct=await fr(y,Z.keys.join(),c,0,b,["attribute-keys"],u);F=Math.max(F,ct.width+h);const ut=await fr(y,Z.comment,c,0,b,["attribute-comment"],u);T=Math.max(T,ut.width+h);const mt=Math.max(K.height,ot.height,ct.height,ut.height)+d;v.push({yOffset:b,rowHeight:mt}),b+=mt}let O=4;F<=h&&(D=!1,F=0,O--),T<=h&&(M=!1,T=0,O--);const X=y.node().getBBox();if(x.width+h*2-(S+_+F+T)>0){const Z=x.width+h*2-(S+_+F+T);S+=Z/O,_+=Z/O,F>0&&(F+=Z/O),T>0&&(T+=Z/O)}const j=S+_+F+T,I=tt.svg(y),$=J(t,{});t.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let A=0;v.length>0&&(A=v.reduce((Z,K)=>Z+(K?.rowHeight??0),0));const N=Math.max(X.width+h*2,t?.width||0,j),P=Math.max((A??0)+x.height,t?.height||0),E=-N/2,R=-P/2;if(y.selectAll("g:not(:first-child)").each((Z,K,ot)=>{const ct=dt(ot[K]),ut=ct.attr("transform");let mt=0,wt=0;if(ut){const Gt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ut);Gt&&(mt=parseFloat(Gt[1]),wt=parseFloat(Gt[2]),ct.attr("class").includes("attribute-name")?mt+=S:ct.attr("class").includes("attribute-keys")?mt+=S+_:ct.attr("class").includes("attribute-comment")&&(mt+=S+_+F))}ct.attr("transform",`translate(${E+h/2+mt}, ${wt+R+x.height+d/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(R+d/2)+")"),i!=null&&Lh.has(i)){const Z=r.colorIndex??0;y.attr("data-color-id",`color-${Z%l.length}`)}const B=I.rectangle(E,R,N,P,$),H=y.insert(()=>B,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Z,K]of v.entries()){const ct=(Z+1)%2===0&&K.yOffset!==0,ut=I.rectangle(E,x.height+R+K?.yOffset,N,K?.rowHeight,{...$,fill:ct?o:a,stroke:n});y.insert(()=>ut,"g.label").attr("style",f.join("")).attr("class",`row-rect-${ct?"even":"odd"}`)}const W=1e-4;let G=gr(E,x.height+R,N+E,x.height+R,W),V=I.polygon(G.map(Z=>[Z.x,Z.y]),$);if(y.insert(()=>V).attr("class","divider"),G=gr(S+E,x.height+R,S+E,P+R,W),V=I.polygon(G.map(Z=>[Z.x,Z.y]),$),y.insert(()=>V).attr("class","divider"),D){const Z=S+_+E;G=gr(Z,x.height+R,Z,P+R,W),V=I.polygon(G.map(K=>[K.x,K.y]),$),y.insert(()=>V).attr("class","divider")}if(M){const Z=S+_+F+E;G=gr(Z,x.height+R,Z,P+R,W),V=I.polygon(G.map(K=>[K.x,K.y]),$),y.insert(()=>V).attr("class","divider")}for(const Z of k){const K=x.height+R+Z;G=gr(E,K,N+E,K,W),V=I.polygon(G.map(ot=>[ot.x,ot.y]),$),y.insert(()=>V).attr("class","divider")}if(rt(t,H),p&&t.look!=="handDrawn")if(i!=null&&Vv.has(i))y.selectAll("path").attr("style",p);else{const K=p.split(";")?.filter(ot=>ot.includes("stroke"))?.map(ot=>`${ot}`).join("; ");y.selectAll("path").attr("style",K??""),y.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(Z){return Q.rect(t,Z)},y}g(el,"erBox");async function fr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Yo(t)&&(t=Yo(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await he(n,t,{width:me(t,r)+100,style:a,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(Ce(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=dt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}g(fr,"addText");function gr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(gr,"lineToPolygon");async function Pp(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",st(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await ui(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await ui(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const k=await ui(c,b,m,[b.parseClassifier()]);m+=k+o}u=c.node().getBBox().height,u<=0&&(u=s/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const k=await ui(h,b,y,[b.parseClassifier()]);y+=k+o}let x=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(u?u+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}g(Pp,"textHelper");async function ui(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Ct();let a="useHtmlLabels"in t?t.useHtmlLabels:Ce(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),Rr(n)&&(a=!0);const l=await he(s,ln(Ne(n)),{width:me(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],f=dt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const p=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",p){const b=o.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,v=parseInt(b,10)*5+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}g(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&dt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(ui,"addText");async function Ip(e,t){const r=gt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??Ce(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Pp(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=et(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=tt.svg(c),y=J(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const v=-x/2,S=-b/2;let _=p?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(_=o*2);const F=m.rectangle(v-o,S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,b+2*o+_,y),T=c.insert(()=>F,":first-child");T.attr("class","basic label-container outer-path");const D=T.node().getBBox(),M=c.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,O=c.select(".label-group").node().getBBox().height-(p?o/2:0)||0,X=c.select(".members-group").node().getBBox().height-(p?o/2:0)||0,j=(M+O+S+o-(S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((I,$,A)=>{const N=dt(A[$]),P=N.attr("transform");let E=0;if(P){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(P);W&&(E=parseFloat(W[2]))}let R=E+S+o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(N.attr("class").includes("methods-group")){const H=Math.max(X,a/2);k?R=Math.max(j,M+O+H+S+a*2+o)+a*2:R=M+O+H+S+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?R=E-a:R=E),n||(R-=4);let B=v;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(B=-N.node()?.getBBox().width/2||0,c.selectAll("text").each(function(H,W,G){window.getComputedStyle(G[W]).textAnchor==="middle"&&(B=0)})),N.attr("transform",`translate(${B}, ${R})`)}),l.members.length>0||l.methods.length>0||p){const I=M+O+S+o,$=m.line(D.x,I,D.x+D.width,I+.001,y);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(p||l.members.length>0||l.methods.length>0){const I=M+O+X+S+a*2+o,$=m.line(D.x,k?Math.max(j,I):I,D.x+D.width,(k?Math.max(j,I):I)+.001,y);c.insert(()=>$).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),T.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const I=RegExp(/color\s*:\s*([^;]*)/),$=I.exec(u);if($){const A=$[0].replace("color","fill");c.selectAll("tspan").attr("style",A)}else if(d){const A=I.exec(d);if(A){const N=A[0].replace("color","fill");c.selectAll("tspan").attr("style",N)}}}return rt(t,T),t.intersect=function(I){return Q.rect(t,I)},c}g(Ip,"classBox");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=st(t),{themeVariables:h}=gt(),{borderColorArray:d,requirementEdgeLabelBackground:f}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let p;l?p=await de(u,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):p=await de(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=p;const y=await de(u,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const D=await de(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=D;const M=await de(u,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=M;const O=await de(u,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=O,await de(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const D=await de(u,`${o.type?`Type: ${o.type}`:""}`,m,t.labelStyle);m+=D,await de(u,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,m,t.labelStyle)}const x=(u.node()?.getBBox().width??200)+a,b=(u.node()?.getBBox().height??200)+a,k=-x/2,v=-b/2,S=tt.svg(u),_=J(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=S.rectangle(k,v,x,b,_),T=u.insert(()=>F,":first-child");if(T.attr("class","basic label-container outer-path").attr("style",i),d?.length){const D=t.colorIndex??0;u.attr("data-color-id",`color-${D%d.length}`)}if(u.selectAll(".label").each((D,M,O)=>{const X=dt(O[M]),j=X.attr("transform");let I=0,$=0;if(j){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(j);E&&(I=parseFloat(E[1]),$=parseFloat(E[2]))}const A=$-b/2;let N=k+a/2;(M===0||M===1)&&(N=I),X.attr("transform",`translate(${N}, ${A+a})`)}),m>p+y+n){const D=v+p+y+n;let M;if(t.look==="neo"){const j=[[k,D],[k+x,D],[k+x,D+.001],[k,D+.001]];M=S.polygon(j,_)}else M=S.line(k,D,k+x,D,_);u.insert(()=>M).attr("class","divider")}return rt(t,T),t.intersect=function(D){return Q.rect(t,D)},i&&t.look!=="handDrawn"&&(f||d?.length)&&u.selectAll("path").attr("style",i),u}g(Op,"requirementBox");async function de(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=gt(),a=o.htmlLabels??!0,n=await he(s,ln(Ne(t)),{width:me(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let l;if(a){const c=n.children[0],h=dt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(de,"addText");var Zv=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Rp(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=et(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await at(e,t,st(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;f?{label:p,bbox:m}=await Ro(f,"ticket"in t&&t.ticket||"",u):{label:p,bbox:m}=await Ro(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:x}=await Ro(n,"assigned"in t&&t.assigned||"",u);t.width=a;const b=10,k=t?.width||0,v=Math.max(m.height,x.height)/2,S=Math.max(l.height+b*2,t?.height||0)+v,_=-k/2,F=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-v-l.height/2)+")"),p.attr("transform","translate("+(h-k/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-x.width-2*o)+", "+(-v+l.height/2)+")");let T;const{rx:D,ry:M}=t,{cssStyles:O}=t;if(t.look==="handDrawn"){const X=tt.svg(n),j=J(t,{}),I=D||M?X.path(We(_,F,k,S,D||0),j):X.rectangle(_,F,k,S,j);T=n.insert(()=>I,":first-child"),T.attr("class","basic label-container").attr("style",O||null)}else{T=n.insert("rect",":first-child"),T.attr("class","basic label-container __APA__").attr("style",s).attr("rx",D??5).attr("ry",M??5).attr("x",_).attr("y",F).attr("width",k).attr("height",S);const X="priority"in t&&t.priority;if(X){const j=n.append("line"),I=_+2,$=F+Math.floor((D??0)/2),A=F+S-Math.floor((D??0)/2);j.attr("x1",I).attr("y1",$).attr("x2",I).attr("y2",A).attr("stroke-width","4").attr("stroke",Zv(X))}}return rt(t,T),t.height=S,t.intersect=function(X){return Q.rect(t,X)},n}g(Rp,"kanbanItem");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,st(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,f=o.width+20,u=o.height+20,p=Math.max(l,f),m=Math.max(c,u);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let y;const x=`M0 0
241
241
  a${h},${h} 1 0,0 ${p*.25},${-1*m*.1}
242
242
  a${h},${h} 1 0,0 ${p*.25},0
243
243
  a${h},${h} 1 0,0 ${p*.25},0
@@ -255,7 +255,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
255
255
  a${h},${h} 1 0,0 ${-1*p*.1},${-1*m*.33}
256
256
  a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
257
257
  a${h},${h} 1 0,0 ${p*.1},${-1*m*.33}
258
- H0 V0 Z`;if(t.look==="handDrawn"){const b=tt.svg(s),k=J(t,{}),v=b.path(x,k);y=s.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",Ft(d))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-p/2}, ${-m/2})`),rt(t,y),t.calcIntersect=function(b,k){return Q.rect(b,k)},t.intersect=function(b){return Y.info("Bang intersect",t,b),Q.rect(t,b)},s}g(Rp,"bang");async function Dp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,ot(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:p}=t;let m;const y=`M0 0
258
+ H0 V0 Z`;if(t.look==="handDrawn"){const b=tt.svg(s),k=J(t,{}),v=b.path(x,k);y=s.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",Ft(d))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-p/2}, ${-m/2})`),rt(t,y),t.calcIntersect=function(b,k){return Q.rect(b,k)},t.intersect=function(b){return U.info("Bang intersect",t,b),Q.rect(t,b)},s}g(Dp,"bang");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,st(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:p}=t;let m;const y=`M0 0
259
259
  a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
260
260
  a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
261
261
  a${d},${d} 1 0,1 ${l*.35},${l*.2}
@@ -269,7 +269,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
269
269
 
270
270
  a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
271
271
  a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
272
- H0 V0 Z`;if(t.look==="handDrawn"){const x=tt.svg(s),b=J(t,{}),k=x.path(y,b);m=s.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Ft(p))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),rt(t,m),t.calcIntersect=function(x,b){return Q.rect(x,b)},t.intersect=function(x){return Y.info("Cloud intersect",t,x),Q.rect(t,x)},s}g(Dp,"cloud");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,ot(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
272
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=tt.svg(s),b=J(t,{}),k=x.path(y,b);m=s.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Ft(p))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),rt(t,m),t.calcIntersect=function(x,b){return Q.rect(x,b)},t.intersect=function(x){return U.info("Cloud intersect",t,x),Q.rect(t,x)},s}g(Np,"cloud");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=et(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await at(e,t,st(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
273
273
  M${-l/2} ${c/2-h}
274
274
  v${-c+2*h}
275
275
  q0,-${h} ${h},-${h}
@@ -289,23 +289,23 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
289
289
  h${-(l-2*h)}
290
290
  q${-h},0 ${-h},${-h}
291
291
  Z
292
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);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(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),rt(t,f),t.calcIntersect=function(u,p){return Q.rect(u,p)},t.intersect=function(u){return Q.rect(t,u)},s}g(Np,"defaultMindmapNode");async function qp(e,t){const r={padding:t.padding??0};return Jn(e,t,r)}g(qp,"mindmapCircle");var Zv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:yp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:gp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:xp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:wp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:qg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:zg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Jn},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Rp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Dp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:dp},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Gg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:sp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ip},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:_p},{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:ep},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:jg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Tp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Eg},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:pp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:kp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:bp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ug},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Vg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Og},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Rg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Dg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:op},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Mp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Xg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Bp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:ap},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Ng},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Wg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Fp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ep},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Hg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Lp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Yg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:mp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:hp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:lp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ag},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Pg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Sp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:vp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ap},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:up},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:np}],Kv=g(()=>{const t=[...Object.entries({state:Cp,choice:$g,note:cp,rectWithTitle:fp,labelRect:rp,iconSquare:Jg,iconCircle:Kg,icon:Zg,iconRounded:Qg,imageSquare:tp,anchor:Fg,kanbanItem:Op,mindmapCircle:qp,defaultMindmapNode:Np,classBox:Ip,erBox:tl,requirementBox:Pp}),...Zv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),zp=Kv();function Wp(e){return e in zp}g(Wp,"isValidShape");var mo=new Map;async function el(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?zp[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",Ft(t.look)),t.tooltip&&s.attr("title",t.tooltip),mo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(el,"insertNode");var Qv=g((e,t)=>{mo.set(t.id,e)},"setNodeElem"),Jv=g(()=>{mo.clear()},"clear"),tS=g(e=>{const t=mo.get(e.id);Y.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"),pr=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Et={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},Lh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function fi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=xt(e),t=xt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}g(fi,"calculateDeltaAndAngle");var xt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),jp=g(e=>({x:g(function(t,r,i){let s=0;const o=xt(i[0]).x<xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:u,deltaX:p}=fi(i[0],i[1]);s=Et[e.arrowTypeStart]*Math.cos(u)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:u,deltaX:p}=fi(i[i.length-1],i[i.length-2]);s=Et[e.arrowTypeEnd]*Math.cos(u)*(p>=0?1:-1)}const a=Math.abs(xt(t).x-xt(i[i.length-1]).x),n=Math.abs(xt(t).y-xt(i[i.length-1]).y),l=Math.abs(xt(t).x-xt(i[0]).x),c=Math.abs(xt(t).y-xt(i[0]).y),h=Et[e.arrowTypeStart],d=Et[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="right"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="right"?-1:1,s+=u}return xt(t).x+s},"x"),y:g(function(t,r,i){let s=0;const o=xt(i[0]).y<xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:u,deltaY:p}=fi(i[0],i[1]);s=Et[e.arrowTypeStart]*Math.abs(Math.sin(u))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:u,deltaY:p}=fi(i[i.length-1],i[i.length-2]);s=Et[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(p>=0?1:-1)}const a=Math.abs(xt(t).y-xt(i[i.length-1]).y),n=Math.abs(xt(t).x-xt(i[i.length-1]).x),l=Math.abs(xt(t).y-xt(i[0]).y),c=Math.abs(xt(t).x-xt(i[0]).x),h=Et[e.arrowTypeStart],d=Et[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="up"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="up"?-1:1,s+=u}return xt(t).y+s},"y")}),"getLineFunctionsWithOffset"),eS=g((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Fh(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Fh(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),rS={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}},iS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Fh=g((e,t,r,i,s,o,a=!1,n)=>{const l=rS[r],c=l&&iS.includes(l.type);if(!l){Y.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const p=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${p}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const x=y.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),sS=g(e=>typeof e=="string"?e:gt()?.flowchart?.curve,"resolveEdgeCurveType"),Ai=new Map,Lt=new Map,oS=g(()=>{Ai.clear(),Lt.clear()},"clear"),oi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Hp=g(async(e,t)=>{const r=gt();let i=Ot(r);const{labelStyles:s}=et(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await he(e,t.label,{style:oi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),Y.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],p=ct(c);h=u.getBoundingClientRect(),d=h,p.attr("width",h.width),p.attr("height",h.height)}else{const u=ct(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",pr(d,i)),Ai.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(p,t.startLabelLeft,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startLeft=u,gi(f,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(p,t.startLabelRight,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startRight=u,gi(f,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(u,t.endLabelLeft,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endLeft=u,gi(f,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await $e(u,t.endLabelRight,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=ct(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endRight=u,gi(f,t.endLabelRight)}return c},"insertEdgeLabel");function gi(e,t){Ot(gt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(gi,"setTerminalWidth");var Yp=g((e,t)=>{Y.debug("Moving label abc88 ",e.id,e.label,Ai.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=gt(),{subGraphTitleTotalMargin:s}=ho(i);if(e.label){const o=Ai.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);Y.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=Lt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Lt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Lt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Lt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),aS=g((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),nS=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),lS=g((e,t,r)=>{Y.debug(`intersection calc abc89:
292
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);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(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),rt(t,f),t.calcIntersect=function(u,p){return Q.rect(u,p)},t.intersect=function(u){return Q.rect(t,u)},s}g(qp,"defaultMindmapNode");async function zp(e,t){const r={padding:t.padding??0};return tl(e,t,r)}g(zp,"mindmapCircle");var Kv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:xp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:pp},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Cp},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:vp},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:zg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Wg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Dp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Np},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:up},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Vg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:op},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:sp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Lp},{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:rp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Hg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Bp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:$g},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:mp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:wp},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:kp},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Xg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Zg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Rg},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Dg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ng},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:ap},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Ap},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Gg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:_p},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:np},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:qg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:jg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Mp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:$p},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Yg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Fp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Ug},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:yp},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:cp},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:hp},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Eg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Og},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Tp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Sp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ep},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:fp},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:lp}],Qv=g(()=>{const t=[...Object.entries({state:bp,choice:Pg,note:dp,rectWithTitle:gp,labelRect:ip,iconSquare:tp,iconCircle:Qg,icon:Kg,iconRounded:Jg,imageSquare:ep,anchor:Mg,kanbanItem:Rp,mindmapCircle:zp,defaultMindmapNode:qp,classBox:Ip,erBox:el,requirementBox:Op}),...Kv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Wp=Qv();function jp(e){return e in Wp}g(jp,"isValidShape");var mo=new Map;async function rl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Wp[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",Ft(t.look)),t.tooltip&&s.attr("title",t.tooltip),mo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(rl,"insertNode");var Jv=g((e,t)=>{mo.set(t.id,e)},"setNodeElem"),tS=g(()=>{mo.clear()},"clear"),eS=g(e=>{const t=mo.get(e.id);U.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"),pr=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Et={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Fh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function fi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=xt(e),t=xt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}g(fi,"calculateDeltaAndAngle");var xt=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Hp=g(e=>({x:g(function(t,r,i){let s=0;const o=xt(i[0]).x<xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:u,deltaX:p}=fi(i[0],i[1]);s=Et[e.arrowTypeStart]*Math.cos(u)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:u,deltaX:p}=fi(i[i.length-1],i[i.length-2]);s=Et[e.arrowTypeEnd]*Math.cos(u)*(p>=0?1:-1)}const a=Math.abs(xt(t).x-xt(i[i.length-1]).x),n=Math.abs(xt(t).y-xt(i[i.length-1]).y),l=Math.abs(xt(t).x-xt(i[0]).x),c=Math.abs(xt(t).y-xt(i[0]).y),h=Et[e.arrowTypeStart],d=Et[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="right"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="right"?-1:1,s+=u}return xt(t).x+s},"x"),y:g(function(t,r,i){let s=0;const o=xt(i[0]).y<xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Et,e.arrowTypeStart)){const{angle:u,deltaY:p}=fi(i[0],i[1]);s=Et[e.arrowTypeStart]*Math.abs(Math.sin(u))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Et,e.arrowTypeEnd)){const{angle:u,deltaY:p}=fi(i[i.length-1],i[i.length-2]);s=Et[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(p>=0?1:-1)}const a=Math.abs(xt(t).y-xt(i[i.length-1]).y),n=Math.abs(xt(t).x-xt(i[i.length-1]).x),l=Math.abs(xt(t).y-xt(i[0]).y),c=Math.abs(xt(t).x-xt(i[0]).x),h=Et[e.arrowTypeStart],d=Et[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="up"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="up"?-1:1,s+=u}return xt(t).y+s},"y")}),"getLineFunctionsWithOffset"),rS=g((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Mh(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Mh(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),iS={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}},sS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Mh=g((e,t,r,i,s,o,a=!1,n)=>{const l=iS[r],c=l&&sS.includes(l.type);if(!l){U.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const p=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${p}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const x=y.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),oS=g(e=>typeof e=="string"?e:gt()?.flowchart?.curve,"resolveEdgeCurveType"),Ai=new Map,Lt=new Map,aS=g(()=>{Ai.clear(),Lt.clear()},"clear"),oi=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Yp=g(async(e,t)=>{const r=gt();let i=Ot(r);const{labelStyles:s}=et(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await he(e,t.label,{style:oi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),U.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],p=dt(c);h=u.getBoundingClientRect(),d=h,p.attr("width",h.width),p.attr("height",h.height)}else{const u=dt(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",pr(d,i)),Ai.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await Pe(p,t.startLabelLeft,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=dt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startLeft=u,gi(f,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await Pe(p,t.startLabelRight,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=dt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).startRight=u,gi(f,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await Pe(u,t.endLabelLeft,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=dt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endLeft=u,gi(f,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await Pe(u,t.endLabelRight,oi(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],b=dt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}p.attr("transform",pr(y,i)),Lt.get(t.id)||Lt.set(t.id,{}),Lt.get(t.id).endRight=u,gi(f,t.endLabelRight)}return c},"insertEdgeLabel");function gi(e,t){Ot(gt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(gi,"setTerminalWidth");var Up=g((e,t)=>{U.debug("Moving label abc88 ",e.id,e.label,Ai.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=gt(),{subGraphTitleTotalMargin:s}=ho(i);if(e.label){const o=Ai.get(e.id);let a=e.x,n=e.y;if(r){const l=Zt.calcLabelPosition(r);U.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=Lt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Lt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Lt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Lt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=Zt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),nS=g((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),lS=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),hS=g((e,t,r)=>{U.debug(`intersection calc abc89:
293
293
  outsidePoint: ${JSON.stringify(t)}
294
294
  insidePoint : ${JSON.stringify(r)}
295
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),Y.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return Y.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Mh=g((e,t)=>{Y.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(Y.info("abc88 checking point",o,t),!nS(t,o)&&!s){const a=lS(t,i,o);Y.debug("abc88 inside",o,i,a),Y.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?Y.warn("abc88 no intersect",a,r):r.push(a),s=!0}else Y.warn("abc88 outside",o,i),i=o,s||r.push(o)}),Y.debug("returning points",r),r},"cutPathAtIntersect");function Up(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(Up,"extractCornerPoints");var Ah=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),hS=g(function(e){const{cornerPointPositions:t}=Up(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Ah(s,a,5),l=Ah(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){Y.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else Y.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),cS=g((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Array(n).fill(`${s} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Xp=g(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=gt();let h=t.points,d=!1;const f=s;var u=o;const p=[];for(const I in t.cssCompiledStyles)_n(I)||p.push(t.cssCompiledStyles[I]);if(c==="swimlane"){if(u.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),u.intersect(h[1])];else{const I=h.slice(1,-1),E=I[0],D=I[I.length-1],B=.5,U=Math.abs(h[h.length-1].x-D.x)<B&&Math.abs(h[h.length-1].y-D.y)<B,W=f.intersect(E),G=U?D:u.intersect(D),V=Math.abs(G.x-D.x)<B&&Math.abs(G.y-D.y)<B,Z=Math.abs(W.x-E.x)<B&&Math.abs(W.y-E.y)<B?[]:[W],st=V?[]:[G];h=[...Z,...I,...st]}h=aS(t,h)}else u.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(u.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(Y.info("to cluster abc88",r.get(t.toCluster)),h=Mh(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(Y.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Mh(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(I=>!Number.isNaN(I.y));const x=sS(t.curve);x!=="rounded"&&(y=hS(y));let b=xi;switch(x){case"linear":b=xi;break;case"basis":b=Ls;break;case"cardinal":b=ad;break;case"bumpX":b=ed;break;case"bumpY":b=rd;break;case"catmullRom":b=ld;break;case"monotoneX":b=gd;break;case"monotoneY":b=pd;break;case"natural":b=yd;break;case"step":b=xd;break;case"stepAfter":b=bd;break;case"stepBefore":b=Cd;break;case"rounded":b=xi;break;default:b=Ls}const{x:k,y:v}=jp(t),S=Jc().x(k).y(v).curve(b);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 F,T=x==="rounded"?Gp(Vp(y,t),5):S(y);const M=Array.isArray(t.style)?t.style:[t.style];let P=M.find(I=>I?.startsWith("stroke:")),O="";t.animate&&(O="edge-animation-fast"),t.animation&&(O="edge-animation-"+t.animation);let X=!1;if(t.look==="handDrawn"){const I=tt.svg(e);Object.assign([],y);const E=I.path(T,{roughness:.3,seed:l});_+=" transition",F=ct(E).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",M?M.reduce((B,U)=>B+";"+U,""):"");let D=F.attr("d");F.attr("d",D),e.node().appendChild(F.node())}else{const I=p.join(";"),E=M?M.reduce((V,K)=>V+K+";",""):"",D=(I?I+";"+E+";":E)+";"+(M?M.reduce((V,K)=>V+";"+K,""):"");F=e.append("path").attr("d",T).attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",D),P=D.match(/stroke:([^;]+)/)?.[1],X=t.animate===!0||!!t.animation||I.includes("animation");const B=F.node(),U=typeof B.getTotalLength=="function"?B.getTotalLength():0,W=Lh[t.arrowTypeStart]||0,G=Lh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!X){const K=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?cS(U,W,G):`0 ${W} ${U-W-G} ${G}`}; stroke-dashoffset: 0;`;F.attr("style",K+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",m),F.attr("data-look",Ft(t.look)),t.showPoints&&y.forEach(I=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",I.x).attr("cy",I.y)});let j="";(gt().flowchart.arrowMarkerAbsolute||gt().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Y.info("arrowTypeStart",t.arrowTypeStart),Y.info("arrowTypeEnd",t.arrowTypeEnd);const R=!X&&t?.look==="neo";eS(F,t,j,a,i,R,P);const $=Math.floor(h.length/2),A=h[$];Zt.isLabelCoordinateInPath(A,F.attr("d"))||(d=!0);let N={};return d&&(N.updatedPath=h),N.originalPath=t.points,N},"insertEdge");function Gp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,u=Math.hypot(c,h),p=Math.hypot(d,f);if(u<s||p<s){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,x=d/p,b=f/p,k=m*x+y*b,v=Math.max(-1,Math.min(1,k)),S=Math.acos(v);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(S/2),u/2,p/2),F=a.x-m*_,T=a.y-y*_,M=a.x+x*_,P=a.y+b*_;r+=`L${F},${T}`,r+=`Q${a.x},${a.y} ${M},${P}`}}return r}g(Gp,"generateRoundedPath");function Oa(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(Oa,"calculateDeltaAndAngle");function Vp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Et[t.arrowTypeStart]){const s=Et[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Oa(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&Et[t.arrowTypeEnd]){const s=Et[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Oa(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}g(Vp,"applyMarkerOffsetsToPoints");var dS=g((e,t,r,i)=>{t.forEach(s=>{IS[s](e,r,i)})},"insertMarkers"),uS=g((e,t,r)=>{Y.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),fS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),gS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),pS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),mS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),yS=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),xS=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),CS=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),bS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),kS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),wS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),vS=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),SS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),TS=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),BS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),_S=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const 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",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),LS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),FS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const 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",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),MS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
295
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),U.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return U.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),Ah=g((e,t)=>{U.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(U.info("abc88 checking point",o,t),!lS(t,o)&&!s){const a=hS(t,i,o);U.debug("abc88 inside",o,i,a),U.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?U.warn("abc88 no intersect",a,r):r.push(a),s=!0}else U.warn("abc88 outside",o,i),i=o,s||r.push(o)}),U.debug("returning points",r),r},"cutPathAtIntersect");function Xp(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(Xp,"extractCornerPoints");var Eh=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),cS=g(function(e){const{cornerPointPositions:t}=Xp(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Eh(s,a,5),l=Eh(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){U.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else U.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),dS=g((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Array(n).fill(`${s} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),Gp=g(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=gt();let h=t.points,d=!1;const f=s;var u=o;const p=[];for(const P in t.cssCompiledStyles)Ln(P)||p.push(t.cssCompiledStyles[P]);if(c==="swimlane"){if(u.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),u.intersect(h[1])];else{const P=h.slice(1,-1),E=P[0],R=P[P.length-1],B=.5,H=Math.abs(h[h.length-1].x-R.x)<B&&Math.abs(h[h.length-1].y-R.y)<B,W=f.intersect(E),G=H?R:u.intersect(R),V=Math.abs(G.x-R.x)<B&&Math.abs(G.y-R.y)<B,K=Math.abs(W.x-E.x)<B&&Math.abs(W.y-E.y)<B?[]:[W],ot=V?[]:[G];h=[...K,...P,...ot]}h=nS(t,h)}else u.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(u.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(U.info("to cluster abc88",r.get(t.toCluster)),h=Ah(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(U.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Ah(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(P=>!Number.isNaN(P.y));const x=oS(t.curve);x!=="rounded"&&(y=cS(y));let b=xi;switch(x){case"linear":b=xi;break;case"basis":b=Ls;break;case"cardinal":b=nd;break;case"bumpX":b=rd;break;case"bumpY":b=id;break;case"catmullRom":b=hd;break;case"monotoneX":b=pd;break;case"monotoneY":b=md;break;case"natural":b=xd;break;case"step":b=Cd;break;case"stepAfter":b=kd;break;case"stepBefore":b=bd;break;case"rounded":b=xi;break;default:b=Ls}const{x:k,y:v}=Hp(t),S=td().x(k).y(v).curve(b);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 F,T=x==="rounded"?Vp(Zp(y,t),5):S(y);const D=Array.isArray(t.style)?t.style:[t.style];let M=D.find(P=>P?.startsWith("stroke:")),O="";t.animate&&(O="edge-animation-fast"),t.animation&&(O="edge-animation-"+t.animation);let X=!1;if(t.look==="handDrawn"){const P=tt.svg(e);Object.assign([],y);const E=P.path(T,{roughness:.3,seed:l});_+=" transition",F=dt(E).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",D?D.reduce((B,H)=>B+";"+H,""):"");let R=F.attr("d");F.attr("d",R),e.node().appendChild(F.node())}else{const P=p.join(";"),E=D?D.reduce((V,Z)=>V+Z+";",""):"",R=(P?P+";"+E+";":E)+";"+(D?D.reduce((V,Z)=>V+";"+Z,""):"");F=e.append("path").attr("d",T).attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",R),M=R.match(/stroke:([^;]+)/)?.[1],X=t.animate===!0||!!t.animation||P.includes("animation");const B=F.node(),H=typeof B.getTotalLength=="function"?B.getTotalLength():0,W=Fh[t.arrowTypeStart]||0,G=Fh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!X){const Z=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?dS(H,W,G):`0 ${W} ${H-W-G} ${G}`}; stroke-dashoffset: 0;`;F.attr("style",Z+F.attr("style"))}}F.attr("data-edge",!0),F.attr("data-et","edge"),F.attr("data-id",t.id),F.attr("data-points",m),F.attr("data-look",Ft(t.look)),t.showPoints&&y.forEach(P=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",P.x).attr("cy",P.y)});let j="";(gt().flowchart.arrowMarkerAbsolute||gt().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),U.info("arrowTypeStart",t.arrowTypeStart),U.info("arrowTypeEnd",t.arrowTypeEnd);const I=!X&&t?.look==="neo";rS(F,t,j,a,i,I,M);const $=Math.floor(h.length/2),A=h[$];Zt.isLabelCoordinateInPath(A,F.attr("d"))||(d=!0);let N={};return d&&(N.updatedPath=h),N.originalPath=t.points,N},"insertEdge");function Vp(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,u=Math.hypot(c,h),p=Math.hypot(d,f);if(u<s||p<s){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,x=d/p,b=f/p,k=m*x+y*b,v=Math.max(-1,Math.min(1,k)),S=Math.acos(v);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(S/2),u/2,p/2),F=a.x-m*_,T=a.y-y*_,D=a.x+x*_,M=a.y+b*_;r+=`L${F},${T}`,r+=`Q${a.x},${a.y} ${D},${M}`}}return r}g(Vp,"generateRoundedPath");function Ra(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(Ra,"calculateDeltaAndAngle");function Zp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Et[t.arrowTypeStart]){const s=Et[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Ra(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&Et[t.arrowTypeEnd]){const s=Et[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Ra(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}g(Zp,"applyMarkerOffsetsToPoints");var uS=g((e,t,r,i)=>{t.forEach(s=>{IS[s](e,r,i)})},"insertMarkers"),fS=g((e,t,r)=>{U.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),gS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),pS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),mS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),yS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),xS=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),CS=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),bS=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),kS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),wS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),vS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),SS=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),TS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),BS=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),_S=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),LS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const 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",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),FS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),MS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const 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",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),AS=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
296
296
  L20,10
297
297
  M20,10
298
- L0,20`)},"requirement_arrow"),AS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
298
+ L0,20`)},"requirement_arrow"),ES=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
299
299
  L20,10
300
300
  M20,10
301
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),ES=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),$S=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),IS={extension:uS,composition:fS,aggregation:gS,dependency:pS,lollipop:mS,point:yS,circle:xS,cross:CS,barb:bS,barbNeo:kS,only_one:wS,zero_or_one:vS,one_or_more:SS,zero_or_more:TS,only_one_neo:BS,zero_or_one_neo:_S,one_or_more_neo:LS,zero_or_more_neo:FS,requirement_arrow:MS,requirement_contains:ES,requirement_arrow_neo:AS,requirement_contains_neo:$S},Zp=dS,PS={common:Ur,getConfig:Ct,insertCluster:wg,insertEdge:Xp,insertEdgeLabel:Hp,insertMarkers:Zp,insertNode:el,interpolateToCurve:In,labelHelper:at,log:Y,positionEdgeLabel:Yp},Ei={},Kp=g(e=>{for(const t of e)Ei[t.name]=t},"registerLayoutLoaders"),OS=g(()=>{Kp([{name:"dagre",loader:g(async()=>await Promise.resolve().then(()=>require("./dagre-VKFMJZFB-BlRE-U3S.cjs")),"loader")},{name:"swimlane",loader:g(async()=>await Promise.resolve().then(()=>require("./swimlanes-5IMT3BWC-JZVn9oCR.cjs")),"loader")},{name:"cose-bilkent",loader:g(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-JH36ORCC-CsHaaKi1.cjs")),"loader")}])},"registerDefaultLayoutLoaders");OS();var RS=g(async(e,t,r)=>{if(!(e.layoutAlgorithm in Ei))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Ei[e.layoutAlgorithm],s=await i.loader(),{theme:o,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,PS,{algorithm:i.algorithm},r)},"render"),DS=g((e="",{fallback:t="dagre"}={})=>{if(e in Ei)return e;if(t in Ei)return Y.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"),rl="comm",Qp="rule",Jp="decl",NS="@media",qS="@import",zS="@supports",WS="@namespace",Ra="@keyframes",tm="@layer",jS="@scope",HS=Math.abs,ki=String.fromCharCode;function em(e){return e.trim()}function Da(e,t,r){return e.replace(t,r)}function kr(e,t){return e.charCodeAt(t)|0}function jr(e,t,r){return e.slice(t,r)}function fe(e){return e.length}function rm(e){return e.length}function ts(e,t){return t.push(e),e}var yo=1,Hr=1,im=0,Qt=0,wt=0,Kr="";function il(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:yo,column:Hr,length:a,return:"",siblings:n}}function YS(){return wt}function US(){return wt=Qt>0?kr(Kr,--Qt):0,Hr--,wt===10&&(Hr=1,yo--),wt}function oe(){return wt=Qt<im?kr(Kr,Qt++):0,Hr++,wt===10&&(Hr=1,yo++),wt}function Ie(){return kr(Kr,Qt)}function fs(){return Qt}function xo(e,t){return jr(Kr,e,t)}function $i(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 XS(e){return yo=Hr=1,im=fe(Kr=e),Qt=0,[]}function GS(e){return Kr="",e}function Do(e){return em(xo(Qt-1,Na(e===91?e+2:e===40?e+1:e)))}function VS(e){for(;(wt=Ie())&&wt<33;)oe();return $i(e)>2||$i(wt)>3?"":" "}function ZS(e,t){for(;--t&&oe()&&!(wt<48||wt>102||wt>57&&wt<65||wt>70&&wt<97););return xo(e,fs()+(t<6&&Ie()==32&&oe()==32))}function Na(e){for(;oe();)switch(wt){case e:return Qt;case 34:case 39:e!==34&&e!==39&&Na(wt);break;case 40:e===41&&Na(e);break;case 92:oe();break}return Qt}function KS(e,t){for(;oe()&&e+wt!==57;)if(e+wt===84&&Ie()===47)break;return"/*"+xo(t,Qt-1)+"*"+ki(e===47?e:oe())}function QS(e){for(;!$i(Ie());)oe();return xo(e,Qt)}function JS(e){return GS(gs("",null,null,null,[""],e=XS(e),0,[0],e))}function gs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,p=0,m=1,y=1,x=1,b=0,k=0,v="",S=s,_=o,F=i,T=v;y;)switch(p=k,k=oe()){case 40:p!=108&&kr(T,d-1)==58?(b++,T+="("):T+=Do(k);break;case 41:b--,T+=")";break;case 34:case 39:case 91:T+=Do(k);break;case 9:case 10:case 13:case 32:if(b>0){T+=ki(k);break}T+=VS(p);break;case 92:T+=ZS(fs()-1,7);continue;case 47:switch(Ie()){case 42:case 47:ts(tT(KS(oe(),fs()),t,r,l),l),($i(p||1)==5||$i(Ie()||1)==5)&&fe(T)&&jr(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[c++]=fe(T)*x;case 125*m:case 59:case 0:if(b>0&&k){T+=ki(k);break}switch(k){case 0:case 125:y=0;case 59+h:x==-1&&(T=Da(T,/\f/g,"")),u>0&&(fe(T)-d||m===0)&&ts(u>32?$h(T+";",i,r,d-1,l):$h(Da(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(ts(F=Eh(T,t,r,c,h,s,n,v,S=[],_=[],d,o),o),k===123)if(h===0)gs(T,t,F,F,S,o,d,n,_);else{switch(f){case 99:if(kr(T,3)===110)break;case 108:if(kr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?gs(e,F,F,i&&ts(Eh(e,F,F,0,0,s,n,v,s,S=[],d,_),_),s,_,d,n,i?S:_):gs(T,F,F,F,[""],_,0,n,_)}}c=h=u=0,m=x=1,v=T="",d=a;break;case 58:d=1+fe(T),u=p;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&US()==125)continue}switch(T+=ki(k),k*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:if(b>0)break;n[c++]=(fe(T)-1)*x,x=1;break;case 64:Ie()===45&&(T+=Do(oe())),f=Ie(),h=d=fe(v=T+=QS(fs())),k++;break;case 45:p===45&&fe(T)==2&&(m=0)}}return o}function Eh(e,t,r,i,s,o,a,n,l,c,h,d){for(var f=s-1,u=s===0?o:[""],p=rm(u),m=0,y=0,x=0;m<i;++m)for(var b=0,k=jr(e,f+1,f=HS(y=a[m])),v=e;b<p;++b)(v=em(y>0?u[b]+" "+k:Da(k,/&\f/g,u[b])))&&(l[x++]=v);return il(e,t,r,s===0?Qp:n,l,c,h,d)}function tT(e,t,r,i){return il(e,t,r,rl,ki(YS()),jr(e,2,-2),0,i)}function $h(e,t,r,i,s){return il(e,t,r,Jp,jr(e,0,i),jr(e,i+1,-1),i,s)}function qa(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function eT(e,t,r,i){switch(e.type){case tm:if(e.children.length)break;case qS:case WS:case Jp:return e.return=e.return||e.value;case rl:return"";case Ra:return e.return=e.value+"{"+qa(e.children,i)+"}";case Qp:if(!fe(e.value=e.props.join(",")))return""}return fe(r=qa(e.children,i))?e.return=e.value+"{"+r+"}":""}function rT(e){var t=rm(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var sm="c4",iT=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),sT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-LMCZKHZV-B--cDHXw.cjs"));return{id:sm,diagram:e}},"loader"),oT={id:sm,detector:iT,loader:sT},aT=oT,om="flowchart",nT=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),lT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-BNIQEPQk.cjs"));return{id:om,diagram:e}},"loader"),hT={id:om,detector:nT,loader:lT},cT=hT,am="flowchart-v2",dT=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),uT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-BNIQEPQk.cjs"));return{id:am,diagram:e}},"loader"),fT={id:am,detector:dT,loader:uT},gT=fT,nm="swimlane",pT=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),mT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./swimlanesDiagram-G3AALYLV-DxEegQkl.cjs"));return{id:nm,diagram:e}},"loader"),yT={id:nm,detector:pT,loader:mT},xT=yT,lm="er",CT=g(e=>/^\s*erDiagram/.test(e),"detector"),bT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q63AITRT-KvBvwG4T.cjs"));return{id:lm,diagram:e}},"loader"),kT={id:lm,detector:CT,loader:bT},wT=kT,hm="gitGraph",vT=g(e=>/^\s*gitGraph/.test(e),"detector"),ST=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-IHSO6WYX-BkZsK9Hm.cjs"));return{id:hm,diagram:e}},"loader"),TT={id:hm,detector:vT,loader:ST},BT=TT,cm="gantt",_T=g(e=>/^\s*gantt/.test(e),"detector"),LT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-NO4QXBWP-DvdToLYa.cjs"));return{id:cm,diagram:e}},"loader"),FT={id:cm,detector:_T,loader:LT},MT=FT,dm="info",AT=g(e=>/^\s*info/.test(e),"detector"),ET=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-FWYZ7A6U-Cd3TPtAG.cjs"));return{id:dm,diagram:e}},"loader"),$T={id:dm,detector:AT,loader:ET},um="pie",IT=g(e=>/^\s*pie/.test(e),"detector"),PT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ENE6RG2P-iRoOiNc4.cjs"));return{id:um,diagram:e}},"loader"),OT={id:um,detector:IT,loader:PT},fm="quadrantChart",RT=g(e=>/^\s*quadrantChart/.test(e),"detector"),DT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-ABIIQ3AL-DKbTOjNz.cjs"));return{id:fm,diagram:e}},"loader"),NT={id:fm,detector:RT,loader:DT},qT=NT,gm="xychart",zT=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),WT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-FW5EYKEG-BHBIM0-w.cjs"));return{id:gm,diagram:e}},"loader"),jT={id:gm,detector:zT,loader:WT},HT=jT,pm="requirement",YT=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),UT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-TGXJPOKE-B6RQ9Kpp.cjs"));return{id:pm,diagram:e}},"loader"),XT={id:pm,detector:YT,loader:UT},GT=XT,mm="sequence",VT=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),ZT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-DBY2YBRQ-BuKDthxK.cjs"));return{id:mm,diagram:e}},"loader"),KT={id:mm,detector:VT,loader:ZT},QT=KT,ym="class",JT=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),tB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-OUVF2IWQ-Vq3KKBUy.cjs"));return{id:ym,diagram:e}},"loader"),eB={id:ym,detector:JT,loader:tB},rB=eB,xm="classDiagram",iB=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),sB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-EOCWNBFH-Vq3KKBUy.cjs"));return{id:xm,diagram:e}},"loader"),oB={id:xm,detector:iB,loader:sB},aB=oB,Cm="state",nB=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),lB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-2N3HPSRC-DqhvonPY.cjs"));return{id:Cm,diagram:e}},"loader"),hB={id:Cm,detector:nB,loader:lB},cB=hB,bm="stateDiagram",dB=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),uB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-6OUMAXLB-p9rvsC9-.cjs"));return{id:bm,diagram:e}},"loader"),fB={id:bm,detector:dB,loader:uB},gB=fB,km="journey",pB=g(e=>/^\s*journey/.test(e),"detector"),mB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-5HDEW3XC-C_kouMqJ.cjs"));return{id:km,diagram:e}},"loader"),yB={id:km,detector:pB,loader:mB},xB=yB,CB=g((e,t,r)=>{Y.debug(`rendering svg for syntax error
302
- `);const i=kd(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),tn(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"),wm={draw:CB},bB=wm,kB={db:{},renderer:wm,parser:{parse:g(()=>{},"parse")}},wB=kB,vm="flowchart-elk",vB=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),SB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-BNIQEPQk.cjs"));return{id:vm,diagram:e}},"loader"),TB={id:vm,detector:vB,loader:SB},BB=TB,Sm="timeline",_B=g(e=>/^\s*timeline/.test(e),"detector"),LB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-FHXFAJF6-BjxOaDZF.cjs"));return{id:Sm,diagram:e}},"loader"),FB={id:Sm,detector:_B,loader:LB},MB=FB,Tm="mindmap",AB=g(e=>/^\s*mindmap/.test(e),"detector"),EB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-LN4V7U3C-CirMzlY5.cjs"));return{id:Tm,diagram:e}},"loader"),$B={id:Tm,detector:AB,loader:EB},IB=$B,Bm="kanban",PB=g(e=>/^\s*kanban/.test(e),"detector"),OB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-HUTT4EX6-C72m9SkW.cjs"));return{id:Bm,diagram:e}},"loader"),RB={id:Bm,detector:PB,loader:OB},DB=RB,_m="sankey",NB=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),qB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-HTMAVEWB-DgGDy2eG.cjs"));return{id:_m,diagram:e}},"loader"),zB={id:_m,detector:NB,loader:qB},WB=zB,Lm="packet",jB=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),HB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-NH7WQ7WH-B4uTamuE.cjs"));return{id:Lm,diagram:e}},"loader"),YB={id:Lm,detector:jB,loader:HB},Fm="radar",UB=g(e=>/^\s*radar-beta/.test(e),"detector"),XB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-WEI45ONY-BzuHWp9D.cjs"));return{id:Fm,diagram:e}},"loader"),GB={id:Fm,detector:UB,loader:XB},Mm="block",VB=g(e=>/^\s*block(-beta)?/.test(e),"detector"),ZB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-677ZJIJ3-W3Ryiu2c.cjs"));return{id:Mm,diagram:e}},"loader"),KB={id:Mm,detector:VB,loader:ZB},QB=KB,Am="treeView",JB=g(e=>/^\s*treeView-beta/.test(e),"detector"),t_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-OA4YK3LP-C1ORbLEL.cjs"));return{id:Am,diagram:e}},"loader"),e_={id:Am,detector:JB,loader:t_},r_=e_,Em="architecture",i_=g(e=>/^\s*architecture/.test(e),"detector"),s_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-ZJ3FMSHR-CCAJeMnU.cjs"));return{id:Em,diagram:e}},"loader"),o_={id:Em,detector:i_,loader:s_},a_=o_,$m="eventmodeling",n_=g(e=>/^\s*eventmodeling/.test(e),"detector"),l_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-FQU43EPY-Di26xB9f.cjs"));return{id:$m,diagram:e}},"loader"),h_={id:$m,detector:n_,loader:l_},c_=h_,Im="ishikawa",d_=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),u_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ishikawaDiagram-FXEZZL3T-CR9ySQXh.cjs"));return{id:Im,diagram:e}},"loader"),f_={id:Im,detector:d_,loader:u_},Pm="venn",g_=g(e=>/^\s*venn-beta/.test(e),"detector"),p_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./vennDiagram-L72KCM5P-nQ40EeIj.cjs"));return{id:Pm,diagram:e}},"loader"),m_={id:Pm,detector:g_,loader:p_},y_=m_,Om="treemap",x_=g(e=>/^\s*treemap/.test(e),"detector"),C_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-G47NLZAW-71hjWkYs.cjs"));return{id:Om,diagram:e}},"loader"),b_={id:Om,detector:x_,loader:C_},Rm="wardley",k_=g(e=>/^\s*wardley-beta/i.test(e),"detector"),w_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./wardleyDiagram-EHGQE667-ByYfznTT.cjs"));return{id:Rm,diagram:e}},"loader"),v_={id:Rm,detector:k_,loader:w_},S_=v_,Dm="cynefin",T_=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),B_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./cynefinDiagram-TSTJHNR4-BEPBV57_.cjs"));return{id:Dm,diagram:e}},"loader"),__={id:Dm,detector:T_,loader:B_},Nm="railroad",L_=g(e=>/^\s*railroad-beta/i.test(e),"detector"),F_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./railroadDiagram-RFXS5EU6-SOxzO7C3.cjs"));return{id:Nm,diagram:e}},"loader"),M_={id:Nm,detector:L_,loader:F_},qm="railroadEbnf",A_=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),E_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ebnfDiagram-CCIWWBDH-DE7OPvSn.cjs"));return{id:qm,diagram:e}},"loader"),$_={id:qm,detector:A_,loader:E_},zm="railroadAbnf",I_=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),P_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./abnfDiagram-VRR7QNED-DVICL1SS.cjs"));return{id:zm,diagram:e}},"loader"),O_={id:zm,detector:I_,loader:P_},Wm="railroadPeg",R_=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),D_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pegDiagram-2B236MQR-BWo1kluM.cjs"));return{id:Wm,diagram:e}},"loader"),N_={id:Wm,detector:R_,loader:D_},Ih=!1,Co=g(()=>{Ih||(Ih=!0,bs("error",wB,e=>e.toLowerCase().trim()==="error"),bs("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),jo(BB,IB,a_),jo(aT,DB,aB,rB,wT,MT,$T,OT,GT,QT,xT,gT,cT,MB,BT,gB,cB,xB,qT,WB,YB,HT,QB,c_,r_,GB,f_,b_,M_,$_,O_,N_,y_,S_,__))},"addDiagrams"),q_=g(async()=>{Y.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ir).map(async([r,{detector:i,loader:s}])=>{if(s)try{Go(r)}catch{try{const{diagram:o,id:a}=await s();bs(a,o,i)}catch(o){throw Y.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ir[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){Y.error(`Failed to load ${t.length} external diagrams`);for(const r of t)Y.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),z_="graphics-document document";function jm(e,t){e.attr("role",z_),t!==""&&e.attr("aria-roledescription",t)}g(jm,"setA11yDiagramInfo");function Hm(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(Hm,"addSVGa11yTitleDescription");var tr,za=(tr=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=Ct(),s=Qa(t,i);t=rw(t)+`
303
- `;try{Go(s)}catch{const c=yx(s);if(!c)throw new lc(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();bs(h,d)}const{db:o,parser:a,renderer:n,init:l}=Go(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new tr(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(tr,"Diagram"),tr),Ph=[],W_=g(()=>{Ph.forEach(e=>{e()}),Ph=[]},"attachFunctions"),j_=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ym(e){const t=e.match(nc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
301
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),$S=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),PS=g((e,t,r)=>{const i=Ct(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),IS={extension:fS,composition:gS,aggregation:pS,dependency:mS,lollipop:yS,point:xS,circle:CS,cross:bS,barb:kS,barbNeo:wS,only_one:vS,zero_or_one:SS,one_or_more:TS,zero_or_more:BS,only_one_neo:_S,zero_or_one_neo:LS,one_or_more_neo:FS,zero_or_more_neo:MS,requirement_arrow:AS,requirement_contains:$S,requirement_arrow_neo:ES,requirement_contains_neo:PS},Kp=uS,OS={common:Ur,getConfig:Ct,insertCluster:vg,insertEdge:Gp,insertEdgeLabel:Yp,insertMarkers:Kp,insertNode:rl,interpolateToCurve:In,labelHelper:at,log:U,positionEdgeLabel:Up},Ei={},Qp=g(e=>{for(const t of e)Ei[t.name]=t},"registerLayoutLoaders"),RS=g(()=>{Qp([{name:"dagre",loader:g(async()=>await Promise.resolve().then(()=>require("./dagre-VKFMJZFB-C7QheUvc.cjs")),"loader")},{name:"swimlane",loader:g(async()=>await Promise.resolve().then(()=>require("./swimlanes-5IMT3BWC-ByyaHYdJ.cjs")),"loader")},{name:"cose-bilkent",loader:g(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-JH36ORCC-DRBzHIcA.cjs")),"loader")}])},"registerDefaultLayoutLoaders");RS();var DS=g(async(e,t,r)=>{if(!(e.layoutAlgorithm in Ei))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Ei[e.layoutAlgorithm],s=await i.loader(),{theme:o,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,OS,{algorithm:i.algorithm},r)},"render"),NS=g((e="",{fallback:t="dagre"}={})=>{if(e in Ei)return e;if(t in Ei)return U.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),il="comm",Jp="rule",tm="decl",qS="@media",zS="@import",WS="@supports",jS="@namespace",Da="@keyframes",em="@layer",HS="@scope",YS=Math.abs,ki=String.fromCharCode;function rm(e){return e.trim()}function Na(e,t,r){return e.replace(t,r)}function kr(e,t){return e.charCodeAt(t)|0}function jr(e,t,r){return e.slice(t,r)}function ue(e){return e.length}function im(e){return e.length}function ts(e,t){return t.push(e),e}var yo=1,Hr=1,sm=0,Qt=0,vt=0,Kr="";function sl(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:yo,column:Hr,length:a,return:"",siblings:n}}function US(){return vt}function XS(){return vt=Qt>0?kr(Kr,--Qt):0,Hr--,vt===10&&(Hr=1,yo--),vt}function oe(){return vt=Qt<sm?kr(Kr,Qt++):0,Hr++,vt===10&&(Hr=1,yo++),vt}function Ie(){return kr(Kr,Qt)}function fs(){return Qt}function xo(e,t){return jr(Kr,e,t)}function $i(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 GS(e){return yo=Hr=1,sm=ue(Kr=e),Qt=0,[]}function VS(e){return Kr="",e}function No(e){return rm(xo(Qt-1,qa(e===91?e+2:e===40?e+1:e)))}function ZS(e){for(;(vt=Ie())&&vt<33;)oe();return $i(e)>2||$i(vt)>3?"":" "}function KS(e,t){for(;--t&&oe()&&!(vt<48||vt>102||vt>57&&vt<65||vt>70&&vt<97););return xo(e,fs()+(t<6&&Ie()==32&&oe()==32))}function qa(e){for(;oe();)switch(vt){case e:return Qt;case 34:case 39:e!==34&&e!==39&&qa(vt);break;case 40:e===41&&qa(e);break;case 92:oe();break}return Qt}function QS(e,t){for(;oe()&&e+vt!==57;)if(e+vt===84&&Ie()===47)break;return"/*"+xo(t,Qt-1)+"*"+ki(e===47?e:oe())}function JS(e){for(;!$i(Ie());)oe();return xo(e,Qt)}function tT(e){return VS(gs("",null,null,null,[""],e=GS(e),0,[0],e))}function gs(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,p=0,m=1,y=1,x=1,b=0,k=0,v="",S=s,_=o,F=i,T=v;y;)switch(p=k,k=oe()){case 40:p!=108&&kr(T,d-1)==58?(b++,T+="("):T+=No(k);break;case 41:b--,T+=")";break;case 34:case 39:case 91:T+=No(k);break;case 9:case 10:case 13:case 32:if(b>0){T+=ki(k);break}T+=ZS(p);break;case 92:T+=KS(fs()-1,7);continue;case 47:switch(Ie()){case 42:case 47:ts(eT(QS(oe(),fs()),t,r,l),l),($i(p||1)==5||$i(Ie()||1)==5)&&ue(T)&&jr(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[c++]=ue(T)*x;case 125*m:case 59:case 0:if(b>0&&k){T+=ki(k);break}switch(k){case 0:case 125:y=0;case 59+h:x==-1&&(T=Na(T,/\f/g,"")),u>0&&(ue(T)-d||m===0)&&ts(u>32?Ph(T+";",i,r,d-1,l):Ph(Na(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(ts(F=$h(T,t,r,c,h,s,n,v,S=[],_=[],d,o),o),k===123)if(h===0)gs(T,t,F,F,S,o,d,n,_);else{switch(f){case 99:if(kr(T,3)===110)break;case 108:if(kr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?gs(e,F,F,i&&ts($h(e,F,F,0,0,s,n,v,s,S=[],d,_),_),s,_,d,n,i?S:_):gs(T,F,F,F,[""],_,0,n,_)}}c=h=u=0,m=x=1,v=T="",d=a;break;case 58:d=1+ue(T),u=p;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&XS()==125)continue}switch(T+=ki(k),k*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:if(b>0)break;n[c++]=(ue(T)-1)*x,x=1;break;case 64:Ie()===45&&(T+=No(oe())),f=Ie(),h=d=ue(v=T+=JS(fs())),k++;break;case 45:p===45&&ue(T)==2&&(m=0)}}return o}function $h(e,t,r,i,s,o,a,n,l,c,h,d){for(var f=s-1,u=s===0?o:[""],p=im(u),m=0,y=0,x=0;m<i;++m)for(var b=0,k=jr(e,f+1,f=YS(y=a[m])),v=e;b<p;++b)(v=rm(y>0?u[b]+" "+k:Na(k,/&\f/g,u[b])))&&(l[x++]=v);return sl(e,t,r,s===0?Jp:n,l,c,h,d)}function eT(e,t,r,i){return sl(e,t,r,il,ki(US()),jr(e,2,-2),0,i)}function Ph(e,t,r,i,s){return sl(e,t,r,tm,jr(e,0,i),jr(e,i+1,-1),i,s)}function za(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function rT(e,t,r,i){switch(e.type){case em:if(e.children.length)break;case zS:case jS:case tm:return e.return=e.return||e.value;case il:return"";case Da:return e.return=e.value+"{"+za(e.children,i)+"}";case Jp:if(!ue(e.value=e.props.join(",")))return""}return ue(r=za(e.children,i))?e.return=e.value+"{"+r+"}":""}function iT(e){var t=im(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var om="c4",sT=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),oT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-LMCZKHZV-BgTfc_W8.cjs"));return{id:om,diagram:e}},"loader"),aT={id:om,detector:sT,loader:oT},nT=aT,am="flowchart",lT=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),hT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-B9LX4RXy.cjs"));return{id:am,diagram:e}},"loader"),cT={id:am,detector:lT,loader:hT},dT=cT,nm="flowchart-v2",uT=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),fT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-B9LX4RXy.cjs"));return{id:nm,diagram:e}},"loader"),gT={id:nm,detector:uT,loader:fT},pT=gT,lm="swimlane",mT=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),yT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./swimlanesDiagram-G3AALYLV-DmAVTn1y.cjs"));return{id:lm,diagram:e}},"loader"),xT={id:lm,detector:mT,loader:yT},CT=xT,hm="er",bT=g(e=>/^\s*erDiagram/.test(e),"detector"),kT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q63AITRT-BGEWGa_b.cjs"));return{id:hm,diagram:e}},"loader"),wT={id:hm,detector:bT,loader:kT},vT=wT,cm="gitGraph",ST=g(e=>/^\s*gitGraph/.test(e),"detector"),TT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-IHSO6WYX-D1NSh545.cjs"));return{id:cm,diagram:e}},"loader"),BT={id:cm,detector:ST,loader:TT},_T=BT,dm="gantt",LT=g(e=>/^\s*gantt/.test(e),"detector"),FT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-NO4QXBWP-4BbeHi64.cjs"));return{id:dm,diagram:e}},"loader"),MT={id:dm,detector:LT,loader:FT},AT=MT,um="info",ET=g(e=>/^\s*info/.test(e),"detector"),$T=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-FWYZ7A6U-4wrBBE6X.cjs"));return{id:um,diagram:e}},"loader"),PT={id:um,detector:ET,loader:$T},fm="pie",IT=g(e=>/^\s*pie/.test(e),"detector"),OT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ENE6RG2P-BZtqlfyU.cjs"));return{id:fm,diagram:e}},"loader"),RT={id:fm,detector:IT,loader:OT},gm="quadrantChart",DT=g(e=>/^\s*quadrantChart/.test(e),"detector"),NT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-ABIIQ3AL-CC5w4CkE.cjs"));return{id:gm,diagram:e}},"loader"),qT={id:gm,detector:DT,loader:NT},zT=qT,pm="xychart",WT=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),jT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-FW5EYKEG-Df8hBgvh.cjs"));return{id:pm,diagram:e}},"loader"),HT={id:pm,detector:WT,loader:jT},YT=HT,mm="requirement",UT=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),XT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-TGXJPOKE-BCeWSLF4.cjs"));return{id:mm,diagram:e}},"loader"),GT={id:mm,detector:UT,loader:XT},VT=GT,ym="sequence",ZT=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),KT=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-DBY2YBRQ-D2R8WWiq.cjs"));return{id:ym,diagram:e}},"loader"),QT={id:ym,detector:ZT,loader:KT},JT=QT,xm="class",tB=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),eB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-OUVF2IWQ-BoGCNSIO.cjs"));return{id:xm,diagram:e}},"loader"),rB={id:xm,detector:tB,loader:eB},iB=rB,Cm="classDiagram",sB=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),oB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-EOCWNBFH-BoGCNSIO.cjs"));return{id:Cm,diagram:e}},"loader"),aB={id:Cm,detector:sB,loader:oB},nB=aB,bm="state",lB=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),hB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-2N3HPSRC-BFjEDzN5.cjs"));return{id:bm,diagram:e}},"loader"),cB={id:bm,detector:lB,loader:hB},dB=cB,km="stateDiagram",uB=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),fB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-6OUMAXLB-BpxIqbgw.cjs"));return{id:km,diagram:e}},"loader"),gB={id:km,detector:uB,loader:fB},pB=gB,wm="journey",mB=g(e=>/^\s*journey/.test(e),"detector"),yB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-5HDEW3XC-jcXDYbA9.cjs"));return{id:wm,diagram:e}},"loader"),xB={id:wm,detector:mB,loader:yB},CB=xB,bB=g((e,t,r)=>{U.debug(`rendering svg for syntax error
302
+ `);const i=wd(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),en(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"),vm={draw:bB},kB=vm,wB={db:{},renderer:vm,parser:{parse:g(()=>{},"parse")}},vB=wB,Sm="flowchart-elk",SB=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),TB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-B9LX4RXy.cjs"));return{id:Sm,diagram:e}},"loader"),BB={id:Sm,detector:SB,loader:TB},_B=BB,Tm="timeline",LB=g(e=>/^\s*timeline/.test(e),"detector"),FB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-FHXFAJF6-CYpydtqC.cjs"));return{id:Tm,diagram:e}},"loader"),MB={id:Tm,detector:LB,loader:FB},AB=MB,Bm="mindmap",EB=g(e=>/^\s*mindmap/.test(e),"detector"),$B=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-LN4V7U3C-gBn938NF.cjs"));return{id:Bm,diagram:e}},"loader"),PB={id:Bm,detector:EB,loader:$B},IB=PB,_m="kanban",OB=g(e=>/^\s*kanban/.test(e),"detector"),RB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-HUTT4EX6-D5_pDh9h.cjs"));return{id:_m,diagram:e}},"loader"),DB={id:_m,detector:OB,loader:RB},NB=DB,Lm="sankey",qB=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),zB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-HTMAVEWB-DQOfpr04.cjs"));return{id:Lm,diagram:e}},"loader"),WB={id:Lm,detector:qB,loader:zB},jB=WB,Fm="packet",HB=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),YB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-NH7WQ7WH-DyJw7-Gl.cjs"));return{id:Fm,diagram:e}},"loader"),UB={id:Fm,detector:HB,loader:YB},Mm="radar",XB=g(e=>/^\s*radar-beta/.test(e),"detector"),GB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-WEI45ONY-fz5dqgqy.cjs"));return{id:Mm,diagram:e}},"loader"),VB={id:Mm,detector:XB,loader:GB},Am="block",ZB=g(e=>/^\s*block(-beta)?/.test(e),"detector"),KB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-677ZJIJ3-BbjxBeAD.cjs"));return{id:Am,diagram:e}},"loader"),QB={id:Am,detector:ZB,loader:KB},JB=QB,Em="treeView",t_=g(e=>/^\s*treeView-beta/.test(e),"detector"),e_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-OA4YK3LP-DqYpt5F6.cjs"));return{id:Em,diagram:e}},"loader"),r_={id:Em,detector:t_,loader:e_},i_=r_,$m="architecture",s_=g(e=>/^\s*architecture/.test(e),"detector"),o_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-ZJ3FMSHR-kO8dZQKK.cjs"));return{id:$m,diagram:e}},"loader"),a_={id:$m,detector:s_,loader:o_},n_=a_,Pm="eventmodeling",l_=g(e=>/^\s*eventmodeling/.test(e),"detector"),h_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-FQU43EPY-CSPyECaU.cjs"));return{id:Pm,diagram:e}},"loader"),c_={id:Pm,detector:l_,loader:h_},d_=c_,Im="ishikawa",u_=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),f_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ishikawaDiagram-FXEZZL3T-DE9GPbED.cjs"));return{id:Im,diagram:e}},"loader"),g_={id:Im,detector:u_,loader:f_},Om="venn",p_=g(e=>/^\s*venn-beta/.test(e),"detector"),m_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./vennDiagram-L72KCM5P-CfbVR5CF.cjs"));return{id:Om,diagram:e}},"loader"),y_={id:Om,detector:p_,loader:m_},x_=y_,Rm="treemap",C_=g(e=>/^\s*treemap/.test(e),"detector"),b_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-G47NLZAW-BaP0Lyg0.cjs"));return{id:Rm,diagram:e}},"loader"),k_={id:Rm,detector:C_,loader:b_},Dm="wardley",w_=g(e=>/^\s*wardley-beta/i.test(e),"detector"),v_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./wardleyDiagram-EHGQE667-CSJ22zfj.cjs"));return{id:Dm,diagram:e}},"loader"),S_={id:Dm,detector:w_,loader:v_},T_=S_,Nm="cynefin",B_=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),__=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./cynefinDiagram-TSTJHNR4-Ge9B88rS.cjs"));return{id:Nm,diagram:e}},"loader"),L_={id:Nm,detector:B_,loader:__},qm="railroad",F_=g(e=>/^\s*railroad-beta/i.test(e),"detector"),M_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./railroadDiagram-RFXS5EU6-_YckPr2T.cjs"));return{id:qm,diagram:e}},"loader"),A_={id:qm,detector:F_,loader:M_},zm="railroadEbnf",E_=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),$_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ebnfDiagram-CCIWWBDH-Haez4su4.cjs"));return{id:zm,diagram:e}},"loader"),P_={id:zm,detector:E_,loader:$_},Wm="railroadAbnf",I_=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),O_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./abnfDiagram-VRR7QNED-BKvRUGcR.cjs"));return{id:Wm,diagram:e}},"loader"),R_={id:Wm,detector:I_,loader:O_},jm="railroadPeg",D_=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),N_=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pegDiagram-2B236MQR-fR_9AvHk.cjs"));return{id:jm,diagram:e}},"loader"),q_={id:jm,detector:D_,loader:N_},Ih=!1,Co=g(()=>{Ih||(Ih=!0,bs("error",vB,e=>e.toLowerCase().trim()==="error"),bs("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ho(_B,IB,n_),Ho(nT,NB,nB,iB,vT,AT,PT,RT,VT,JT,CT,pT,dT,AB,_T,pB,dB,CB,zT,jB,UB,YT,JB,d_,i_,VB,g_,k_,A_,P_,R_,q_,x_,T_,L_))},"addDiagrams"),z_=g(async()=>{U.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ir).map(async([r,{detector:i,loader:s}])=>{if(s)try{Vo(r)}catch{try{const{diagram:o,id:a}=await s();bs(a,o,i)}catch(o){throw U.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ir[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){U.error(`Failed to load ${t.length} external diagrams`);for(const r of t)U.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),W_="graphics-document document";function Hm(e,t){e.attr("role",W_),t!==""&&e.attr("aria-roledescription",t)}g(Hm,"setA11yDiagramInfo");function Ym(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(Ym,"addSVGa11yTitleDescription");var tr,Wa=(tr=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=Ct(),s=Ja(t,i);t=iw(t)+`
303
+ `;try{Vo(s)}catch{const c=xx(s);if(!c)throw new hc(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();bs(h,d)}const{db:o,parser:a,renderer:n,init:l}=Vo(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new tr(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(tr,"Diagram"),tr),Oh=[],j_=g(()=>{Oh.forEach(e=>{e()}),Oh=[]},"attachFunctions"),H_=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Um(e){const t=e.match(lc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
304
304
  `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
305
- `):t[2];let s=of(i,{schema:sf})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}g(Ym,"extractFrontMatter");var H_=g(e=>e.replace(/\r\n?/g,`
306
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Y_=g(e=>{const{text:t,metadata:r}=Ym(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),U_=g(e=>{const t=Zt.detectInit(e)??{},r=Zt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:U2(e),directive:t}},"processDirectives");function sl(e){const t=H_(e),r=Y_(t),i=U_(r.text),s=lo(r.config,i.directive);return e=j_(i.text),{code:e,title:r.title,config:s}}g(sl,"preprocessDiagram");function Um(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(Um,"toBase64");var X_=5e4,G_="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",V_="sandbox",Z_="loose",K_="http://www.w3.org/2000/svg",Q_="http://www.w3.org/1999/xlink",J_="http://www.w3.org/1999/xhtml",tL="100%",eL="100%",rL="border:0;margin:0;",iL="margin:0",sL="allow-top-navigation-by-user-activation allow-popups",oL='The "iframe" tag is not supported by your browser.',aL=["foreignobject"],nL=["dominant-baseline"];function ol(e){const t=sl(e);return xs(),fx(t.config??{}),t}g(ol,"processAndSetConfigs");async function Xm(e,t){Co();try{const{code:r,config:i}=ol(e);return{diagramType:(await Vm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}g(Xm,"parse");var Oh=g((e,t,r=[])=>{const i=ec(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),lL=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Ot(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Vl(l.styles)||n.forEach(c=>{r.insertRule(Oh(l.id,c,l.styles),r.cssRules.length)}),Vl(l.textStyles)||r.insertRule(Oh(l.id,"tspan",(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=Xo(s)+`
305
+ `):t[2];let s=af(i,{schema:of})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}g(Um,"extractFrontMatter");var Y_=g(e=>e.replace(/\r\n?/g,`
306
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),U_=g(e=>{const{text:t,metadata:r}=Um(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),X_=g(e=>{const t=Zt.detectInit(e)??{},r=Zt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:X2(e),directive:t}},"processDirectives");function ol(e){const t=Y_(e),r=U_(t),i=X_(r.text),s=lo(r.config,i.directive);return e=H_(i.text),{code:e,title:r.title,config:s}}g(ol,"preprocessDiagram");function Xm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(Xm,"toBase64");var G_=5e4,V_="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Z_="sandbox",K_="loose",Q_="http://www.w3.org/2000/svg",J_="http://www.w3.org/1999/xlink",tL="http://www.w3.org/1999/xhtml",eL="100%",rL="100%",iL="border:0;margin:0;",sL="margin:0",oL="allow-top-navigation-by-user-activation allow-popups",aL='The "iframe" tag is not supported by your browser.',nL=["foreignobject"],lL=["dominant-baseline"];function al(e){const t=ol(e);return xs(),gx(t.config??{}),t}g(al,"processAndSetConfigs");async function Gm(e,t){Co();try{const{code:r,config:i}=al(e);return{diagramType:(await Zm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}g(Gm,"parse");var Rh=g((e,t,r=[])=>{const i=rc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),hL=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Ot(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Zl(l.styles)||n.forEach(c=>{r.insertRule(Rh(l.id,c,l.styles),r.cssRules.length)}),Zl(l.textStyles)||r.insertRule(Rh(l.id,"tspan",(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=Go(s)+`
307
307
  `}else i+=`${e.themeCSS}
308
- `;return i+Xo(r)},"createCssStyles"),hL=g((e,t)=>qa(JS(`${e}{${t}}`),rT([g(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Ra)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[NS,zS,tm,jS,"@container","@starting-style"],Ra].includes(i.type)||(Y.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=rl))},"addNamespace"),eT])),"compileCSS"),cL=g((e,t,r,i)=>{const s=lL(e,r),o=Ix(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return hL(i,o)},"createUserStyles"),dL=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=De(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),uL=g((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":eL,i=Um(`<body style="${iL}">${e}</body>`);return`<iframe style="width:${tL};height:${r};${rL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${sL}">
309
- ${oL}
310
- </iframe>`},"putIntoIFrame"),Rh=g((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",K_);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Wa(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Wa,"sandboxedIframe");var fL=g((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),gL=g(async function(e,t,r){Co();const i=ol(t);t=i.code;const s=Ct();Y.debug(s),t.length>(s?.maxTextSize??X_)&&(t=G_);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=g(()=>{const j=ct(f?n:c).node();j&&"remove"in j&&j.remove()},"removeTempElements");let d=ct(document.body);const f=s.securityLevel===V_,u=s.securityLevel===Z_,p=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const X=Wa(ct(r),a);d=ct(X.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct(r);Rh(d,e,l,`font-family: ${p}`,Q_)}else{if(fL(document,e,l,a),f){const X=Wa(ct(document.body),a);d=ct(X.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=ct("body");Rh(d,e,l)}let m,y;try{m=await za.fromText(t,{title:i.title})}catch(X){if(s.suppressErrorRendering)throw h(),X;m=await za.fromText("error"),y=X}const x=d.select(c).node(),b=m.type,k=x.firstChild,v=k.firstChild,S=m.renderer.getClasses?.(t,m),_=cL(s,b,S,o),F=document.createElement("style");F.innerHTML=_,k.insertBefore(F,v);try{await m.renderer.draw(t,e,"11.16.0",m)}catch(X){throw s.suppressErrorRendering?h():bB.draw(t,e,"11.16.0"),X}const T=d.select(`${c} svg`),M=m.db.getAccTitle?.(),P=m.db.getAccDescription?.();Zm(b,T,M,P),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",J_);let O=d.select(c).node().innerHTML;if(Y.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=dL(O,f,Ce(s.arrowMarkerAbsolute)),f){const X=d.select(c+" svg").node();O=uL(O,X)}else u||(O=er.sanitize(O,{ADD_TAGS:aL,ADD_ATTR:nL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(W_(),y)throw y;return h(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function Gm(e={}){const t=vt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),dx(t),t?.theme&&t.theme in _e?t.themeVariables=_e[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=_e.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?cx(t):rc();Va(r.logLevel),Co()}g(Gm,"initialize");var Vm=g((e,t={})=>{const{code:r}=sl(e);return za.fromText(r,t)},"getDiagramFromText");function Zm(e,t,r,i){jm(t,e),Hm(t,r,i,t.attr("id"))}g(Zm,"addA11yInfo");var nr=Object.freeze({render:gL,parse:Xm,getDiagramFromText:Vm,initialize:Gm,getConfig:Ct,setConfig:ic,getSiteConfig:rc,updateSiteConfig:ux,reset:g(()=>{xs()},"reset"),globalReset:g(()=>{xs(Or)},"globalReset"),defaultConfig:Or});Va(Ct().logLevel);xs(Ct());var pL=g((e,t,r)=>{Y.warn(e),Nn(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Km=g(async function(e={querySelector:".mermaid"}){try{await mL(e)}catch(t){if(Nn(t)&&Y.error(t.str),Me.parseError&&Me.parseError(t),!e.suppressErrors)throw Y.error("Use the suppressErrors option to suppress these errors"),t}},"run"),mL=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=nr.getConfig();Y.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");Y.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(Y.debug("Start On Load: "+i?.startOnLoad),nr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Zt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(Y.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=tg(Zt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zt.detectInit(a);h&&Y.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await ey(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){pL(d,n,Me.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Qm=g(function(e){nr.initialize(e)},"initialize"),yL=g(async function(e,t,r){Y.warn("mermaid.init is deprecated. Please use run instead."),e&&Qm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Km(i)},"init"),xL=g(async(e,{lazyLoad:t=!0}={})=>{Co(),jo(...e),t===!1&&await q_()},"registerExternalDiagrams"),Jm=g(function(){if(Me.startOnLoad){const{startOnLoad:e}=nr.getConfig();e&&Me.run().catch(t=>Y.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Jm,!1);var CL=g(function(e){Me.parseError=e},"setParseErrorHandler"),Us=[],No=!1,ty=g(async()=>{if(!No){for(No=!0;Us.length>0;){const e=Us.shift();if(e)try{await e()}catch(t){Y.error("Error executing queue",t)}}No=!1}},"executeQueue"),bL=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((o,a)=>{nr.parse(e,t).then(n=>{o(n),r(n)},n=>{Y.error("Error parsing",n),Me.parseError?.(n),a(n),i(n)})}),"performCall");Us.push(s),ty().catch(i)}),"parse"),ey=g((e,t,r)=>new Promise((i,s)=>{const o=g(()=>new Promise((a,n)=>{nr.render(e,t,r).then(l=>{a(l),i(l)},l=>{Y.error("Error parsing",l),Me.parseError?.(l),n(l),s(l)})}),"performCall");Us.push(o),ty().catch(s)}),"render"),kL=g(()=>Object.keys(ir).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Me={startOnLoad:!0,mermaidAPI:nr,parse:bL,render:ey,init:yL,run:Km,registerExternalDiagrams:xL,registerLayoutLoaders:Kp,initialize:Qm,parseError:void 0,contentLoaded:Jm,setParseErrorHandler:CL,detectType:Qa,registerIconPacks:zf,getRegisteredDiagramsMetadata:kL},ja=Me;const ry="both-shift",Dh={none:{panTrigger:null,wheelZoom:!1},zoom:{panTrigger:null,wheelZoom:!0},pan:{panTrigger:"drag",wheelZoom:!1},"pan-shift":{panTrigger:"shift-drag",wheelZoom:!1},both:{panTrigger:"drag",wheelZoom:!0},"both-shift":{panTrigger:"shift-drag",wheelZoom:!0}},wL=[{value:"none",label:"操作なし"},{value:"zoom",label:"拡大縮小のみ"},{value:"pan",label:"移動のみ(左ドラッグ)"},{value:"pan-shift",label:"移動のみ(Shift+ドラッグ)"},{value:"both",label:"拡大縮小+移動(左ドラッグ)"},{value:"both-shift",label:"拡大縮小+移動(Shift+ドラッグ)"}],vL=0;function SL(e,t){return!(!e.panTrigger||t.button!==vL||e.panTrigger==="shift-drag"&&!t.shiftKey)}function TL(e,t){return e.wheelZoom&&t.shiftKey}let iy=!1,Ha=null;if(ja?.initialize)try{ja.initialize({startOnLoad:!1}),iy=!0}catch(e){Ha=e instanceof Error?e:new Error(String(e))}else Ha=new Error("Mermaid library or mermaid.initialize is not available.");const sy=({chartContent:e,interaction:t,hideInteractionMenu:r=!1})=>{const i=H.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),s=H.useRef(null),o=H.useRef(null),[a,n]=H.useState(!0),[l,c]=H.useState(null),[h,d]=H.useState(null),[f,u]=H.useState(null),[p,m]=H.useState(!1),[y,x]=H.useState(t??ry),b=H.useRef(Dh[y]),[k,v]=H.useState(!1),S=H.useRef(null);H.useEffect(()=>{t&&x(t)},[t]),H.useEffect(()=>{const T=Dh[y];b.current=T;const M=s.current;M&&(M.style.cursor=T.panTrigger==="drag"?"move":"")},[y]),H.useEffect(()=>{if(!k)return;const T=M=>{S.current&&!S.current.contains(M.target)&&v(!1)};return document.addEventListener("pointerdown",T),()=>document.removeEventListener("pointerdown",T)},[k]),H.useEffect(()=>{if(u(null),n(!0),c(null),m(!1),!iy){c(Ha?.message||"Mermaid failed to initialize globally."),n(!1);return}if(!e||e.trim()===""){n(!1),s.current&&(s.current.innerHTML=""),d(null);return}(async()=>{try{const M=e.trim();if(!M){n(!1),s.current&&(s.current.innerHTML=""),d(null);return}const P=`${i.current}-render`,O=await ja.render(P,M);O&&typeof O.svg=="string"&&O.svg.length>0?(d(O.svg),typeof O.bindFunctions=="function"?u(()=>O.bindFunctions):u(null)):(c("Failed to render Mermaid diagram: SVG content is empty or invalid."),d(null))}catch(M){console.error(`[MermaidDiagram ${i.current}] Error rendering Mermaid diagram:`,M),c(M instanceof Error?M.message:"An unknown error occurred while rendering the diagram."),d(null)}finally{n(!1)}})().catch(M=>{console.error(`[MermaidDiagram ${i.current}] Unhandled error in renderMermaid:`,M),c(M instanceof Error?M.message:"An unexpected error occurred."),n(!1)})},[e]),H.useEffect(()=>{const T=s.current;if(!T)return;const M=()=>{o.current&&(o.current.destroy(),o.current=null),m(!1)};if(!h){T.innerHTML="",M();return}T.innerHTML=h;const P=T.querySelector("svg");let O=!1;const X=[];if(P){const j=()=>{if(O)return;const R=P.getBBox();if(!R||R.width===0||R.height===0){setTimeout(j,100);return}o.current&&o.current.destroy();const $=Uh(P,{startScale:1,minScale:.5,maxScale:10,origin:"0 0",animate:!0,noBind:!0,cursor:""});o.current=$;let A=!1,N=0,I=0;const E=W=>{if(!A)return;const G=$.getScale()||1,V=(W.clientX-N)/G,K=(W.clientY-I)/G;N=W.clientX,I=W.clientY,$.pan(V,K,{relative:!0,force:!0,animate:!1})},D=()=>{A&&(A=!1,T.style.cursor=b.current.panTrigger==="drag"?"move":"",window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D))},B=W=>{SL(b.current,W)&&(A=!0,N=W.clientX,I=W.clientY,T.style.cursor="grabbing",window.addEventListener("pointermove",E),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D),W.preventDefault())},U=W=>{TL(b.current,W)&&(W.preventDefault(),$.zoomWithWheel(W))};T.addEventListener("pointerdown",B),T.addEventListener("wheel",U,{passive:!1}),X.push(()=>{T.removeEventListener("pointerdown",B),T.removeEventListener("wheel",U),window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D)}),T.style.cursor=b.current.panTrigger==="drag"?"move":"",m(!0)};j()}return f&&f(T),()=>{O=!0;for(const j of X)j();M()}},[h,f]),H.useEffect(()=>{p&&s.current&&(s.current.style.overflow="visible")},[p]);const _=H.useCallback(()=>v(T=>!T),[]),F=H.useCallback(T=>{x(T),v(!1)},[]);return a?w.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."}):l?w.jsxs("div",{className:"rounded border border-red-400 bg-red-100 p-4 text-red-600 dark:border-red-700 dark:bg-red-900/50 dark:text-red-300",children:["Error: ",l]}):w.jsxs("div",{className:"relative",children:[w.jsx("div",{ref:s,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400",style:{overflow:"visible"}}),p&&w.jsxs("div",{className:"absolute top-2 right-2 z-10 flex items-start gap-1",children:[!r&&w.jsxs("div",{ref:S,className:"relative",children:[w.jsx("button",{type:"button",onClick:_,className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"マウス操作モード","aria-haspopup":"menu","aria-expanded":k,children:w.jsx(C0,{size:18})}),k&&w.jsx("div",{role:"menu","aria-label":"マウス操作モード",className:"absolute right-0 mt-1 w-60 overflow-hidden rounded border border-gray-200 bg-white py-1 text-sm shadow-lg dark:border-gray-600 dark:bg-gray-800",children:wL.map(T=>{const M=T.value===y;return w.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":M,onClick:()=>F(T.value),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-gray-100 dark:hover:bg-gray-700 ${M?"font-semibold text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300"}`,children:[w.jsx("span",{className:"w-3 shrink-0",children:M?"✓":""}),w.jsx("span",{children:T.label})]},T.value)})})]}),w.jsx("button",{type:"button",onClick:()=>o.current?.zoomIn(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom In",children:w.jsx(_0,{size:20})}),w.jsx("button",{type:"button",onClick:()=>o.current?.zoomOut(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom Out",children:w.jsx(F0,{size:20})}),w.jsx("button",{type:"button",onClick:()=>o.current?.reset(),className:"flex h-8 items-center justify-center rounded border border-gray-200 bg-white px-2 py-1 text-gray-700 text-sm shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Reset View",children:w.jsx(y0,{size:18})})]})]})};sy.displayName="MermaidDiagramInternal";const al=H.memo(sy);function BL(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const s={};for(const o of i.split(";")){const[a,n]=o.split(":");if(a&&n){const l=a.trim().replace(/-(\w)/g,(c,h)=>h.toUpperCase());l.startsWith("-")?s[l.substring(1)]=n.trim():s[l]=n.trim()}}t.style=s;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const _L=({code:e})=>{const[t,r]=H.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button",className:"copy-button absolute top-2 right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-sm transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},LL=({htmlPromise:e,filename:t,code:r})=>{const i=H.use(e),s={replace:o=>{if(o instanceof ue.Element&&o.name==="pre"){const a=BL(o.attribs),n=t?"2.2rem 0 1rem 0":"1rem 0";if(typeof a.style=="object"){const{backgroundColor:l,...c}=a.style;a.style={...c,margin:"0",padding:"0.8rem 0"}}else a.style={margin:"0",padding:"0.8rem 0"};return a.className=`${a.className||""} bg-gray-900 dark:bg-gray-900`,w.jsxs("div",{className:"relative",style:{margin:n},children:[t&&w.jsx("div",{className:"code-filename absolute -top-4 left-0 z-0 rounded-md bg-gray-200 px-2 py-0.5 text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-100",children:t}),w.jsx(_L,{code:r}),w.jsx("pre",{...a,children:ue.domToReact(o.children,s)})]})}},htmlparser2:{lowerCaseTags:!0}};return w.jsx(w.Fragment,{children:ue(i,s)})},FL=/^(diff)?:?(\w+):?([\w.-]*)?/,ML=()=>({code(e){for(const t of e.children){if(t.type!=="element")continue;const r=t.children[0];if(r?.type!=="element")continue;const i=r.children[0];if(i?.type!=="text")continue;const s=i.value;let o,a="",n="";if(s.startsWith("+")?(o="+",a="background-color: rgba(16, 185, 129, 0.2);",n="bg-green-200 dark:bg-green-400/90 text-green-700"):s.startsWith("-")&&(o="-",a="background-color: rgba(239, 68, 68, 0.2);",n="bg-red-200 dark:bg-red-400/90 text-red-700"),o){t.properties.style=a,i.value=s.substring(1).trimStart();const l={type:"element",tagName:"span",properties:{className:`inline-flex items-center justify-center w-4 h-4 rounded-full select-none font-bold text-[0.5rem] mr-2 ${n}`},children:[{type:"text",value:o==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),AL=e=>{const t=FL.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},nl=({lang:e,code:t,node:r})=>{const i=e??r?.lang??void 0,s=t??r?.value??"",{isDiff:o,lang:a,filename:n}=AL(i),l=H.useMemo(async()=>{const c=[];return o&&c.push(ML()),await zy.codeToHtml(s,{lang:a,themes:{light:"solarized-light",dark:"github-dark-high-contrast"},transformers:c})},[s,a,o]);return a==="mermaid"?w.jsx(al,{chartContent:s}):w.jsx(H.Suspense,{fallback:w.jsx("div",{className:"dark:text-white",children:"🌀 Loading code..."}),children:w.jsx(LL,{htmlPromise:l,filename:n,code:s})})},oy=({code:e})=>{const[t,r]=H.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button",className:"copy-button absolute right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-xs transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},EL=({node:e})=>{const t=H.useRef(null);return H.useLayoutEffect(()=>{try{t.current&&Ya.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),w.jsxs("div",{className:"relative",children:[w.jsx(oy,{code:e.value}),w.jsx("article",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})]})},$L=(e,t=64)=>`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&size=${t}`,ll=({href:e,isExternal:t,metadata:r})=>{const[i,s]=H.useState(!1);H.useEffect(()=>{s(!0)},[]);const o=H.useMemo(()=>r?Promise.resolve(r):i?fetch(`/api/site_metadata?url=${encodeURIComponent(e)}`).then(a=>a.ok?a.json():null).catch(()=>null):null,[r,e,i]);return o===null?w.jsx(Nh,{}):w.jsx(H.Suspense,{fallback:w.jsx(Nh,{}),children:w.jsx(IL,{metadataPromise:o,href:e,isExternal:t})})},IL=({metadataPromise:e,href:t})=>{const r=H.use(e);if(r===null)return w.jsx(PL,{href:t});let i=t;try{i=new URL(r.url||t).hostname}catch{}return w.jsxs("a",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 hover:!border-gray-300 dark:hover:!border-neutral-700 !no-underline flex h-36 w-full gap-2 overflow-hidden rounded-xl bg-white shadow-sm transition-all duration-300 hover:-translate-y-0.5 hover:shadow-md dark:bg-neutral-900",href:r.url||t,target:"_blank",rel:"noreferrer",children:[w.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2 px-4",children:[w.jsx("div",{className:"!text-gray-900 dark:!text-gray-100 !no-underline line-clamp-1 break-words font-semibold",children:r.title||r.site_name||t}),w.jsx("div",{className:"my-1 flex-1",children:w.jsx("div",{className:"!text-gray-500 dark:!text-gray-400 !no-underline line-clamp-2 break-words text-xs",children:r.description})}),w.jsxs("div",{className:"!no-underline mt-auto flex items-center gap-2",children:[w.jsx("img",{src:$L(t,16),alt:"",width:16,height:16,className:"rounded-sm"}),w.jsx("span",{className:"!text-gray-400 dark:!text-gray-500 !no-underline line-clamp-1 text-xs",children:r.site_name||i})]})]}),w.jsx("div",{className:"h-full w-48 max-w-[35%] flex-shrink-0 overflow-hidden",children:r.image?w.jsx("img",{className:"h-full w-full object-cover transition-transform duration-300 hover:scale-105",src:r.image,alt:""}):w.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 text-gray-300 dark:bg-neutral-800 dark:text-neutral-700",children:w.jsxs("svg",{className:"h-8 w-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[w.jsx("title",{children:"Placeholder Image"}),w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})]})})})]})},PL=({href:e})=>w.jsx("a",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 hover:!border-gray-300 dark:hover:!border-neutral-700 !no-underline flex gap-2 rounded-xl bg-white p-4 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-sm dark:bg-neutral-900",href:e,target:"_blank",rel:"noreferrer",children:w.jsx("div",{className:"!text-gray-500 dark:!text-gray-400 !no-underline break-all text-sm",children:e})}),Nh=()=>w.jsxs("div",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 flex h-36 w-full gap-2 overflow-hidden rounded-xl bg-white shadow-sm dark:bg-neutral-900",children:[w.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2 px-4",children:[w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-200 dark:bg-neutral-800"}),w.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-200 dark:bg-neutral-800"})]}),w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("div",{className:"h-3 w-full animate-pulse rounded bg-gray-200 dark:bg-neutral-800"}),w.jsx("div",{className:"h-3 w-4/5 animate-pulse rounded bg-gray-200 dark:bg-neutral-800"})]}),w.jsx("div",{className:"mt-auto h-4 w-4 animate-pulse rounded-sm bg-gray-200 dark:bg-neutral-800"})]}),w.jsx("div",{className:"h-full w-48 max-w-[35%] flex-shrink-0 animate-pulse bg-gray-200 dark:bg-neutral-800"})]});let es=null;const OL=()=>typeof window>"u"||typeof document>"u"?Promise.resolve(null):es||(es=new Promise((e,t)=>{if(window.twttr?.widgets)return e(window.twttr.widgets);const r="twitter-wjs",i=()=>{window.twttr?.widgets?e(window.twttr.widgets):t(new Error("Twitter widget script loaded, but `window.twttr.widgets` not found."))},s=document.getElementById(r);if(s){s.addEventListener("load",i),s.addEventListener("error",()=>t(new Error("Failed to load Twitter script.")));return}const o=document.createElement("script");o.id=r,o.src="https://platform.twitter.com/widgets.js",o.async=!0,o.charset="utf-8",o.onload=i,o.onerror=()=>t(new Error("Failed to load Twitter script.")),document.body.appendChild(o)}),es),RL=({promise:e})=>(H.use(e),null),DL=({setPromise:e,createPromise:t})=>{const r=H.useRef(null);return H.useEffect(()=>{const i=r.current;if(!i){console.warn("Mount point for Twitter widget not found.");return}const s=t(i).then(o=>{if(!o){console.warn("createPromise から要素が返されませんでした。");return}return o}).catch(o=>{console.error("ツイートウィジェットの作成中にエラーが発生しました:",o),i.innerText=`ツイートの読み込みエラー: ${o.message}`});return e(s),()=>{i.innerHTML=""}},[t,e]),w.jsx("div",{ref:r,className:"twitter-embed min-h-24"})},NL=({node:e,loadWidgetsPromise:t,theme:r})=>{const i=H.use(t),s=H.useRef(null),o=H.useRef(null),[a,n]=H.useState(null),[l,c]=H.useState(null),h=H.useCallback(f=>{let u;return f&&i?new Promise((p,m)=>{s.current=p,o.current=m;const y=new MutationObserver(()=>{f?.querySelector(".twitter-tweet > iframe:last-of-type")?.addEventListener("load",()=>{u&&clearTimeout(u),y?.disconnect(),s.current=null,o.current=null,p(f)},{once:!0,passive:!0,capture:!0})});u=setTimeout(()=>{y.disconnect(),s.current=null,o.current=null,m(new Error("ツイートの作成が 10 秒後にタイムアウトしました。"))},1e4),y.observe(f,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),i?.createTweet(e.tweetId,f,{cards:e.cards,conversation:e.conversation,theme:e.theme||r,width:e.width,align:e.align,lang:e.lang||"ja",dnt:e.dnt}).catch(x=>{u&&clearTimeout(u),y.disconnect(),s.current=null,o.current=null,m(x),console.error("ツイートウィジェットの作成中にエラーが発生しました:",x)})}):new Promise((p,m)=>{console.warn("TweetEmbed: No targetNode or twitterWidgetsJS available."),m(new Error("No targetNode or twitterWidgetsJS available."))})},[i,e.tweetId,e.cards,e.conversation,e.theme,e.width,e.align,e.lang,e.dnt,r]),d=H.useMemo(()=>w.jsx(DL,{setPromise:c,createPromise:h}),[h]);return H.useEffect(()=>(n(d),()=>{s.current&&(s.current(void 0),s.current=null,o.current=null)}),[d]),i?w.jsxs(H.Suspense,{fallback:w.jsx("div",{className:"min-h-24",children:"🌀 Loading Tweet..."}),children:[a,l&&w.jsx(RL,{promise:l})]}):w.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter renderer..."})},hl=({node:e,theme:t})=>{const r=H.useMemo(()=>OL(),[]);return w.jsx(H.Suspense,{fallback:w.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter widget..."}),children:w.jsx(NL,{node:e,loadWidgetsPromise:r,theme:t})})},cl=({node:e})=>{const{videoId:t,params:r}=e,i={...r,rel:"0"},s=new URLSearchParams(i).toString();return w.jsx("iframe",{className:"aspect-video w-full max-w-[560px] rounded-lg",src:`https://www.youtube.com/embed/${t}${s?`?${s}`:""}`,title:"YouTube video player",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})},Xt=new ps.Logger(ps.LogLevel.INFO,"[DifyIFramePlugin]"),ay=({iframeHtml:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=H.useState(!0),[s,o]=H.useState(!1),a=H.useRef(null),n=H.useRef(null),c=H.useCallback(p=>p.match(/src\s*=\s*["']([^"']*)["']/i)?.[1]||"",[])(e),h=H.useCallback(p=>{try{const m=new URL(p);return t.includes(m.hostname)}catch{return!1}},[t]),d=H.useCallback(p=>{if(!h(p.origin))return;const{type:m}=p.data;m==="dify-chatbot-iframe-ready"&&(Xt.info("Dify chatbot iframe is ready"),i(y=>y&&(o(!1),a.current&&(clearTimeout(a.current),a.current=null),n.current&&(clearTimeout(n.current),n.current=null),!1)))},[h]),f=H.useCallback(()=>{const p=document.querySelector(`iframe[src="${c}"]`);if(p)try{if(!p.contentDocument)throw new Error("Cannot access iframe content");i(y=>y&&(o(!1),!1))}catch{Xt.info("Crossorigin error detected, showing auth prompt"),o(y=>y||(i(!1),!0))}},[c]),u=H.useCallback(p=>{const m=window.open(p,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!m){Xt.error("ポップアップがブロックされました");return}const y=setInterval(()=>{if(m.closed){clearInterval(y),Xt.info("ポップアップが閉じられました");try{Xt.info("ポップアップURL:",m.location.href)}catch(b){Xt.info("クロスオリジンのためURLにアクセスできません:",b)}const x=document.querySelector(`iframe[src="${p}"]`);if(x?.src){const b=x.src;i(k=>k||!0),o(k=>k&&!1),x.src="",setTimeout(()=>{x.src=b,a.current=setTimeout(()=>{Xt.warn("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),f()},5e3)},100)}}},1e3);Xt.info("ポップアップを開きました:"),Xt.info("- 初期URL:",p),Xt.info("- ウィンドウ名:","dify-oauth"),Xt.info("- ウィンドウサイズ: 500x600")},[f]);return H.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[d]),H.useEffect(()=>{const p=setTimeout(()=>{Xt.warn("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),f()},5e3);return n.current=p,()=>{n.current&&(clearTimeout(n.current),n.current=null)}},[f]),H.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),h(c)?w.jsxs("div",{className:"dify-iframe-container",children:[r&&!s&&w.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[w.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),w.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),s&&w.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[w.jsx("div",{className:"flex items-center",children:w.jsxs("div",{className:"text-blue-800",children:[w.jsx("h3",{className:"font-medium",children:"認証が必要です"}),w.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),w.jsx("div",{className:"mt-4",children:w.jsx("button",{type:"button",onClick:()=>u(c),className:"rounded-md border border-gray-700 bg-gray-900 px-4 py-2 font-medium text-sm text-white shadow-lg transition-colors hover:bg-gray-800",children:"OAuth 認証を開始"})})]}),w.jsx("div",{className:`${r||s?"hidden":"block"}`,dangerouslySetInnerHTML:{__html:e}})]}):(Xt.warn("DifyIFramePlugin: Invalid domain for iframe:",c),null)},qL=/^[a-z][a-z0-9+.-]*:/,ny=({htmlContent:e,theme:t="light",iFrameAllowedDomains:r=[],mermaidInteraction:i})=>{const s={replace:o=>{if(o instanceof ue.Element){if(o.name==="pre"&&o.children.length===1){const a=o.children[0];if(a instanceof ue.Element&&a.name==="code"&&a.attribs.class?.includes("language-mermaid")){const n=ue.domToReact(a.children);return w.jsx(al,{chartContent:n,interaction:i})}}if(o.name==="pre"&&o.children.length===1){const a=o.children[0];if(a instanceof ue.Element&&a.name==="code"){const l=(a.attribs.class||"").replace("language-",""),c=ue.domToReact(a.children);return w.jsx(nl,{lang:l,code:c,theme:t})}}if(o.name==="iframe"){const a=o.attribs.src||"";if(o.attribs["data-plugin-type"]==="dify"){const l=o.attribs.width||"100%",c=o.attribs.height||"600px",h=o.attribs.title||"",d=o.attribs.frameborder||"0",f=o.attribs.allow||"",u=o.attribs.allowfullscreen!==void 0?"allowfullscreen":"",p=`<iframe src="${a}" data-plugin-type="dify" width="${l}" height="${c}" title="${h}" frameborder="${d}" allow="${f}" ${u}></iframe>`;return w.jsx(ay,{iframeHtml:p,iFrameAllowedDomains:r})}if(a)try{const l=new URL(a);if(!r.includes(l.hostname))return null}catch{return null}}if(o.name==="div"){const a=o.attribs["data-plugin-type"];if(a==="youtube"){const n=o.attribs["data-video-id"];return w.jsx(cl,{node:{type:"youtube-embed",videoId:n,params:{}}})}if(a==="twitter"){const n=o.attribs["data-tweet-id"];return w.jsx(hl,{node:{type:"twitter-embed",tweetId:n},theme:t==="dark"?"dark":"light"})}if(a==="block-link"){const n=o.attribs["data-url"];return w.jsx(ll,{href:n,isExternal:!0})}}if(o.name==="span"&&o.attribs.class?.includes("math")){const a=o.attribs.class.includes("display"),n=h=>{let d="";for(const f of h)f.type==="text"?d+=f.data:f.children&&(d+=n(f.children));return d};let c=n(o.children).trim();a?c=c.replace(/^\\\[/,"").replace(/\\\]$/,""):c=c.replace(/^\\\(/,"").replace(/\\\)$/,"");try{const h=Ya.renderToString(c,{displayMode:a,throwOnError:!1});return a?w.jsxs("span",{className:"group relative block",children:[w.jsx(oy,{code:c}),w.jsx("span",{dangerouslySetInnerHTML:{__html:h}})]}):w.jsx("span",{dangerouslySetInnerHTML:{__html:h}})}catch(h){return console.error("Failed to render math:",h),null}}if(o.name==="a"){const{class:a,...n}=o.attribs;n.href&&qL.test(n.href)&&(n.target="_blank",n.rel="noreferrer");const l=`${a||""} inline-block w-fit text-link underline visited:text-link-visited`.trim();return w.jsx("a",{className:l,...n,children:ue.domToReact(o.children,s)})}}}};return w.jsx("div",{className:"markdown-body",children:ue(e,s)})},ly=({headings:e,className:t="",onHeadingClick:r})=>{if(e.length===0)return null;const i=Math.min(...e.map(s=>s.depth));return w.jsx("nav",{className:`toc ${t}`,"aria-label":"Table of contents",children:w.jsx("ul",{className:"m-0 list-none p-0",children:e.map(s=>w.jsx("li",{className:"py-1",style:{paddingLeft:`${(s.depth-i)*1}rem`},children:w.jsx("a",{href:`#${s.id}`,className:"block truncate text-gray-600 no-underline hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400",onClick:o=>{r&&(o.preventDefault(),r(s.id))},title:s.text,children:s.text})},s.id))})})},hy=[{name:"None",className:""},{name:"GitHub",className:"markdown-body"},{name:"Zenn",className:"znc"}],zL=["left","center","right"],cy="left",WL=(e,t=cy)=>e!=null&&zL.includes(e)?e:t,qo=[{value:"left",label:"左揃え",Icon:T0},{value:"center",label:"中央揃え",Icon:k0},{value:"right",label:"右揃え",Icon:v0}],jL=e=>e==="center"?"auto":e==="right"?"auto 0":"0 auto",HL=24,YL=60,UL=48,Qe=e=>`calc(max(var(--aiquants-menu-pinned-width, 0px) + ${HL}px, ${YL}px) + ${e*UL}px)`,XL=H.memo(function({headings:t,onHeadingClick:r,position:i,zIndex:s=60,onActivate:o,isOpen:a,onToggle:n,onClose:l,isPinned:c,onPinToggle:h}){const d=H.useRef(null),f={top:"0",right:Qe(0),...i},u=a,p=H.useCallback(()=>{n(),o?.()},[o,n]),m=H.useCallback(()=>{l()},[l]);return H.useEffect(()=>{if(!u||c)return;const y=x=>{d.current&&!d.current.contains(x.target)&&m()};return document.addEventListener("pointerdown",y),()=>{document.removeEventListener("pointerdown",y)}},[m,c,u]),w.jsxs("div",{ref:d,className:"pointer-events-none fixed flex flex-col items-end",style:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,zIndex:s,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:p,"aria-label":"目次を開く",children:w.jsx(d0,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),u&&w.jsxs("div",{className:"markdown-viewer-scrollbar-thin pointer-events-auto mt-2 max-h-[80vh] w-64 overflow-y-auto rounded-lg border border-gray-200 bg-white p-4 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"font-bold text-gray-500 text-sm uppercase tracking-wider",children:"目次"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:h,"aria-label":c?"目次のピン留めを解除":"目次をピン留め",children:c?w.jsx(Ga,{className:"h-4 w-4"}):w.jsx(Xa,{className:"h-4 w-4"})})]}),w.jsx(ly,{headings:t,className:"text-sm",onHeadingClick:r})]})]})}),GL=H.memo(function({currentStyle:t,availableStyles:r,onStyleChange:i,position:s,zIndex:o=50,onActivate:a,isOpen:n,onToggle:l,onClose:c,isPinned:h,onPinToggle:d}){const f=H.useRef(null),u={top:"0",right:Qe(1),...s},p=n,m=H.useCallback(()=>{l(),a?.()},[a,l]),y=H.useCallback(()=>{c()},[c]);return H.useEffect(()=>{if(!p||h)return;const x=b=>{f.current&&!f.current.contains(b.target)&&y()};return document.addEventListener("pointerdown",x),()=>{document.removeEventListener("pointerdown",x)}},[y,h,p]),w.jsxs("div",{ref:f,className:"pointer-events-none fixed flex flex-col items-end",style:{top:u.top,right:u.right,bottom:u.bottom,left:u.left,zIndex:o,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:m,"aria-label":"表示スタイルを選択",children:w.jsx(f0,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),p&&w.jsxs("div",{className:"pointer-events-auto mt-2 w-48 rounded-lg border border-gray-200 bg-white p-2 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"px-2 font-bold text-gray-500 text-sm uppercase tracking-wider",children:"表示スタイル"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:d,"aria-label":h?"スタイル選択のピン留めを解除":"スタイル選択をピン留め",children:h?w.jsx(Ga,{className:"h-4 w-4"}):w.jsx(Xa,{className:"h-4 w-4"})})]}),w.jsx("div",{className:"space-y-1",children:r.map(x=>{const b=t===x.name;return w.jsx("button",{type:"button",className:`w-full rounded px-2 py-1 text-left text-sm transition-colors ${b?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{i(x.name),h||y()},children:x.name},x.name)})})]})]})}),VL=H.memo(function({currentAlign:t,onAlignChange:r,position:i,zIndex:s=40,onActivate:o,isOpen:a,onToggle:n,onClose:l,isPinned:c,onPinToggle:h}){const d=H.useRef(null),f={top:"0",right:Qe(2),...i},u=a,p=(qo.find(x=>x.value===t)??qo[0]).Icon,m=H.useCallback(()=>{n(),o?.()},[o,n]),y=H.useCallback(()=>{l()},[l]);return H.useEffect(()=>{if(!u||c)return;const x=b=>{d.current&&!d.current.contains(b.target)&&y()};return document.addEventListener("pointerdown",x),()=>{document.removeEventListener("pointerdown",x)}},[y,c,u]),w.jsxs("div",{ref:d,className:"pointer-events-none fixed flex flex-col items-end",style:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,zIndex:s,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:m,"aria-label":"揃えを選択",children:w.jsx(p,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),u&&w.jsxs("div",{className:"pointer-events-auto mt-2 w-48 rounded-lg border border-gray-200 bg-white p-2 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"px-2 font-bold text-gray-500 text-sm uppercase tracking-wider",children:"揃え"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:h,"aria-label":c?"揃え選択のピン留めを解除":"揃え選択をピン留め",children:c?w.jsx(Ga,{className:"h-4 w-4"}):w.jsx(Xa,{className:"h-4 w-4"})})]}),w.jsx("div",{className:"space-y-1",children:qo.map(({value:x,label:b,Icon:k})=>{const v=t===x;return w.jsxs("button",{type:"button",className:`flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors ${v?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{r(x),c||y()},children:[w.jsx(k,{className:"h-4 w-4"}),b]},x)})})]})]})}),ZL=H.memo(function({parseResult:t,theme:r,styleClassName:i,iFrameAllowedDomains:s}){return w.jsx("div",{className:"w-full min-w-0",children:w.jsx("div",{className:i,"data-theme":r,children:w.jsx(ny,{htmlContent:t.htmlContent,theme:r,iFrameAllowedDomains:s})})})});function dy(){const[e,t]=H.useState("toc"),[r,i]=H.useState(!1),[s,o]=H.useState(!1),[a,n]=H.useState(!1),[l,c]=H.useState(!1),[h,d]=H.useState(!1),[f,u]=H.useState(!1),p=H.useCallback(()=>t("toc"),[]),m=H.useCallback(()=>i(P=>!P),[]),y=H.useCallback(()=>i(!1),[]),x=H.useCallback(()=>c(P=>!P),[]),b=H.useCallback(()=>t("style"),[]),k=H.useCallback(()=>o(P=>!P),[]),v=H.useCallback(()=>o(!1),[]),S=H.useCallback(()=>d(P=>!P),[]),_=H.useCallback(()=>t("align"),[]),F=H.useCallback(()=>n(P=>!P),[]),T=H.useCallback(()=>n(!1),[]),M=H.useCallback(()=>u(P=>!P),[]);return{lastActiveMenu:e,isTocOpen:r,isStyleOpen:s,isAlignOpen:a,isTocPinned:l,isStylePinned:h,isAlignPinned:f,activateToc:p,toggleToc:m,closeToc:y,togglePinToc:x,activateStyle:b,toggleStyle:k,closeStyle:v,togglePinStyle:S,activateAlign:_,toggleAlign:F,closeAlign:T,togglePinAlign:M}}function KL({parseResult:e,content:t,error:r=null,isLoading:i=!1,theme:s,style:o,onStyleChange:a,availableStyles:n=hy,align:l=cy,onAlignChange:c,showToc:h=!0,showStyle:d=!0,showAlign:f=!0,tocPosition:u,stylePosition:p,alignPosition:m,width:y,maxWidth:x,padding:b=16,iFrameAllowedDomains:k,emptyMessage:v="ファイルを選択してください。",toolbar:S}){const _=H.useRef(null),F=H.useRef(null),T=dy(),M=S??T,P=Number.isFinite(b)&&b>=0?b:16,O=f&&typeof c=="function",X=H.useCallback(Z=>{const st=_.current;if(st){const ft=st.querySelector("[data-theme]"),dt=st.getBoundingClientRect(),pt=ft?.children;let _t=-1,zt=Number.POSITIVE_INFINITY;if(pt)for(let Yt=0;Yt<pt.length;Yt+=1){const We=pt[Yt],dl=Math.abs(We.getBoundingClientRect().top-dt.top);dl<zt&&(zt=dl,_t=Yt)}if(pt&&_t>=0){const We=pt[_t].getBoundingClientRect();F.current={childIndex:_t,offset:We.top-dt.top}}else F.current=null}a(Z)},[a]);H.useLayoutEffect(()=>{const Z=F.current;if(!Z)return;F.current=null;const st=_.current;if(!st)return;const dt=st.querySelector("[data-theme]")?.children[Z.childIndex];if(!dt)return;const pt=st.getBoundingClientRect(),zt=dt.getBoundingClientRect().top-pt.top;st.scrollTop+=zt-Z.offset});const j=H.useCallback(Z=>{const st=document.getElementById(Z);st&&st.scrollIntoView({behavior:"smooth"})},[]),R=H.useMemo(()=>n.find(st=>st.name===o)?.className??"markdown-body",[n,o]),$=e?.headings??[],A=$.length>0,N=h&&A,I=M.lastActiveMenu==="style"?60:50,E=M.lastActiveMenu==="toc"?60:50,D=M.lastActiveMenu==="align"?60:50;let B=0;const U=N?Qe(B++):void 0,W=d?Qe(B++):void 0,G=O?Qe(B++):void 0,V=Z=>O&&c?w.jsx(VL,{currentAlign:l,onAlignChange:c,position:{right:Z,...m},zIndex:D,onActivate:M.activateAlign,isOpen:M.isAlignOpen,onToggle:M.toggleAlign,onClose:M.closeAlign,isPinned:M.isAlignPinned,onPinToggle:M.togglePinAlign}):null,K=()=>i?w.jsx("p",{children:"🌀 Loading data..."}):r?w.jsxs("p",{className:"text-red-500",children:["エラー: ",r]}):e?w.jsxs("div",{className:"relative w-full min-w-0",children:[w.jsx(ZL,{parseResult:e,theme:s,styleClassName:R,iFrameAllowedDomains:k}),d&&w.jsx(GL,{currentStyle:o,availableStyles:n,onStyleChange:X,position:{right:W,...p},zIndex:I,onActivate:M.activateStyle,isOpen:M.isStyleOpen,onToggle:M.toggleStyle,onClose:M.closeStyle,isPinned:M.isStylePinned,onPinToggle:M.togglePinStyle}),N&&w.jsx(XL,{headings:$,onHeadingClick:j,position:{right:U,...u},zIndex:E,onActivate:M.activateToc,isOpen:M.isTocOpen,onToggle:M.toggleToc,onClose:M.closeToc,isPinned:M.isTocPinned,onPinToggle:M.togglePinToc}),V(G)]}):t!==null?w.jsxs(w.Fragment,{children:[w.jsx("pre",{className:"whitespace-pre-wrap break-all",children:t}),V(Qe(0))]}):w.jsx("p",{children:v});return w.jsx("div",{ref:_,className:"grid h-full w-full overflow-x-auto overflow-y-auto *:min-w-0",style:{padding:`${P}px`},children:w.jsx("div",{style:{width:y,maxWidth:x,marginInline:jL(l)},children:K()})})}const uy=({node:e})=>{const r=e.data?.siteMetadata;return w.jsx("div",{className:"mt-6 mb-6",children:w.jsx(ll,{href:e.url,isExternal:!0,metadata:r})})},fy=({node:e})=>w.jsx("del",{children:w.jsx(St,{nodes:e.children})}),gy=({node:e})=>w.jsx("em",{children:w.jsx(St,{nodes:e.children})}),py=({node:e})=>w.jsx("sup",{children:w.jsxs("a",{id:`fnref-${e.identifier}`,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",href:`#fn-${e.identifier}`,children:["[",e.identifier,"]"]})}),QL=({nodes:e,theme:t="light"})=>e.length===0?null:w.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:w.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>w.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:w.jsx(St,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),my=({node:e})=>w.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),JL=e=>e.replace(/<rt\b[^>]*>[\s\S]*?<\/rt>/gi,"").replace(/<rp\b[^>]*>[\s\S]*?<\/rp>/gi,"").replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&#(\d+);/g,(s,o)=>{const a=Number(o);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/&#x([0-9a-f]+);/gi,(s,o)=>{const a=Number.parseInt(o,16);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/\s+/g," ").trim(),yy=e=>{const t=r=>{if(!r||typeof r!="object")return"";if("type"in r&&r.type==="html"){const i=r.value;return typeof i=="string"?JL(i):""}if("value"in r){const i=r.value;if(typeof i=="string")return i}return"children"in r&&Array.isArray(r.children)?r.children.map(i=>t(i)).join(""):""};return e.map(r=>t(r)).join("").replace(/\s+/g," ").trim()},tF=e=>{switch(e){case 1:return"border-b-2 border-gray-300 pb-2 text-3xl font-bold dark:border-gray-600 dark:text-gray-100";case 2:return"border-b border-gray-300 pb-2 text-2xl font-semibold dark:border-gray-600 dark:text-gray-200";case 3:return"text-xl font-semibold dark:text-gray-300";default:return"text-lg font-medium dark:text-gray-400"}},xy=({node:e})=>{const t=new Wy,r=`h${e.depth}`,i=e.data?.hProperties?.id,s=t.slug(yy(e.children));return w.jsx(r,{id:i||s,className:tF(e.depth),children:w.jsx(St,{nodes:e.children})})},eF=e=>{const t={};return e.split(";").forEach(r=>{const[i,...s]=r.split(":");if(i&&s.length>0){const o=s.join(":"),a=i.trim().replace(/-([a-z])/g,n=>n[1]?n[1].toUpperCase():"");t[a]=o.trim()}}),t},rF=({node:e,theme:t,iFrameAllowedDomains:r})=>{const{tagName:i="div",properties:s={}}=e.data||{},o=i,a={...s};if(s.style&&typeof s.style=="string"){const n=eF(s.style);a.style=n}return w.jsx(o,{...a,children:w.jsx(St,{nodes:e.children,theme:t,iFrameAllowedDomains:r})})},iF={dify:ay},sF=e=>iF[e]||null,oF=/^[a-z][a-z0-9+.-]*:/,aF=({node:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=H.useState(""),[s,o]=H.useState(!1),[a,n]=H.useState(null);H.useEffect(()=>{if(o(!0),typeof window<"u"){const c=er(window);let h=null;c.addHook("afterSanitizeAttributes",f=>{const u=f.tagName.toLowerCase();if(u==="iframe"){const p=f.getAttribute("src"),m=f.getAttribute("data-plugin-type");if(p)try{const y=new URL(p);t.includes(y.hostname)?m&&(h={type:m,iframeHtml:f.outerHTML}):f.removeAttribute("src")}catch{f.removeAttribute("src")}}if(u==="a"){f.classList.add("inline-block","w-fit","text-link","underline","visited:text-link-visited");const p=f.getAttribute("href");p&&oF.test(p)&&(f.setAttribute("target","_blank"),f.setAttribute("rel","noreferrer"))}});const d=c.sanitize(e.value,{ADD_TAGS:["iframe"],ADD_ATTR:["src","frameborder","allow","allowfullscreen","target","rel","data-plugin-type","width","height","title","class","style"]});h?n(h):i(d)}},[e.value,t]);const l=/^\s*<(address|article|aside|blockquote|details|dialog|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h[1-6]|header|hgroup|hr|li|main|nav|ol|p|pre|section|table|ul)/i.test(e.value);if(!s)return null;if(a){const{type:c,iframeHtml:h}=a,d=sF(c);if(d)return w.jsx(d,{iframeHtml:h,iFrameAllowedDomains:t});console.warn(`Unknown or unregistered plugin type: ${c}`)}return r===""?null:l?w.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):w.jsx("span",{dangerouslySetInnerHTML:{__html:r}})},Cy=({node:e})=>{if(!e.url)return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return w.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 inline-block w-fit max-w-full",children:[w.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&w.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},by=({node:e})=>w.jsx("code",{className:"rounded-md bg-gray-200 px-1.5 py-1 font-mono text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-200",children:e.value}),nF=({node:e})=>{const t=H.useRef(null);return H.useLayoutEffect(()=>{try{t.current&&Ya.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),w.jsx("span",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})},lF=/^[a-z][a-z0-9+.-]*:/,ky=({node:e})=>{const t=lF.test(e.url);return w.jsx("a",{className:"inline-block w-fit text-link underline visited:text-link-visited",href:e.url,target:t?"_blank":void 0,rel:t?"noreferrer":void 0,children:w.jsx(St,{nodes:e.children})})},wy=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?w.jsx("li",{children:w.jsx(St,{nodes:e.children[0].children})}):w.jsx("li",{children:w.jsx(St,{nodes:e.children})}),vy=({node:e})=>{const t=e.ordered?"ol":"ul";return w.jsx(t,{children:w.jsx(St,{nodes:e.children})})},hF=({node:e})=>w.jsx("mark",{children:w.jsx(St,{nodes:e.children})}),Sy=({node:e})=>w.jsx("p",{children:w.jsx(St,{nodes:e.children})}),Ty=({node:e})=>w.jsx("strong",{children:w.jsx(St,{nodes:e.children})}),cF=({node:e})=>w.jsx("sub",{children:w.jsx(St,{nodes:e.children})}),dF=({node:e})=>w.jsx("sup",{children:w.jsx(St,{nodes:e.children})}),qh=e=>{const t=e.data?.hProperties;return{merged:t?.merged??!1,colSpan:t?.colSpan,rowSpan:t?.rowSpan,textAlign:t?.textAlign}},By=({node:e})=>{const[t,...r]=e.children;return w.jsx("div",{className:"overflow-x-auto",children:w.jsxs("table",{className:"w-full border-collapse border-none",children:[w.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:w.jsx("tr",{children:t.children.map((i,s)=>{const{merged:o,colSpan:a,rowSpan:n,textAlign:l}=qh(i);return o?null:w.jsx("th",{colSpan:a,rowSpan:n,style:{textAlign:l??e.align?.[s]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:w.jsx(St,{nodes:i.children})},`mdast-table-node-${e.type}-${s}`)})})}),w.jsx("tbody",{children:r.map((i,s)=>w.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((o,a)=>{const{merged:n,colSpan:l,rowSpan:c,textAlign:h}=qh(o);return n?null:w.jsx("td",{colSpan:l,rowSpan:c,style:{textAlign:h??e.align?.[a]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:w.jsx(St,{nodes:o.children})},`mdast-table-node-${e.type}-${a}`)})},`mdast-table-node-${e.type}-${s}`))})]})})},_y=({node:e})=>w.jsx(w.Fragment,{children:e.value}),Ly=()=>w.jsx("hr",{className:"border-gray-300 dark:border-gray-600"}),Fy=({node:e})=>{const t=e.data?.title||"";return w.jsxs("details",{className:"markdown-details",children:[w.jsx("summary",{children:t}),w.jsx("div",{className:"markdown-details-content",children:w.jsx(St,{nodes:e.children})})]})},My=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return w.jsxs("aside",{className:r,children:[w.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),w.jsx("div",{className:"message-content",children:w.jsx(St,{nodes:e.children})})]})},St=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,s)=>{switch(i.type){case"block-link":return w.jsx(uy,{node:i},`mdast-node-${i.type}-${s}`);case"blockquote":return w.jsx(Ay,{node:i},`mdast-node-${i.type}-${s}`);case"break":return w.jsx("br",{},`mdast-node-${i.type}-${s}`);case"code":return w.jsx(nl,{node:i,theme:t},`mdast-node-${i.type}-${s}`);case"delete":return w.jsx(fy,{node:i},`mdast-node-${i.type}-${s}`);case"details":return w.jsx(Fy,{node:i},`mdast-node-${i.type}-${s}`);case"emphasis":return w.jsx(gy,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteReference":return w.jsx(py,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteDefinition":return null;case"footnote-back-link":return w.jsx(my,{node:i},`mdast-node-${i.type}-${s}`);case"heading":return w.jsx(xy,{node:i},`mdast-node-${i.type}-${s}`);case"html":return w.jsx(aF,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${s}`);case"html-block-container":{const o=i,a=`mdast-node-${o.type}-${o.position?.start?.offset??"na"}-${o.position?.end?.offset??"na"}`;return w.jsx(rF,{node:o,theme:t,iFrameAllowedDomains:r},a)}case"image":return w.jsx(Cy,{node:i},`mdast-node-${i.type}-${s}`);case"inlineCode":return w.jsx(by,{node:i},`mdast-node-${i.type}-${s}`);case"inlineMath":return w.jsx(nF,{node:i},`mdast-node-${i.type}-${s}`);case"link":return w.jsx(ky,{node:i},`mdast-node-${i.type}-${s}`);case"listItem":return w.jsx(wy,{node:i},`mdast-node-${i.type}-${s}`);case"list":return w.jsx(vy,{node:i},`mdast-node-${i.type}-${s}`);case"mark":return w.jsx(hF,{node:i},`mdast-node-${i.type}-${s}`);case"math":return w.jsx(EL,{node:i},`mdast-node-${i.type}-${s}`);case"message":return w.jsx(My,{node:i},`mdast-node-${i.type}-${s}`);case"paragraph":return w.jsx(Sy,{node:i},`mdast-node-${i.type}-${s}`);case"strong":return w.jsx(Ty,{node:i},`mdast-node-${i.type}-${s}`);case"subscript":return w.jsx(cF,{node:i},`mdast-node-${i.type}-${s}`);case"superscript":return w.jsx(dF,{node:i},`mdast-node-${i.type}-${s}`);case"table":return w.jsx(By,{node:i},`mdast-node-${i.type}-${s}`);case"text":return w.jsx(_y,{node:i},`mdast-node-${i.type}-${s}`);case"thematicBreak":return w.jsx(Ly,{},`mdast-node-${i.type}-${s}`);case"yaml":return null;case"twitter-embed":return w.jsx(hl,{node:i,theme:t},`mdast-node-${i.type}-${i.tweetId}-${s}`);case"youtube-embed":return w.jsx(cl,{node:i},`mdast-node-${i.type}-${s}`);default:{if(process.env.NODE_ENV==="development")return w.jsxs("div",{children:[w.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),w.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${s}`);throw new Error(`Unknown node type: ${i.type}`)}}}),Ay=({node:e})=>w.jsx("blockquote",{className:"my-4 border-gray-300 border-l-4 bg-gray-50 p-4 italic dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300",children:w.jsx(St,{nodes:e.children})});function uF({text:e,url:t,hashtags:r,via:i,related:s,in_reply_to:o}){const a=new URL("https://twitter.com/intent/tweet");return e!==void 0&&a.searchParams.set("text",e),t!==void 0&&a.searchParams.set("url",t),r!==void 0&&a.searchParams.set("hashtags",r.join(",")),i!==void 0&&a.searchParams.set("via",i),s!==void 0&&a.searchParams.set("related",s.join(",")),o!==void 0&&a.searchParams.set("in_reply_to",o),a.toString()}const Ey=e=>{try{const t=new URL(e),r=Object.fromEntries(t.searchParams.entries());let i=null;if(t.hostname==="youtu.be"?i=t.pathname.substring(1):t.hostname.endsWith("youtube.com")&&(t.pathname==="/watch"?i=t.searchParams.get("v"):t.pathname.startsWith("/embed/")&&(i=t.pathname.split("/")[2])),i){const{v:s,...o}=r;return{videoId:i,params:o}}return null}catch{return null}},$y=async e=>{try{const t=new AbortController,r=setTimeout(()=>t.abort(),1e4),i=await fetch(e,{signal:t.signal});if(clearTimeout(r),!i.ok)return null;const s=await i.text(),o={url:e},a=jy.load(s),n=a("title").text().trim();o.title=n;const l=a("meta");for(const c of l){const h=c.attribs.property;h==="og:site_name"&&(o.site_name=c.attribs.content||void 0),h==="og:title"&&(o.title=c.attribs.content||n),h==="og:description"&&(o.description=c.attribs.content||void 0),h==="og:image"&&(o.image=c.attribs.content||void 0),h==="og:type"&&(o.type=c.attribs.content||void 0),c.attribs.name==="description"&&(o.description=c.attribs.content||void 0)}return o}catch(t){return ps.Logger.error("Error fetching site metadata:",t),null}},fF=()=>e=>{$t.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];t.children.length!==1||s.type!=="link"||s.children.length!==1||!(s.children[0].type==="text"&&s.url===s.children[0].value)||!i||r===void 0||(i.children[r]={type:"block-link",url:s.url})})},ai=new Map,gF=(e,t)=>t.fetchAll?!0:t.urlPatterns&&t.urlPatterns.length>0?t.urlPatterns.some(r=>r.test(e)):/^https?:\/\//.test(e)&&!e.includes("localhost")&&!e.includes("127.0.0.1"),pF=(e={})=>{const{enableCache:t=!0}=e;return async r=>{const i=[];$t.visit(r,"block-link",o=>{gF(o.url,e)&&i.push(o)});const s=i.map(async o=>{const a=o.url;if(t&&ai.has(a)){const n=ai.get(a);n&&(o.data=o.data||{},o.data.siteMetadata=n);return}try{const n=await $y(a);n?(o.data=o.data||{},o.data.siteMetadata=n,t&&ai.set(a,n)):t&&ai.set(a,null)}catch(n){ps.Logger.warn(`Failed to fetch metadata for ${a}:`,n),t&&ai.set(a,null)}});await Promise.all(s)}},mF=/\s*\{#(.+?)\}\s*$/,yF=()=>e=>{$t.visit(e,"heading",t=>{if(t.children.length===0)return;const r=t.children[t.children.length-1];if(r?.type!=="text")return;const i=r,s=i.value.match(mF);if(s){const o=s[1];t.data||(t.data={});const a=t.data,n=a.hProperties||{};n.id=o,a.hProperties=n,i.value=i.value.substring(0,s.index).trimEnd(),i.value===""&&t.children.pop()}})},xF=()=>e=>{$t.visit(e,"footnoteDefinition",t=>{$t.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},CF=()=>e=>{$t.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const o=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(o){const[,a,n]=o,l={type:"link",url:a,children:[{type:"text",value:n}]};i.children.splice(r,1,l)}})},bF=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let s=0;for(;s<i.length;){const o=i[s];if(o.type==="html"&&o.value.startsWith("<")&&!o.value.startsWith("</")&&o.value.match(/<([a-zA-Z0-9]+)/)){let n="",l=0;const c=[];let h=!1;for(let d=s;d<i.length;d++){const f=i[d];if(f.type==="html"){n+=f.value;const u=f.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const p of u){const m=p.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];p.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():p.startsWith("<")&&c.push(y)}}else if(f.type==="text")n+=f.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(s,l,{type:"html",value:n})}s++}};$t.visit(e,"paragraph",t),$t.visit(e,"tableCell",t),$t.visit(e,"heading",t),$t.visit(e,"emphasis",t),$t.visit(e,"strong",t),$t.visit(e,"delete",t)},zh=/\s*=\s*(\d+)(w|h|x|y)\s*/g,kF=()=>e=>{$t.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(zh)];return{updatedText:l.replaceAll(zh,"").trim(),matches:c}},{updatedText:i,matches:s}=r(t.alt);t.alt=i;const{updatedText:o,matches:a}=r(t.title);t.title=o||null;const n=[...s,...a];if(n.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of n){const c=Number.parseInt(l[1],10),h=l[2];h==="w"||h==="x"?t.data.hProperties.width=c:(h==="h"||h==="y")&&(t.data.hProperties.height=c)}}})},wF=()=>e=>{$t.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},vF=/https?:\/\/(?:www\.|mobile\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,SF=()=>e=>{$t.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];if(t.children.length!==1||s.type!=="link"||!s.children.every(l=>l.type==="text")||!i||r===void 0)return;const a=s.url.match(vF);if(!a)return;const n=a[1];n&&(i.children[r]={type:"twitter-embed",tweetId:n})})},TF=()=>e=>{$t.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];if(t.children.length!==1||s.type!=="link"||!s.children.every(n=>n.type==="text")||!i||r===void 0)return;const a=Ey(s.url);a&&(i.children[r]={type:"youtube-embed",videoId:a.videoId,params:a.params})})},Wh=/^:::(message|details)\s*(.*)/,BF=()=>e=>{function t(r){const i=[];let s=0;for(;s<r.length;){const o=r[s];if(o.type==="paragraph"&&o.children[0]?.type==="text"&&o.children[0].value.trim().startsWith(":::")){const l=o.children[0].value.trim().match(Wh);if(l){const c=s;let h=-1,d=1;const f=o.children.at(-1);if(o.children.length>1&&f?.type==="text"&&f.value.trim()===":::")h=c;else for(let u=c+1;u<r.length;u++){const p=r[u];if(p.type==="paragraph"&&p.children[0]?.type==="text"){const m=p.children[0].value.trim();Wh.test(m)?d++:m===":::"&&d--}if(d===0){h=u;break}}if(h!==-1){const u=l[1],p=l[2];let m;if(h===c){const b=o.children.slice(1,-1);b[0]?.type==="break"&&b.shift(),b.at(-1)?.type==="break"&&b.pop(),m=b.length>0?[{type:"paragraph",children:b}]:[]}else{const b=o.children.slice(1);b[0]?.type==="break"&&b.shift();const k={type:"paragraph",children:b},S=r[h].children.slice(0,-1);S.at(-1)?.type==="break"&&S.pop();const _={type:"paragraph",children:S},F=r.slice(c+1,h);m=[k,...F,_].filter(T=>!(T.type==="paragraph"&&T.children.length===0))}const y=t(m);let x;if(u==="message"?x={type:"message",data:{messageType:p.trim()},children:y}:u==="details"&&(x={type:"details",data:{title:p.trim()},children:y}),x){i.push(x),s=h+1;continue}}}}const a={...o};"children"in a&&Array.isArray(a.children)&&(a.type==="blockquote"||a.type==="footnoteDefinition"||a.type==="message"||a.type==="details"?a.children=t(a.children):a.type==="list"&&(a.children=a.children.map(n=>({...n,children:t(n.children)})))),i.push(a),s++}return i}e.children=t(e.children)},_F=e=>{const t=[];return $t.visit(e,"heading",r=>{const i=yy(r.children),s=r.data?.hProperties?.id;s&&i&&t.push({depth:r.depth,text:i,id:s})}),t};exports.BlockLinkNode=uy;exports.BlockquoteNode=Ay;exports.CodeNode=nl;exports.Color=ae;exports.Color$1=Xr;exports.DEFAULT_MARKDOWN_STYLES=hy;exports.DEFAULT_MERMAID_INTERACTION=ry;exports.DeleteNode=fy;exports.EmphasisNode=gy;exports.FootnoteBackLinkNode=my;exports.FootnoteReferenceNode=py;exports.FootnotesSection=QL;exports.HeadingNode=xy;exports.ImageNode=Cy;exports.InlineCodeNode=by;exports.JSON_SCHEMA=sf;exports.LinkNode=ky;exports.ListItemNode=wy;exports.ListNode=vy;exports.MarkdownRenderer=ny;exports.MarkdownViewer=KL;exports.MermaidDiagram=al;exports.NodesRenderer=St;exports.ParagraphNode=Sy;exports.Rgb=Dt;exports.RichLinkCard=ll;exports.StrongNode=Ty;exports.TableNode=By;exports.TableOfContents=ly;exports.TextNode=_y;exports.ThematicBreakNode=Ly;exports.TwitterEmbedNode=hl;exports.Utils=ht;exports.YouTubeEmbedNode=cl;exports.ZERO_WIDTH_SPACE=_f;exports.ZennDetailsNode=Fy;exports.ZennMessageNode=My;exports.__export=Vh;exports.__name=g;exports.abs=r1;exports.acos=c1;exports.adjustChannel=Za;exports.argumentsTag=An;exports.array=Kc;exports.arrayBufferTag=gf;exports.arrayTag=ff;exports.asin=d1;exports.assignWithDepth_default=vt;exports.at=tt;exports.atan2=i1;exports.booleanTag=Mn;exports.calculateMathMLDimensions=Lx;exports.calculateTextDimensions=no;exports.calculateTextHeight=Dn;exports.calculateTextWidth=me;exports.cleanAndMerge=lo;exports.clear=pc;exports.clear$1=oS;exports.clear$2=Ev;exports.clear2=Jv;exports.color=Nr;exports.commonDb_exports=en;exports.common_default=Ur;exports.computeDimensionOfText=dg;exports.computeLabelTransform=pr;exports.configureLabelImages=qn;exports.configureSvgSize=tn;exports.constant=Ue;exports.constant$1=Ks;exports.cos=s1;exports.createIntentTweetLink=uF;exports.createText=he;exports.curveBasis=Ls;exports.darken=z;exports.dataViewTag=mf;exports.dateTag=cf;exports.dayjs2=Zh;exports.decodeEntities=De;exports.defaultConfig2=Rx;exports.defaultConfig_default=Ka;exports.define=Zs;exports.distExports=af;exports.edgeLabels=Ai;exports.epsilon=oa;exports.extend=cn;exports.extractHeadings=_F;exports.extractYouTubeVideoId=Ey;exports.fetchSiteMetadata=$y;exports.float32ArrayTag=Sf;exports.float64ArrayTag=Tf;exports.generateId=$f;exports.getAccDescription=Cc;exports.getAccTitle=yc;exports.getConfig=Ct;exports.getConfig2=gt;exports.getDefaultExportFromCjs=jh;exports.getDiagramTitle=kc;exports.getEdgeId=iw;exports.getEffectiveHtmlLabels=Ot;exports.getIconSVG=Vr;exports.getLineFunctionsWithOffset=jp;exports.getRegisteredLayoutAlgorithm=DS;exports.getStylesFromArray=Rn;exports.getSubGraphTitleMargins=ho;exports.getTag=oo;exports.getThemeVariables3=Qh;exports.getUrl=fc;exports.getUserDefinedConfig=px;exports.halfPi=aa;exports.hasKatex=Rr;exports.hue=$b;exports.insertCluster=wg;exports.insertEdge=Xp;exports.insertEdgeLabel=Hp;exports.insertNode=el;exports.int16ArrayTag=wf;exports.int32ArrayTag=vf;exports.int8ArrayTag=kf;exports.interpolateNumber=Te;exports.interpolateRgb=Ko;exports.interpolateString=Nc;exports.isDark=Jt;exports.isLabelStyle=_n;exports.isPrimitive=ao;exports.isTypedArray=Ci;exports.isValidShape=Wp;exports.lighten=q;exports.line=Jc;exports.lineBreakRegex=Yr;exports.load=of;exports.log=Y;exports.mapTag=df;exports.markerOffsets=Et;exports.markers_default=Zp;exports.max=o1;exports.min=a1;exports.nogamma=dn;exports.numberTag=Fn;exports.objectTag=pf;exports.parseFontSize=Ri;exports.parseGenericTypes=Ho;exports.pi=to;exports.positionEdgeLabel=Yp;exports.positionNode=tS;exports.random=Pf;exports.regexpTag=lf;exports.registerIconPacks=zf;exports.remarkBlockLink=fF;exports.remarkBlockLinkMetadata=pF;exports.remarkCustomHeadingId=yF;exports.remarkFootnoteBackLink=xF;exports.remarkHtmlAnchorToLink=CF;exports.remarkHtmlInHtml=bF;exports.remarkImageSize=kF;exports.remarkParentNode=wF;exports.remarkTwitterEmbed=SF;exports.remarkYouTubeEmbed=TF;exports.remarkZennMessage=BF;exports.render=RS;exports.renderKatexSanitized=Ja;exports.rgbConvert=Oc;exports.rgba=Be;exports.sanitizeText=Kt;exports.select=ct;exports.selectSvgElement=kd;exports.setAccDescription=xc;exports.setAccTitle=mc;exports.setConfig2=Ox;exports.setDiagramTitle=bc;exports.setNodeElem=Qv;exports.setTag=uf;exports.setupGraphViewbox=gc;exports.setupGraphViewbox2=wc;exports.sin=n1;exports.sqrt=l1;exports.stringTag=Ln;exports.styles2String=et;exports.symbolTag=hf;exports.tau=h1;exports.terminalLabels=Lt;exports.toContentAlign=WL;exports.uint16ArrayTag=Cf;exports.uint32ArrayTag=bf;exports.uint8ArrayTag=yf;exports.uint8ClampedArrayTag=xf;exports.unknownIcon=Nf;exports.updateNodeBounds=rt;exports.useMarkdownToolbarState=dy;exports.utils_default=Zt;exports.withPath=Zc;exports.wrapLabel=Of;
311
- //# sourceMappingURL=extractHeadings-vnYM8Eet.cjs.map
308
+ `;return i+Go(r)},"createCssStyles"),cL=g((e,t)=>za(tT(`${e}{${t}}`),iT([g(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Da)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[qS,WS,em,HS,"@container","@starting-style"],Da].includes(i.type)||(U.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=il))},"addNamespace"),rT])),"compileCSS"),dL=g((e,t,r,i)=>{const s=hL(e,r),o=Ix(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return cL(i,o)},"createUserStyles"),uL=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Ne(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),fL=g((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":rL,i=Xm(`<body style="${sL}">${e}</body>`);return`<iframe style="width:${eL};height:${r};${iL}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${oL}">
309
+ ${aL}
310
+ </iframe>`},"putIntoIFrame"),Dh=g((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",Q_);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function ja(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(ja,"sandboxedIframe");var gL=g((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),pL=g(async function(e,t,r){Co();const i=al(t);t=i.code;const s=Ct();U.debug(s),t.length>(s?.maxTextSize??G_)&&(t=V_);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=g(()=>{const j=dt(f?n:c).node();j&&"remove"in j&&j.remove()},"removeTempElements");let d=dt(document.body);const f=s.securityLevel===Z_,u=s.securityLevel===K_,p=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const X=ja(dt(r),a);d=dt(X.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=dt(r);Dh(d,e,l,`font-family: ${p}`,J_)}else{if(gL(document,e,l,a),f){const X=ja(dt(document.body),a);d=dt(X.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=dt("body");Dh(d,e,l)}let m,y;try{m=await Wa.fromText(t,{title:i.title})}catch(X){if(s.suppressErrorRendering)throw h(),X;m=await Wa.fromText("error"),y=X}const x=d.select(c).node(),b=m.type,k=x.firstChild,v=k.firstChild,S=m.renderer.getClasses?.(t,m),_=dL(s,b,S,o),F=document.createElement("style");F.innerHTML=_,k.insertBefore(F,v);try{await m.renderer.draw(t,e,"11.16.0",m)}catch(X){throw s.suppressErrorRendering?h():kB.draw(t,e,"11.16.0"),X}const T=d.select(`${c} svg`),D=m.db.getAccTitle?.(),M=m.db.getAccDescription?.();Km(b,T,D,M),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",tL);let O=d.select(c).node().innerHTML;if(U.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),O=uL(O,f,Ce(s.arrowMarkerAbsolute)),f){const X=d.select(c+" svg").node();O=fL(O,X)}else u||(O=er.sanitize(O,{ADD_TAGS:nL,ADD_ATTR:lL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(j_(),y)throw y;return h(),{diagramType:b,svg:O,bindFunctions:m.db.bindFunctions}},"render");function Vm(e={}){const t=St({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ux(t),t?.theme&&t.theme in Le?t.themeVariables=Le[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Le.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?dx(t):ic();Za(r.logLevel),Co()}g(Vm,"initialize");var Zm=g((e,t={})=>{const{code:r}=ol(e);return Wa.fromText(r,t)},"getDiagramFromText");function Km(e,t,r,i){Hm(t,e),Ym(t,r,i,t.attr("id"))}g(Km,"addA11yInfo");var nr=Object.freeze({render:pL,parse:Gm,getDiagramFromText:Zm,initialize:Vm,getConfig:Ct,setConfig:sc,getSiteConfig:ic,updateSiteConfig:fx,reset:g(()=>{xs()},"reset"),globalReset:g(()=>{xs(Or)},"globalReset"),defaultConfig:Or});Za(Ct().logLevel);xs(Ct());var mL=g((e,t,r)=>{U.warn(e),qn(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"),Qm=g(async function(e={querySelector:".mermaid"}){try{await yL(e)}catch(t){if(qn(t)&&U.error(t.str),Ae.parseError&&Ae.parseError(t),!e.suppressErrors)throw U.error("Use the suppressErrors option to suppress these errors"),t}},"run"),yL=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=nr.getConfig();U.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");U.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(U.debug("Start On Load: "+i?.startOnLoad),nr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new Zt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(U.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=eg(Zt.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Zt.detectInit(a);h&&U.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await ry(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){mL(d,n,Ae.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Jm=g(function(e){nr.initialize(e)},"initialize"),xL=g(async function(e,t,r){U.warn("mermaid.init is deprecated. Please use run instead."),e&&Jm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Qm(i)},"init"),CL=g(async(e,{lazyLoad:t=!0}={})=>{Co(),Ho(...e),t===!1&&await z_()},"registerExternalDiagrams"),ty=g(function(){if(Ae.startOnLoad){const{startOnLoad:e}=nr.getConfig();e&&Ae.run().catch(t=>U.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ty,!1);var bL=g(function(e){Ae.parseError=e},"setParseErrorHandler"),Us=[],qo=!1,ey=g(async()=>{if(!qo){for(qo=!0;Us.length>0;){const e=Us.shift();if(e)try{await e()}catch(t){U.error("Error executing queue",t)}}qo=!1}},"executeQueue"),kL=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((o,a)=>{nr.parse(e,t).then(n=>{o(n),r(n)},n=>{U.error("Error parsing",n),Ae.parseError?.(n),a(n),i(n)})}),"performCall");Us.push(s),ey().catch(i)}),"parse"),ry=g((e,t,r)=>new Promise((i,s)=>{const o=g(()=>new Promise((a,n)=>{nr.render(e,t,r).then(l=>{a(l),i(l)},l=>{U.error("Error parsing",l),Ae.parseError?.(l),n(l),s(l)})}),"performCall");Us.push(o),ey().catch(s)}),"render"),wL=g(()=>Object.keys(ir).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ae={startOnLoad:!0,mermaidAPI:nr,parse:kL,render:ry,init:xL,run:Qm,registerExternalDiagrams:CL,registerLayoutLoaders:Qp,initialize:Jm,parseError:void 0,contentLoaded:ty,setParseErrorHandler:bL,detectType:Ja,registerIconPacks:Wf,getRegisteredDiagramsMetadata:wL},Ha=Ae;const iy="both-shift",Nh={none:{panTrigger:null,wheelZoom:!1},zoom:{panTrigger:null,wheelZoom:!0},pan:{panTrigger:"drag",wheelZoom:!1},"pan-shift":{panTrigger:"shift-drag",wheelZoom:!1},both:{panTrigger:"drag",wheelZoom:!0},"both-shift":{panTrigger:"shift-drag",wheelZoom:!0}},vL=[{value:"none",label:"操作なし"},{value:"zoom",label:"拡大縮小のみ"},{value:"pan",label:"移動のみ(左ドラッグ)"},{value:"pan-shift",label:"移動のみ(Shift+ドラッグ)"},{value:"both",label:"拡大縮小+移動(左ドラッグ)"},{value:"both-shift",label:"拡大縮小+移動(Shift+ドラッグ)"}],SL=0;function TL(e,t){return!(!e.panTrigger||t.button!==SL||e.panTrigger==="shift-drag"&&!t.shiftKey)}function BL(e,t){return e.wheelZoom&&t.shiftKey}let sy=!1,Ya=null;if(Ha?.initialize)try{Ha.initialize({startOnLoad:!1}),sy=!0}catch(e){Ya=e instanceof Error?e:new Error(String(e))}else Ya=new Error("Mermaid library or mermaid.initialize is not available.");const oy=({chartContent:e,interaction:t,hideInteractionMenu:r=!1})=>{const i=Y.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),s=Y.useRef(null),o=Y.useRef(null),[a,n]=Y.useState(!0),[l,c]=Y.useState(null),[h,d]=Y.useState(null),[f,u]=Y.useState(null),[p,m]=Y.useState(!1),[y,x]=Y.useState(t??iy),b=Y.useRef(Nh[y]),[k,v]=Y.useState(!1),S=Y.useRef(null);Y.useEffect(()=>{t&&x(t)},[t]),Y.useEffect(()=>{const T=Nh[y];b.current=T;const D=s.current;D&&(D.style.cursor=T.panTrigger==="drag"?"move":"")},[y]),Y.useEffect(()=>{if(!k)return;const T=D=>{S.current&&!S.current.contains(D.target)&&v(!1)};return document.addEventListener("pointerdown",T),()=>document.removeEventListener("pointerdown",T)},[k]),Y.useEffect(()=>{if(u(null),n(!0),c(null),m(!1),!sy){c(Ya?.message||"Mermaid failed to initialize globally."),n(!1);return}if(!e||e.trim()===""){n(!1),s.current&&(s.current.innerHTML=""),d(null);return}(async()=>{try{const D=e.trim();if(!D){n(!1),s.current&&(s.current.innerHTML=""),d(null);return}const M=`${i.current}-render`,O=await Ha.render(M,D);O&&typeof O.svg=="string"&&O.svg.length>0?(d(O.svg),typeof O.bindFunctions=="function"?u(()=>O.bindFunctions):u(null)):(c("Failed to render Mermaid diagram: SVG content is empty or invalid."),d(null))}catch(D){console.error(`[MermaidDiagram ${i.current}] Error rendering Mermaid diagram:`,D),c(D instanceof Error?D.message:"An unknown error occurred while rendering the diagram."),d(null)}finally{n(!1)}})().catch(D=>{console.error(`[MermaidDiagram ${i.current}] Unhandled error in renderMermaid:`,D),c(D instanceof Error?D.message:"An unexpected error occurred."),n(!1)})},[e]),Y.useEffect(()=>{const T=s.current;if(!T)return;const D=()=>{o.current&&(o.current.destroy(),o.current=null),m(!1)};if(!h){T.innerHTML="",D();return}T.innerHTML=h;const M=T.querySelector("svg");let O=!1;const X=[];if(M){const j=()=>{if(O)return;const I=M.getBBox();if(!I||I.width===0||I.height===0){setTimeout(j,100);return}o.current&&o.current.destroy();const $=Xh(M,{startScale:1,minScale:.5,maxScale:10,origin:"0 0",animate:!0,noBind:!0,cursor:""});o.current=$;let A=!1,N=0,P=0;const E=W=>{if(!A)return;const G=$.getScale()||1,V=(W.clientX-N)/G,Z=(W.clientY-P)/G;N=W.clientX,P=W.clientY,$.pan(V,Z,{relative:!0,force:!0,animate:!1})},R=()=>{A&&(A=!1,T.style.cursor=b.current.panTrigger==="drag"?"move":"",window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",R))},B=W=>{TL(b.current,W)&&(A=!0,N=W.clientX,P=W.clientY,T.style.cursor="grabbing",window.addEventListener("pointermove",E),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",R),W.preventDefault())},H=W=>{BL(b.current,W)&&(W.preventDefault(),$.zoomWithWheel(W))};T.addEventListener("pointerdown",B),T.addEventListener("wheel",H,{passive:!1}),X.push(()=>{T.removeEventListener("pointerdown",B),T.removeEventListener("wheel",H),window.removeEventListener("pointermove",E),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",R)}),T.style.cursor=b.current.panTrigger==="drag"?"move":"",m(!0)};j()}return f&&f(T),()=>{O=!0;for(const j of X)j();D()}},[h,f]),Y.useEffect(()=>{p&&s.current&&(s.current.style.overflow="visible")},[p]);const _=Y.useCallback(()=>v(T=>!T),[]),F=Y.useCallback(T=>{x(T),v(!1)},[]);return a?w.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."}):l?w.jsxs("div",{className:"rounded border border-red-400 bg-red-100 p-4 text-red-600 dark:border-red-700 dark:bg-red-900/50 dark:text-red-300",children:["Error: ",l]}):w.jsxs("div",{className:"relative",children:[w.jsx("div",{ref:s,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400",style:{overflow:"visible"}}),p&&w.jsxs("div",{className:"absolute top-2 right-2 z-10 flex items-start gap-1",children:[!r&&w.jsxs("div",{ref:S,className:"relative",children:[w.jsx("button",{type:"button",onClick:_,className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"マウス操作モード","aria-haspopup":"menu","aria-expanded":k,children:w.jsx(b0,{size:18})}),k&&w.jsx("div",{role:"menu","aria-label":"マウス操作モード",className:"absolute right-0 mt-1 w-60 overflow-hidden rounded border border-gray-200 bg-white py-1 text-sm shadow-lg dark:border-gray-600 dark:bg-gray-800",children:vL.map(T=>{const D=T.value===y;return w.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":D,onClick:()=>F(T.value),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left hover:bg-gray-100 dark:hover:bg-gray-700 ${D?"font-semibold text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300"}`,children:[w.jsx("span",{className:"w-3 shrink-0",children:D?"✓":""}),w.jsx("span",{children:T.label})]},T.value)})})]}),w.jsx("button",{type:"button",onClick:()=>o.current?.zoomIn(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom In",children:w.jsx(L0,{size:20})}),w.jsx("button",{type:"button",onClick:()=>o.current?.zoomOut(),className:"flex h-8 w-8 items-center justify-center rounded border border-gray-200 bg-white p-1 text-gray-700 text-lg shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Zoom Out",children:w.jsx(M0,{size:20})}),w.jsx("button",{type:"button",onClick:()=>o.current?.reset(),className:"flex h-8 items-center justify-center rounded border border-gray-200 bg-white px-2 py-1 text-gray-700 text-sm shadow hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700","aria-label":"Reset View",children:w.jsx(x0,{size:18})})]})]})};oy.displayName="MermaidDiagramInternal";const nl=Y.memo(oy);function _L(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const s={};for(const o of i.split(";")){const[a,n]=o.split(":");if(a&&n){const l=a.trim().replace(/-(\w)/g,(c,h)=>h.toUpperCase());l.startsWith("-")?s[l.substring(1)]=n.trim():s[l]=n.trim()}}t.style=s;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const LL=({code:e})=>{const[t,r]=Y.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button",className:"copy-button absolute top-2 right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-sm transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},FL=({htmlPromise:e,filename:t,code:r})=>{const i=Y.use(e),s={replace:o=>{if(o instanceof fe.Element&&o.name==="pre"){const a=_L(o.attribs),n=t?"2.2rem 0 1rem 0":"1rem 0";if(typeof a.style=="object"){const{backgroundColor:l,...c}=a.style;a.style={...c,margin:"0",padding:"0.8rem 0"}}else a.style={margin:"0",padding:"0.8rem 0"};return a.className=`${a.className||""} bg-gray-900 dark:bg-gray-900`,w.jsxs("div",{className:"relative",style:{margin:n},children:[t&&w.jsx("div",{className:"code-filename absolute -top-4 left-0 z-0 rounded-md bg-gray-200 px-2 py-0.5 text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-100",children:t}),w.jsx(LL,{code:r}),w.jsx("pre",{...a,children:fe.domToReact(o.children,s)})]})}},htmlparser2:{lowerCaseTags:!0}};return w.jsx(w.Fragment,{children:fe(i,s)})},ML=/^(diff)?:?(\w+):?([\w.-]*)?/,AL=()=>({code(e){for(const t of e.children){if(t.type!=="element")continue;const r=t.children[0];if(r?.type!=="element")continue;const i=r.children[0];if(i?.type!=="text")continue;const s=i.value;let o,a="",n="";if(s.startsWith("+")?(o="+",a="background-color: rgba(16, 185, 129, 0.2);",n="bg-green-200 dark:bg-green-400/90 text-green-700"):s.startsWith("-")&&(o="-",a="background-color: rgba(239, 68, 68, 0.2);",n="bg-red-200 dark:bg-red-400/90 text-red-700"),o){t.properties.style=a,i.value=s.substring(1).trimStart();const l={type:"element",tagName:"span",properties:{className:`inline-flex items-center justify-center w-4 h-4 rounded-full select-none font-bold text-[0.5rem] mr-2 ${n}`},children:[{type:"text",value:o==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),EL=e=>{const t=ML.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},ll=({lang:e,code:t,node:r})=>{const i=e??r?.lang??void 0,s=t??r?.value??"",{isDiff:o,lang:a,filename:n}=EL(i),l=Y.useMemo(async()=>{const c=[];return o&&c.push(AL()),await Wy.codeToHtml(s,{lang:a,themes:{light:"solarized-light",dark:"github-dark-high-contrast"},transformers:c})},[s,a,o]);return a==="mermaid"?w.jsx(nl,{chartContent:s}):w.jsx(Y.Suspense,{fallback:w.jsx("div",{className:"dark:text-white",children:"🌀 Loading code..."}),children:w.jsx(FL,{htmlPromise:l,filename:n,code:s})})},ay=({code:e})=>{const[t,r]=Y.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button",className:"copy-button absolute right-2 z-10 rounded-md bg-gray-200 px-2 py-1 text-gray-800 text-xs transition-colors hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",onClick:i,children:t?"COPIED!":"Copy"})},$L=({node:e})=>{const t=Y.useRef(null);return Y.useLayoutEffect(()=>{try{t.current&&Ua.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),w.jsxs("div",{className:"relative",children:[w.jsx(ay,{code:e.value}),w.jsx("article",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})]})},PL=(e,t=64)=>`https://www.google.com/s2/favicons?domain=${encodeURIComponent(e)}&size=${t}`,hl=({href:e,isExternal:t,metadata:r})=>{const[i,s]=Y.useState(!1);Y.useEffect(()=>{s(!0)},[]);const o=Y.useMemo(()=>r?Promise.resolve(r):i?fetch(`/api/site_metadata?url=${encodeURIComponent(e)}`).then(a=>a.ok?a.json():null).catch(()=>null):null,[r,e,i]);return o===null?w.jsx(qh,{}):w.jsx(Y.Suspense,{fallback:w.jsx(qh,{}),children:w.jsx(IL,{metadataPromise:o,href:e,isExternal:t})})},IL=({metadataPromise:e,href:t})=>{const r=Y.use(e);if(r===null)return w.jsx(OL,{href:t});let i=t;try{i=new URL(r.url||t).hostname}catch{}return w.jsxs("a",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 hover:!border-gray-300 dark:hover:!border-neutral-700 !no-underline flex h-36 w-full gap-2 overflow-hidden rounded-xl bg-white shadow-sm transition-all duration-300 hover:-translate-y-0.5 hover:shadow-md dark:bg-neutral-900",href:r.url||t,target:"_blank",rel:"noreferrer",children:[w.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2 px-4",children:[w.jsx("div",{className:"!text-gray-900 dark:!text-gray-100 !no-underline line-clamp-1 break-words font-semibold",children:r.title||r.site_name||t}),w.jsx("div",{className:"my-1 flex-1",children:w.jsx("div",{className:"!text-gray-500 dark:!text-gray-400 !no-underline line-clamp-2 break-words text-xs",children:r.description})}),w.jsxs("div",{className:"!no-underline mt-auto flex items-center gap-2",children:[w.jsx("img",{src:PL(t,16),alt:"",width:16,height:16,className:"rounded-sm"}),w.jsx("span",{className:"!text-gray-400 dark:!text-gray-500 !no-underline line-clamp-1 text-xs",children:r.site_name||i})]})]}),w.jsx("div",{className:"h-full w-48 max-w-[35%] flex-shrink-0 overflow-hidden",children:r.image?w.jsx("img",{className:"h-full w-full object-cover transition-transform duration-300 hover:scale-105",src:r.image,alt:""}):w.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 text-gray-300 dark:bg-neutral-800 dark:text-neutral-700",children:w.jsxs("svg",{className:"h-8 w-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[w.jsx("title",{children:"Placeholder Image"}),w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})]})})})]})},OL=({href:e})=>w.jsx("a",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 hover:!border-gray-300 dark:hover:!border-neutral-700 !no-underline flex gap-2 rounded-xl bg-white p-4 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-sm dark:bg-neutral-900",href:e,target:"_blank",rel:"noreferrer",children:w.jsx("div",{className:"!text-gray-500 dark:!text-gray-400 !no-underline break-all text-sm",children:e})}),qh=()=>w.jsxs("div",{className:"!border !border-solid !border-gray-200 dark:!border-neutral-800 flex h-36 w-full gap-2 overflow-hidden rounded-xl bg-white shadow-sm dark:bg-neutral-900",children:[w.jsxs("div",{className:"flex flex-1 flex-col justify-between p-2 px-4",children:[w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-gray-200 dark:bg-neutral-800"}),w.jsx("div",{className:"h-4 w-4/5 animate-pulse rounded bg-gray-200 dark:bg-neutral-800"})]}),w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("div",{className:"h-3 w-full animate-pulse rounded bg-gray-200 dark:bg-neutral-800"}),w.jsx("div",{className:"h-3 w-4/5 animate-pulse rounded bg-gray-200 dark:bg-neutral-800"})]}),w.jsx("div",{className:"mt-auto h-4 w-4 animate-pulse rounded-sm bg-gray-200 dark:bg-neutral-800"})]}),w.jsx("div",{className:"h-full w-48 max-w-[35%] flex-shrink-0 animate-pulse bg-gray-200 dark:bg-neutral-800"})]});let es=null;const RL=()=>typeof window>"u"||typeof document>"u"?Promise.resolve(null):es||(es=new Promise((e,t)=>{if(window.twttr?.widgets)return e(window.twttr.widgets);const r="twitter-wjs",i=()=>{window.twttr?.widgets?e(window.twttr.widgets):t(new Error("Twitter widget script loaded, but `window.twttr.widgets` not found."))},s=document.getElementById(r);if(s){s.addEventListener("load",i),s.addEventListener("error",()=>t(new Error("Failed to load Twitter script.")));return}const o=document.createElement("script");o.id=r,o.src="https://platform.twitter.com/widgets.js",o.async=!0,o.charset="utf-8",o.onload=i,o.onerror=()=>t(new Error("Failed to load Twitter script.")),document.body.appendChild(o)}),es),DL=({promise:e})=>(Y.use(e),null),NL=({setPromise:e,createPromise:t})=>{const r=Y.useRef(null);return Y.useEffect(()=>{const i=r.current;if(!i){console.warn("Mount point for Twitter widget not found.");return}const s=t(i).then(o=>{if(!o){console.warn("createPromise から要素が返されませんでした。");return}return o}).catch(o=>{console.error("ツイートウィジェットの作成中にエラーが発生しました:",o),i.innerText=`ツイートの読み込みエラー: ${o.message}`});return e(s),()=>{i.innerHTML=""}},[t,e]),w.jsx("div",{ref:r,className:"twitter-embed min-h-24"})},qL=({node:e,loadWidgetsPromise:t,theme:r})=>{const i=Y.use(t),s=Y.useRef(null),o=Y.useRef(null),[a,n]=Y.useState(null),[l,c]=Y.useState(null),h=Y.useCallback(f=>{let u;return f&&i?new Promise((p,m)=>{s.current=p,o.current=m;const y=new MutationObserver(()=>{f?.querySelector(".twitter-tweet > iframe:last-of-type")?.addEventListener("load",()=>{u&&clearTimeout(u),y?.disconnect(),s.current=null,o.current=null,p(f)},{once:!0,passive:!0,capture:!0})});u=setTimeout(()=>{y.disconnect(),s.current=null,o.current=null,m(new Error("ツイートの作成が 10 秒後にタイムアウトしました。"))},1e4),y.observe(f,{childList:!0,subtree:!0,attributes:!1,characterData:!1}),i?.createTweet(e.tweetId,f,{cards:e.cards,conversation:e.conversation,theme:e.theme||r,width:e.width,align:e.align,lang:e.lang||"ja",dnt:e.dnt}).catch(x=>{u&&clearTimeout(u),y.disconnect(),s.current=null,o.current=null,m(x),console.error("ツイートウィジェットの作成中にエラーが発生しました:",x)})}):new Promise((p,m)=>{console.warn("TweetEmbed: No targetNode or twitterWidgetsJS available."),m(new Error("No targetNode or twitterWidgetsJS available."))})},[i,e.tweetId,e.cards,e.conversation,e.theme,e.width,e.align,e.lang,e.dnt,r]),d=Y.useMemo(()=>w.jsx(NL,{setPromise:c,createPromise:h}),[h]);return Y.useEffect(()=>(n(d),()=>{s.current&&(s.current(void 0),s.current=null,o.current=null)}),[d]),i?w.jsxs(Y.Suspense,{fallback:w.jsx("div",{className:"min-h-24",children:"🌀 Loading Tweet..."}),children:[a,l&&w.jsx(DL,{promise:l})]}):w.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter renderer..."})},cl=({node:e,theme:t})=>{const r=Y.useMemo(()=>RL(),[]);return w.jsx(Y.Suspense,{fallback:w.jsx("div",{className:"min-h-24",children:"🌀 Loading Twitter widget..."}),children:w.jsx(qL,{node:e,loadWidgetsPromise:r,theme:t})})},dl=({node:e})=>{const{videoId:t,params:r}=e,i={...r,rel:"0"},s=new URLSearchParams(i).toString();return w.jsx("iframe",{className:"aspect-video w-full max-w-[560px] rounded-lg",src:`https://www.youtube.com/embed/${t}${s?`?${s}`:""}`,title:"YouTube video player",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})},Ut=new ps.Logger(ps.LogLevel.INFO,"[DifyIFramePlugin]"),ny=({iframeHtml:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=Y.useState(!0),[s,o]=Y.useState(!1),a=Y.useRef(null),n=Y.useRef(null),c=Y.useCallback(p=>p.match(/src\s*=\s*["']([^"']*)["']/i)?.[1]||"",[])(e),h=Y.useCallback(p=>{try{const m=new URL(p);return t.includes(m.hostname)}catch{return!1}},[t]),d=Y.useCallback(p=>{if(!h(p.origin))return;const{type:m}=p.data;m==="dify-chatbot-iframe-ready"&&(Ut.info("Dify chatbot iframe is ready"),i(y=>y&&(o(!1),a.current&&(clearTimeout(a.current),a.current=null),n.current&&(clearTimeout(n.current),n.current=null),!1)))},[h]),f=Y.useCallback(()=>{const p=document.querySelector(`iframe[src="${c}"]`);if(p)try{if(!p.contentDocument)throw new Error("Cannot access iframe content");i(y=>y&&(o(!1),!1))}catch{Ut.info("Crossorigin error detected, showing auth prompt"),o(y=>y||(i(!1),!0))}},[c]),u=Y.useCallback(p=>{const m=window.open(p,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!m){Ut.error("ポップアップがブロックされました");return}const y=setInterval(()=>{if(m.closed){clearInterval(y),Ut.info("ポップアップが閉じられました");try{Ut.info("ポップアップURL:",m.location.href)}catch(b){Ut.info("クロスオリジンのためURLにアクセスできません:",b)}const x=document.querySelector(`iframe[src="${p}"]`);if(x?.src){const b=x.src;i(k=>k||!0),o(k=>k&&!1),x.src="",setTimeout(()=>{x.src=b,a.current=setTimeout(()=>{Ut.warn("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),f()},5e3)},100)}}},1e3);Ut.info("ポップアップを開きました:"),Ut.info("- 初期URL:",p),Ut.info("- ウィンドウ名:","dify-oauth"),Ut.info("- ウィンドウサイズ: 500x600")},[f]);return Y.useEffect(()=>(window.addEventListener("message",d),()=>{window.removeEventListener("message",d)}),[d]),Y.useEffect(()=>{const p=setTimeout(()=>{Ut.warn("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),f()},5e3);return n.current=p,()=>{n.current&&(clearTimeout(n.current),n.current=null)}},[f]),Y.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),h(c)?w.jsxs("div",{className:"dify-iframe-container",children:[r&&!s&&w.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[w.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),w.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),s&&w.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[w.jsx("div",{className:"flex items-center",children:w.jsxs("div",{className:"text-blue-800",children:[w.jsx("h3",{className:"font-medium",children:"認証が必要です"}),w.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),w.jsx("div",{className:"mt-4",children:w.jsx("button",{type:"button",onClick:()=>u(c),className:"rounded-md border border-gray-700 bg-gray-900 px-4 py-2 font-medium text-sm text-white shadow-lg transition-colors hover:bg-gray-800",children:"OAuth 認証を開始"})})]}),w.jsx("div",{className:`${r||s?"hidden":"block"}`,dangerouslySetInnerHTML:{__html:e}})]}):(Ut.warn("DifyIFramePlugin: Invalid domain for iframe:",c),null)},zL=/^[a-z][a-z0-9+.-]*:/,WL=(e,t,r)=>{const{class:i,"data-link-kind":s,"data-doc-path":o,"data-doc-exists":a,...n}=e.attribs,l=`${i||""} inline-block w-fit text-link underline visited:text-link-visited`.trim(),c=n.href??"",h=s,d=h==="external"||h===void 0&&zL.test(c),f=fe.domToReact(e.children,t);if(r&&c&&!d)return w.jsx(r,{href:c,kind:h,docPath:o,docExists:a===void 0?void 0:a==="true",className:l,children:f});d&&(n.target="_blank",n.rel="noreferrer");const u={};return s!==void 0&&(u["data-link-kind"]=s),o!==void 0&&(u["data-doc-path"]=o),a!==void 0&&(u["data-doc-exists"]=a),w.jsx("a",{className:l,...n,...u,children:f})},ly=({htmlContent:e,theme:t="light",iFrameAllowedDomains:r=[],mermaidInteraction:i,linkComponent:s})=>{const o={replace:a=>{if(a instanceof fe.Element){if(a.name==="pre"&&a.children.length===1){const n=a.children[0];if(n instanceof fe.Element&&n.name==="code"&&n.attribs.class?.includes("language-mermaid")){const l=fe.domToReact(n.children);return w.jsx(nl,{chartContent:l,interaction:i})}}if(a.name==="pre"&&a.children.length===1){const n=a.children[0];if(n instanceof fe.Element&&n.name==="code"){const c=(n.attribs.class||"").replace("language-",""),h=fe.domToReact(n.children);return w.jsx(ll,{lang:c,code:h,theme:t})}}if(a.name==="iframe"){const n=a.attribs.src||"";if(a.attribs["data-plugin-type"]==="dify"){const c=a.attribs.width||"100%",h=a.attribs.height||"600px",d=a.attribs.title||"",f=a.attribs.frameborder||"0",u=a.attribs.allow||"",p=a.attribs.allowfullscreen!==void 0?"allowfullscreen":"",m=`<iframe src="${n}" data-plugin-type="dify" width="${c}" height="${h}" title="${d}" frameborder="${f}" allow="${u}" ${p}></iframe>`;return w.jsx(ny,{iframeHtml:m,iFrameAllowedDomains:r})}if(n)try{const c=new URL(n);if(!r.includes(c.hostname))return null}catch{return null}}if(a.name==="div"){const n=a.attribs["data-plugin-type"];if(n==="youtube"){const l=a.attribs["data-video-id"];return w.jsx(dl,{node:{type:"youtube-embed",videoId:l,params:{}}})}if(n==="twitter"){const l=a.attribs["data-tweet-id"];return w.jsx(cl,{node:{type:"twitter-embed",tweetId:l},theme:t==="dark"?"dark":"light"})}if(n==="block-link"){const l=a.attribs["data-url"];return w.jsx(hl,{href:l,isExternal:!0})}}if(a.name==="span"&&a.attribs.class?.includes("math")){const n=a.attribs.class.includes("display"),l=d=>{let f="";for(const u of d)u.type==="text"?f+=u.data:u.children&&(f+=l(u.children));return f};let h=l(a.children).trim();n?h=h.replace(/^\\\[/,"").replace(/\\\]$/,""):h=h.replace(/^\\\(/,"").replace(/\\\)$/,"");try{const d=Ua.renderToString(h,{displayMode:n,throwOnError:!1});return n?w.jsxs("span",{className:"group relative block",children:[w.jsx(ay,{code:h}),w.jsx("span",{dangerouslySetInnerHTML:{__html:d}})]}):w.jsx("span",{dangerouslySetInnerHTML:{__html:d}})}catch(d){return console.error("Failed to render math:",d),null}}if(a.name==="a")return WL(a,o,s)}}};return w.jsx("div",{className:"markdown-body",children:fe(e,o)})},hy=({headings:e,className:t="",onHeadingClick:r})=>{if(e.length===0)return null;const i=Math.min(...e.map(s=>s.depth));return w.jsx("nav",{className:`toc ${t}`,"aria-label":"Table of contents",children:w.jsx("ul",{className:"m-0 list-none p-0",children:e.map(s=>w.jsx("li",{className:"py-1",style:{paddingLeft:`${(s.depth-i)*1}rem`},children:w.jsx("a",{href:`#${s.id}`,className:"block truncate text-gray-600 no-underline hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400",onClick:o=>{r&&(o.preventDefault(),r(s.id))},title:s.text,children:s.text})},s.id))})})},cy=[{name:"None",className:""},{name:"GitHub",className:"markdown-body"},{name:"Zenn",className:"znc"}],jL=["left","center","right"],dy="left",HL=(e,t=dy)=>e!=null&&jL.includes(e)?e:t,zo=[{value:"left",label:"左揃え",Icon:B0},{value:"center",label:"中央揃え",Icon:w0},{value:"right",label:"右揃え",Icon:S0}],YL=e=>e==="center"?"auto":e==="right"?"auto 0":"0 auto",UL=24,XL=60,GL=48,Qe=e=>`calc(max(var(--aiquants-menu-pinned-width, 0px) + ${UL}px, ${XL}px) + ${e*GL}px)`,VL=Y.memo(function({headings:t,onHeadingClick:r,position:i,zIndex:s=60,onActivate:o,isOpen:a,onToggle:n,onClose:l,isPinned:c,onPinToggle:h}){const d=Y.useRef(null),f={top:"0",right:Qe(0),...i},u=a,p=Y.useCallback(()=>{n(),o?.()},[o,n]),m=Y.useCallback(()=>{l()},[l]);return Y.useEffect(()=>{if(!u||c)return;const y=x=>{d.current&&!d.current.contains(x.target)&&m()};return document.addEventListener("pointerdown",y),()=>{document.removeEventListener("pointerdown",y)}},[m,c,u]),w.jsxs("div",{ref:d,className:"pointer-events-none fixed flex flex-col items-end",style:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,zIndex:s,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:p,"aria-label":"目次を開く",children:w.jsx(u0,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),u&&w.jsxs("div",{className:"markdown-viewer-scrollbar-thin pointer-events-auto mt-2 max-h-[80vh] w-64 overflow-y-auto rounded-lg border border-gray-200 bg-white p-4 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"font-bold text-gray-500 text-sm uppercase tracking-wider",children:"目次"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:h,"aria-label":c?"目次のピン留めを解除":"目次をピン留め",children:c?w.jsx(Va,{className:"h-4 w-4"}):w.jsx(Ga,{className:"h-4 w-4"})})]}),w.jsx(hy,{headings:t,className:"text-sm",onHeadingClick:r})]})]})}),ZL=Y.memo(function({currentStyle:t,availableStyles:r,onStyleChange:i,position:s,zIndex:o=50,onActivate:a,isOpen:n,onToggle:l,onClose:c,isPinned:h,onPinToggle:d}){const f=Y.useRef(null),u={top:"0",right:Qe(1),...s},p=n,m=Y.useCallback(()=>{l(),a?.()},[a,l]),y=Y.useCallback(()=>{c()},[c]);return Y.useEffect(()=>{if(!p||h)return;const x=b=>{f.current&&!f.current.contains(b.target)&&y()};return document.addEventListener("pointerdown",x),()=>{document.removeEventListener("pointerdown",x)}},[y,h,p]),w.jsxs("div",{ref:f,className:"pointer-events-none fixed flex flex-col items-end",style:{top:u.top,right:u.right,bottom:u.bottom,left:u.left,zIndex:o,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:m,"aria-label":"表示スタイルを選択",children:w.jsx(g0,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),p&&w.jsxs("div",{className:"pointer-events-auto mt-2 w-48 rounded-lg border border-gray-200 bg-white p-2 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"px-2 font-bold text-gray-500 text-sm uppercase tracking-wider",children:"表示スタイル"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:d,"aria-label":h?"スタイル選択のピン留めを解除":"スタイル選択をピン留め",children:h?w.jsx(Va,{className:"h-4 w-4"}):w.jsx(Ga,{className:"h-4 w-4"})})]}),w.jsx("div",{className:"space-y-1",children:r.map(x=>{const b=t===x.name;return w.jsx("button",{type:"button",className:`w-full rounded px-2 py-1 text-left text-sm transition-colors ${b?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{i(x.name),h||y()},children:x.name},x.name)})})]})]})}),KL=Y.memo(function({currentAlign:t,onAlignChange:r,position:i,zIndex:s=40,onActivate:o,isOpen:a,onToggle:n,onClose:l,isPinned:c,onPinToggle:h}){const d=Y.useRef(null),f={top:"0",right:Qe(2),...i},u=a,p=(zo.find(x=>x.value===t)??zo[0]).Icon,m=Y.useCallback(()=>{n(),o?.()},[o,n]),y=Y.useCallback(()=>{l()},[l]);return Y.useEffect(()=>{if(!u||c)return;const x=b=>{d.current&&!d.current.contains(b.target)&&y()};return document.addEventListener("pointerdown",x),()=>{document.removeEventListener("pointerdown",x)}},[y,c,u]),w.jsxs("div",{ref:d,className:"pointer-events-none fixed flex flex-col items-end",style:{top:f.top,right:f.right,bottom:f.bottom,left:f.left,zIndex:s,transition:"right 0.5s"},children:[w.jsx("button",{type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:m,"aria-label":"揃えを選択",children:w.jsx(p,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),u&&w.jsxs("div",{className:"pointer-events-auto mt-2 w-48 rounded-lg border border-gray-200 bg-white p-2 shadow-xl transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-800",children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{className:"px-2 font-bold text-gray-500 text-sm uppercase tracking-wider",children:"揃え"}),w.jsx("button",{type:"button",className:"rounded p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-gray-700 dark:hover:text-gray-300",onClick:h,"aria-label":c?"揃え選択のピン留めを解除":"揃え選択をピン留め",children:c?w.jsx(Va,{className:"h-4 w-4"}):w.jsx(Ga,{className:"h-4 w-4"})})]}),w.jsx("div",{className:"space-y-1",children:zo.map(({value:x,label:b,Icon:k})=>{const v=t===x;return w.jsxs("button",{type:"button",className:`flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors ${v?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{r(x),c||y()},children:[w.jsx(k,{className:"h-4 w-4"}),b]},x)})})]})]})}),QL=Y.memo(function({parseResult:t,theme:r,styleClassName:i,iFrameAllowedDomains:s,linkComponent:o}){return w.jsx("div",{className:"w-full min-w-0",children:w.jsx("div",{className:i,"data-theme":r,children:w.jsx(ly,{htmlContent:t.htmlContent,theme:r,iFrameAllowedDomains:s,linkComponent:o})})})});function uy(){const[e,t]=Y.useState("toc"),[r,i]=Y.useState(!1),[s,o]=Y.useState(!1),[a,n]=Y.useState(!1),[l,c]=Y.useState(!1),[h,d]=Y.useState(!1),[f,u]=Y.useState(!1),p=Y.useCallback(()=>t("toc"),[]),m=Y.useCallback(()=>i(M=>!M),[]),y=Y.useCallback(()=>i(!1),[]),x=Y.useCallback(()=>c(M=>!M),[]),b=Y.useCallback(()=>t("style"),[]),k=Y.useCallback(()=>o(M=>!M),[]),v=Y.useCallback(()=>o(!1),[]),S=Y.useCallback(()=>d(M=>!M),[]),_=Y.useCallback(()=>t("align"),[]),F=Y.useCallback(()=>n(M=>!M),[]),T=Y.useCallback(()=>n(!1),[]),D=Y.useCallback(()=>u(M=>!M),[]);return{lastActiveMenu:e,isTocOpen:r,isStyleOpen:s,isAlignOpen:a,isTocPinned:l,isStylePinned:h,isAlignPinned:f,activateToc:p,toggleToc:m,closeToc:y,togglePinToc:x,activateStyle:b,toggleStyle:k,closeStyle:v,togglePinStyle:S,activateAlign:_,toggleAlign:F,closeAlign:T,togglePinAlign:D}}function JL({parseResult:e,content:t,error:r=null,isLoading:i=!1,theme:s,style:o,onStyleChange:a,availableStyles:n=cy,align:l=dy,onAlignChange:c,showToc:h=!0,showStyle:d=!0,showAlign:f=!0,tocPosition:u,stylePosition:p,alignPosition:m,width:y,maxWidth:x,padding:b=16,iFrameAllowedDomains:k,emptyMessage:v="ファイルを選択してください。",toolbar:S,linkComponent:_}){const F=Y.useRef(null),T=Y.useRef(null),D=uy(),M=S??D,O=Number.isFinite(b)&&b>=0?b:16,X=f&&typeof c=="function",j=Y.useCallback(ot=>{const ct=F.current;if(ct){const ut=ct.querySelector("[data-theme]"),mt=ct.getBoundingClientRect(),wt=ut?.children;let Dt=-1,Gt=Number.POSITIVE_INFINITY;if(wt)for(let ke=0;ke<wt.length;ke+=1){const bo=wt[ke],ul=Math.abs(bo.getBoundingClientRect().top-mt.top);ul<Gt&&(Gt=ul,Dt=ke)}if(wt&&Dt>=0){const bo=wt[Dt].getBoundingClientRect();T.current={childIndex:Dt,offset:bo.top-mt.top}}else T.current=null}a(ot)},[a]);Y.useLayoutEffect(()=>{const ot=T.current;if(!ot)return;T.current=null;const ct=F.current;if(!ct)return;const mt=ct.querySelector("[data-theme]")?.children[ot.childIndex];if(!mt)return;const wt=ct.getBoundingClientRect(),Gt=mt.getBoundingClientRect().top-wt.top;ct.scrollTop+=Gt-ot.offset});const I=Y.useCallback(ot=>{const ct=document.getElementById(ot);ct&&ct.scrollIntoView({behavior:"smooth"})},[]),$=Y.useMemo(()=>n.find(ct=>ct.name===o)?.className??"markdown-body",[n,o]),A=e?.headings??[],N=A.length>0,P=h&&N,E=M.lastActiveMenu==="style"?60:50,R=M.lastActiveMenu==="toc"?60:50,B=M.lastActiveMenu==="align"?60:50;let H=0;const W=P?Qe(H++):void 0,G=d?Qe(H++):void 0,V=X?Qe(H++):void 0,Z=ot=>X&&c?w.jsx(KL,{currentAlign:l,onAlignChange:c,position:{right:ot,...m},zIndex:B,onActivate:M.activateAlign,isOpen:M.isAlignOpen,onToggle:M.toggleAlign,onClose:M.closeAlign,isPinned:M.isAlignPinned,onPinToggle:M.togglePinAlign}):null,K=()=>i?w.jsx("p",{children:"🌀 Loading data..."}):r?w.jsxs("p",{className:"text-red-500",children:["エラー: ",r]}):e?w.jsxs("div",{className:"relative w-full min-w-0",children:[w.jsx(QL,{parseResult:e,theme:s,styleClassName:$,iFrameAllowedDomains:k,linkComponent:_}),d&&w.jsx(ZL,{currentStyle:o,availableStyles:n,onStyleChange:j,position:{right:G,...p},zIndex:E,onActivate:M.activateStyle,isOpen:M.isStyleOpen,onToggle:M.toggleStyle,onClose:M.closeStyle,isPinned:M.isStylePinned,onPinToggle:M.togglePinStyle}),P&&w.jsx(VL,{headings:A,onHeadingClick:I,position:{right:W,...u},zIndex:R,onActivate:M.activateToc,isOpen:M.isTocOpen,onToggle:M.toggleToc,onClose:M.closeToc,isPinned:M.isTocPinned,onPinToggle:M.togglePinToc}),Z(V)]}):t!==null?w.jsxs(w.Fragment,{children:[w.jsx("pre",{className:"whitespace-pre-wrap break-all",children:t}),Z(Qe(0))]}):w.jsx("p",{children:v});return w.jsx("div",{ref:F,className:"grid h-full w-full overflow-x-auto overflow-y-auto *:min-w-0",style:{padding:`${O}px`},children:w.jsx("div",{style:{width:y,maxWidth:x,marginInline:YL(l)},children:K()})})}const fy=({node:e})=>{const r=e.data?.siteMetadata;return w.jsx("div",{className:"mt-6 mb-6",children:w.jsx(hl,{href:e.url,isExternal:!0,metadata:r})})},gy=({node:e})=>w.jsx("del",{children:w.jsx(Tt,{nodes:e.children})}),py=({node:e})=>w.jsx("em",{children:w.jsx(Tt,{nodes:e.children})}),my=({node:e})=>w.jsx("sup",{children:w.jsxs("a",{id:`fnref-${e.identifier}`,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",href:`#fn-${e.identifier}`,children:["[",e.identifier,"]"]})}),tF=({nodes:e,theme:t="light"})=>e.length===0?null:w.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:w.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>w.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:w.jsx(Tt,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),yy=({node:e})=>w.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),eF=e=>e.replace(/<rt\b[^>]*>[\s\S]*?<\/rt>/gi,"").replace(/<rp\b[^>]*>[\s\S]*?<\/rp>/gi,"").replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&#(\d+);/g,(s,o)=>{const a=Number(o);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/&#x([0-9a-f]+);/gi,(s,o)=>{const a=Number.parseInt(o,16);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/\s+/g," ").trim(),xy=e=>{const t=r=>{if(!r||typeof r!="object")return"";if("type"in r&&r.type==="html"){const i=r.value;return typeof i=="string"?eF(i):""}if("value"in r){const i=r.value;if(typeof i=="string")return i}return"children"in r&&Array.isArray(r.children)?r.children.map(i=>t(i)).join(""):""};return e.map(r=>t(r)).join("").replace(/\s+/g," ").trim()},rF=e=>{switch(e){case 1:return"border-b-2 border-gray-300 pb-2 text-3xl font-bold dark:border-gray-600 dark:text-gray-100";case 2:return"border-b border-gray-300 pb-2 text-2xl font-semibold dark:border-gray-600 dark:text-gray-200";case 3:return"text-xl font-semibold dark:text-gray-300";default:return"text-lg font-medium dark:text-gray-400"}},Cy=({node:e})=>{const t=new jy,r=`h${e.depth}`,i=e.data?.hProperties?.id,s=t.slug(xy(e.children));return w.jsx(r,{id:i||s,className:rF(e.depth),children:w.jsx(Tt,{nodes:e.children})})},iF=e=>{const t={};return e.split(";").forEach(r=>{const[i,...s]=r.split(":");if(i&&s.length>0){const o=s.join(":"),a=i.trim().replace(/-([a-z])/g,n=>n[1]?n[1].toUpperCase():"");t[a]=o.trim()}}),t},sF=({node:e,theme:t,iFrameAllowedDomains:r})=>{const{tagName:i="div",properties:s={}}=e.data||{},o=i,a={...s};if(s.style&&typeof s.style=="string"){const n=iF(s.style);a.style=n}return w.jsx(o,{...a,children:w.jsx(Tt,{nodes:e.children,theme:t,iFrameAllowedDomains:r})})},oF={dify:ny},aF=e=>oF[e]||null,nF=/^[a-z][a-z0-9+.-]*:/,lF=({node:e,iFrameAllowedDomains:t=[]})=>{const[r,i]=Y.useState(""),[s,o]=Y.useState(!1),[a,n]=Y.useState(null);Y.useEffect(()=>{if(o(!0),typeof window<"u"){const c=er(window);let h=null;c.addHook("afterSanitizeAttributes",f=>{const u=f.tagName.toLowerCase();if(u==="iframe"){const p=f.getAttribute("src"),m=f.getAttribute("data-plugin-type");if(p)try{const y=new URL(p);t.includes(y.hostname)?m&&(h={type:m,iframeHtml:f.outerHTML}):f.removeAttribute("src")}catch{f.removeAttribute("src")}}if(u==="a"){f.classList.add("inline-block","w-fit","text-link","underline","visited:text-link-visited");const p=f.getAttribute("href");p&&nF.test(p)&&(f.setAttribute("target","_blank"),f.setAttribute("rel","noreferrer"))}});const d=c.sanitize(e.value,{ADD_TAGS:["iframe"],ADD_ATTR:["src","frameborder","allow","allowfullscreen","target","rel","data-plugin-type","width","height","title","class","style"]});h?n(h):i(d)}},[e.value,t]);const l=/^\s*<(address|article|aside|blockquote|details|dialog|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h[1-6]|header|hgroup|hr|li|main|nav|ol|p|pre|section|table|ul)/i.test(e.value);if(!s)return null;if(a){const{type:c,iframeHtml:h}=a,d=aF(c);if(d)return w.jsx(d,{iframeHtml:h,iFrameAllowedDomains:t});console.warn(`Unknown or unregistered plugin type: ${c}`)}return r===""?null:l?w.jsx("div",{dangerouslySetInnerHTML:{__html:r}}):w.jsx("span",{dangerouslySetInnerHTML:{__html:r}})},by=({node:e})=>{if(!e.url)return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return w.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 inline-block w-fit max-w-full",children:[w.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&w.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},ky=({node:e})=>w.jsx("code",{className:"rounded-md bg-gray-200 px-1.5 py-1 font-mono text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-200",children:e.value}),hF=({node:e})=>{const t=Y.useRef(null);return Y.useLayoutEffect(()=>{try{t.current&&Ua.render(e.value,t.current)}catch(r){console.error("An error occurred while rendering KaTeX:",r),t.current&&(t.current.innerText=`Math rendering error: ${r instanceof Error?r.message:String(r)}`)}},[e.value]),w.jsx("span",{ref:t,className:"rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200"})},cF=/^[a-z][a-z0-9+.-]*:/,wy=({node:e})=>{const t=cF.test(e.url);return w.jsx("a",{className:"inline-block w-fit text-link underline visited:text-link-visited",href:e.url,target:t?"_blank":void 0,rel:t?"noreferrer":void 0,children:w.jsx(Tt,{nodes:e.children})})},vy=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?w.jsx("li",{children:w.jsx(Tt,{nodes:e.children[0].children})}):w.jsx("li",{children:w.jsx(Tt,{nodes:e.children})}),Sy=({node:e})=>{const t=e.ordered?"ol":"ul";return w.jsx(t,{children:w.jsx(Tt,{nodes:e.children})})},dF=({node:e})=>w.jsx("mark",{children:w.jsx(Tt,{nodes:e.children})}),Ty=({node:e})=>w.jsx("p",{children:w.jsx(Tt,{nodes:e.children})}),By=({node:e})=>w.jsx("strong",{children:w.jsx(Tt,{nodes:e.children})}),uF=({node:e})=>w.jsx("sub",{children:w.jsx(Tt,{nodes:e.children})}),fF=({node:e})=>w.jsx("sup",{children:w.jsx(Tt,{nodes:e.children})}),zh=e=>{const t=e.data?.hProperties;return{merged:t?.merged??!1,colSpan:t?.colSpan,rowSpan:t?.rowSpan,textAlign:t?.textAlign}},_y=({node:e})=>{const[t,...r]=e.children;return w.jsx("div",{className:"overflow-x-auto",children:w.jsxs("table",{className:"w-full border-collapse border-none",children:[w.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:w.jsx("tr",{children:t.children.map((i,s)=>{const{merged:o,colSpan:a,rowSpan:n,textAlign:l}=zh(i);return o?null:w.jsx("th",{colSpan:a,rowSpan:n,style:{textAlign:l??e.align?.[s]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:w.jsx(Tt,{nodes:i.children})},`mdast-table-node-${e.type}-${s}`)})})}),w.jsx("tbody",{children:r.map((i,s)=>w.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((o,a)=>{const{merged:n,colSpan:l,rowSpan:c,textAlign:h}=zh(o);return n?null:w.jsx("td",{colSpan:l,rowSpan:c,style:{textAlign:h??e.align?.[a]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:w.jsx(Tt,{nodes:o.children})},`mdast-table-node-${e.type}-${a}`)})},`mdast-table-node-${e.type}-${s}`))})]})})},Ly=({node:e})=>w.jsx(w.Fragment,{children:e.value}),Fy=()=>w.jsx("hr",{className:"border-gray-300 dark:border-gray-600"}),My=({node:e})=>{const t=e.data?.title||"";return w.jsxs("details",{className:"markdown-details",children:[w.jsx("summary",{children:t}),w.jsx("div",{className:"markdown-details-content",children:w.jsx(Tt,{nodes:e.children})})]})},Ay=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return w.jsxs("aside",{className:r,children:[w.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),w.jsx("div",{className:"message-content",children:w.jsx(Tt,{nodes:e.children})})]})},Tt=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,s)=>{switch(i.type){case"block-link":return w.jsx(fy,{node:i},`mdast-node-${i.type}-${s}`);case"blockquote":return w.jsx(Ey,{node:i},`mdast-node-${i.type}-${s}`);case"break":return w.jsx("br",{},`mdast-node-${i.type}-${s}`);case"code":return w.jsx(ll,{node:i,theme:t},`mdast-node-${i.type}-${s}`);case"delete":return w.jsx(gy,{node:i},`mdast-node-${i.type}-${s}`);case"details":return w.jsx(My,{node:i},`mdast-node-${i.type}-${s}`);case"emphasis":return w.jsx(py,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteReference":return w.jsx(my,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteDefinition":return null;case"footnote-back-link":return w.jsx(yy,{node:i},`mdast-node-${i.type}-${s}`);case"heading":return w.jsx(Cy,{node:i},`mdast-node-${i.type}-${s}`);case"html":return w.jsx(lF,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${s}`);case"html-block-container":{const o=i,a=`mdast-node-${o.type}-${o.position?.start?.offset??"na"}-${o.position?.end?.offset??"na"}`;return w.jsx(sF,{node:o,theme:t,iFrameAllowedDomains:r},a)}case"image":return w.jsx(by,{node:i},`mdast-node-${i.type}-${s}`);case"inlineCode":return w.jsx(ky,{node:i},`mdast-node-${i.type}-${s}`);case"inlineMath":return w.jsx(hF,{node:i},`mdast-node-${i.type}-${s}`);case"link":return w.jsx(wy,{node:i},`mdast-node-${i.type}-${s}`);case"listItem":return w.jsx(vy,{node:i},`mdast-node-${i.type}-${s}`);case"list":return w.jsx(Sy,{node:i},`mdast-node-${i.type}-${s}`);case"mark":return w.jsx(dF,{node:i},`mdast-node-${i.type}-${s}`);case"math":return w.jsx($L,{node:i},`mdast-node-${i.type}-${s}`);case"message":return w.jsx(Ay,{node:i},`mdast-node-${i.type}-${s}`);case"paragraph":return w.jsx(Ty,{node:i},`mdast-node-${i.type}-${s}`);case"strong":return w.jsx(By,{node:i},`mdast-node-${i.type}-${s}`);case"subscript":return w.jsx(uF,{node:i},`mdast-node-${i.type}-${s}`);case"superscript":return w.jsx(fF,{node:i},`mdast-node-${i.type}-${s}`);case"table":return w.jsx(_y,{node:i},`mdast-node-${i.type}-${s}`);case"text":return w.jsx(Ly,{node:i},`mdast-node-${i.type}-${s}`);case"thematicBreak":return w.jsx(Fy,{},`mdast-node-${i.type}-${s}`);case"yaml":return null;case"twitter-embed":return w.jsx(cl,{node:i,theme:t},`mdast-node-${i.type}-${i.tweetId}-${s}`);case"youtube-embed":return w.jsx(dl,{node:i},`mdast-node-${i.type}-${s}`);default:{if(process.env.NODE_ENV==="development")return w.jsxs("div",{children:[w.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),w.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${s}`);throw new Error(`Unknown node type: ${i.type}`)}}}),Ey=({node:e})=>w.jsx("blockquote",{className:"my-4 border-gray-300 border-l-4 bg-gray-50 p-4 italic dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300",children:w.jsx(Tt,{nodes:e.children})});function gF({text:e,url:t,hashtags:r,via:i,related:s,in_reply_to:o}){const a=new URL("https://twitter.com/intent/tweet");return e!==void 0&&a.searchParams.set("text",e),t!==void 0&&a.searchParams.set("url",t),r!==void 0&&a.searchParams.set("hashtags",r.join(",")),i!==void 0&&a.searchParams.set("via",i),s!==void 0&&a.searchParams.set("related",s.join(",")),o!==void 0&&a.searchParams.set("in_reply_to",o),a.toString()}const $y=e=>{try{const t=new URL(e),r=Object.fromEntries(t.searchParams.entries());let i=null;if(t.hostname==="youtu.be"?i=t.pathname.substring(1):t.hostname.endsWith("youtube.com")&&(t.pathname==="/watch"?i=t.searchParams.get("v"):t.pathname.startsWith("/embed/")&&(i=t.pathname.split("/")[2])),i){const{v:s,...o}=r;return{videoId:i,params:o}}return null}catch{return null}},Py=async e=>{try{const t=new AbortController,r=setTimeout(()=>t.abort(),1e4),i=await fetch(e,{signal:t.signal});if(clearTimeout(r),!i.ok)return null;const s=await i.text(),o={url:e},a=Hy.load(s),n=a("title").text().trim();o.title=n;const l=a("meta");for(const c of l){const h=c.attribs.property;h==="og:site_name"&&(o.site_name=c.attribs.content||void 0),h==="og:title"&&(o.title=c.attribs.content||n),h==="og:description"&&(o.description=c.attribs.content||void 0),h==="og:image"&&(o.image=c.attribs.content||void 0),h==="og:type"&&(o.type=c.attribs.content||void 0),c.attribs.name==="description"&&(o.description=c.attribs.content||void 0)}return o}catch(t){return ps.Logger.error("Error fetching site metadata:",t),null}},pF=()=>e=>{$t.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];t.children.length!==1||s.type!=="link"||s.children.length!==1||!(s.children[0].type==="text"&&s.url===s.children[0].value)||!i||r===void 0||(i.children[r]={type:"block-link",url:s.url})})},ai=new Map,mF=(e,t)=>t.fetchAll?!0:t.urlPatterns&&t.urlPatterns.length>0?t.urlPatterns.some(r=>r.test(e)):/^https?:\/\//.test(e)&&!e.includes("localhost")&&!e.includes("127.0.0.1"),yF=(e={})=>{const{enableCache:t=!0}=e;return async r=>{const i=[];$t.visit(r,"block-link",o=>{mF(o.url,e)&&i.push(o)});const s=i.map(async o=>{const a=o.url;if(t&&ai.has(a)){const n=ai.get(a);n&&(o.data=o.data||{},o.data.siteMetadata=n);return}try{const n=await Py(a);n?(o.data=o.data||{},o.data.siteMetadata=n,t&&ai.set(a,n)):t&&ai.set(a,null)}catch(n){ps.Logger.warn(`Failed to fetch metadata for ${a}:`,n),t&&ai.set(a,null)}});await Promise.all(s)}},xF=/\s*\{#(.+?)\}\s*$/,CF=()=>e=>{$t.visit(e,"heading",t=>{if(t.children.length===0)return;const r=t.children[t.children.length-1];if(r?.type!=="text")return;const i=r,s=i.value.match(xF);if(s){const o=s[1];t.data||(t.data={});const a=t.data,n=a.hProperties||{};n.id=o,a.hProperties=n,i.value=i.value.substring(0,s.index).trimEnd(),i.value===""&&t.children.pop()}})},bF=()=>e=>{$t.visit(e,"footnoteDefinition",t=>{$t.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},kF=()=>e=>{$t.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const o=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(o){const[,a,n]=o,l={type:"link",url:a,children:[{type:"text",value:n}]};i.children.splice(r,1,l)}})},wF=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let s=0;for(;s<i.length;){const o=i[s];if(o.type==="html"&&o.value.startsWith("<")&&!o.value.startsWith("</")&&o.value.match(/<([a-zA-Z0-9]+)/)){let n="",l=0;const c=[];let h=!1;for(let d=s;d<i.length;d++){const f=i[d];if(f.type==="html"){n+=f.value;const u=f.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const p of u){const m=p.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];p.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():p.startsWith("<")&&c.push(y)}}else if(f.type==="text")n+=f.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(s,l,{type:"html",value:n})}s++}};$t.visit(e,"paragraph",t),$t.visit(e,"tableCell",t),$t.visit(e,"heading",t),$t.visit(e,"emphasis",t),$t.visit(e,"strong",t),$t.visit(e,"delete",t)},Wh=/\s*=\s*(\d+)(w|h|x|y)\s*/g,vF=()=>e=>{$t.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(Wh)];return{updatedText:l.replaceAll(Wh,"").trim(),matches:c}},{updatedText:i,matches:s}=r(t.alt);t.alt=i;const{updatedText:o,matches:a}=r(t.title);t.title=o||null;const n=[...s,...a];if(n.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of n){const c=Number.parseInt(l[1],10),h=l[2];h==="w"||h==="x"?t.data.hProperties.width=c:(h==="h"||h==="y")&&(t.data.hProperties.height=c)}}})},SF=()=>e=>{$t.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},TF=/https?:\/\/(?:www\.|mobile\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,BF=()=>e=>{$t.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];if(t.children.length!==1||s.type!=="link"||!s.children.every(l=>l.type==="text")||!i||r===void 0)return;const a=s.url.match(TF);if(!a)return;const n=a[1];n&&(i.children[r]={type:"twitter-embed",tweetId:n})})},_F=()=>e=>{$t.visit(e,"paragraph",(t,r,i)=>{const s=t.children[0];if(t.children.length!==1||s.type!=="link"||!s.children.every(n=>n.type==="text")||!i||r===void 0)return;const a=$y(s.url);a&&(i.children[r]={type:"youtube-embed",videoId:a.videoId,params:a.params})})},jh=/^:::(message|details)\s*(.*)/,LF=()=>e=>{function t(r){const i=[];let s=0;for(;s<r.length;){const o=r[s];if(o.type==="paragraph"&&o.children[0]?.type==="text"&&o.children[0].value.trim().startsWith(":::")){const l=o.children[0].value.trim().match(jh);if(l){const c=s;let h=-1,d=1;const f=o.children.at(-1);if(o.children.length>1&&f?.type==="text"&&f.value.trim()===":::")h=c;else for(let u=c+1;u<r.length;u++){const p=r[u];if(p.type==="paragraph"&&p.children[0]?.type==="text"){const m=p.children[0].value.trim();jh.test(m)?d++:m===":::"&&d--}if(d===0){h=u;break}}if(h!==-1){const u=l[1],p=l[2];let m;if(h===c){const b=o.children.slice(1,-1);b[0]?.type==="break"&&b.shift(),b.at(-1)?.type==="break"&&b.pop(),m=b.length>0?[{type:"paragraph",children:b}]:[]}else{const b=o.children.slice(1);b[0]?.type==="break"&&b.shift();const k={type:"paragraph",children:b},S=r[h].children.slice(0,-1);S.at(-1)?.type==="break"&&S.pop();const _={type:"paragraph",children:S},F=r.slice(c+1,h);m=[k,...F,_].filter(T=>!(T.type==="paragraph"&&T.children.length===0))}const y=t(m);let x;if(u==="message"?x={type:"message",data:{messageType:p.trim()},children:y}:u==="details"&&(x={type:"details",data:{title:p.trim()},children:y}),x){i.push(x),s=h+1;continue}}}}const a={...o};"children"in a&&Array.isArray(a.children)&&(a.type==="blockquote"||a.type==="footnoteDefinition"||a.type==="message"||a.type==="details"?a.children=t(a.children):a.type==="list"&&(a.children=a.children.map(n=>({...n,children:t(n.children)})))),i.push(a),s++}return i}e.children=t(e.children)},FF=e=>{const t=[];return $t.visit(e,"heading",r=>{const i=xy(r.children),s=r.data?.hProperties?.id;s&&i&&t.push({depth:r.depth,text:i,id:s})}),t};exports.BlockLinkNode=fy;exports.BlockquoteNode=Ey;exports.CodeNode=ll;exports.Color=ae;exports.Color$1=Xr;exports.DEFAULT_MARKDOWN_STYLES=cy;exports.DEFAULT_MERMAID_INTERACTION=iy;exports.DeleteNode=gy;exports.EmphasisNode=py;exports.FootnoteBackLinkNode=yy;exports.FootnoteReferenceNode=my;exports.FootnotesSection=tF;exports.HeadingNode=Cy;exports.ImageNode=by;exports.InlineCodeNode=ky;exports.JSON_SCHEMA=of;exports.LinkNode=wy;exports.ListItemNode=vy;exports.ListNode=Sy;exports.MarkdownRenderer=ly;exports.MarkdownViewer=JL;exports.MermaidDiagram=nl;exports.NodesRenderer=Tt;exports.ParagraphNode=Ty;exports.Rgb=Nt;exports.RichLinkCard=hl;exports.StrongNode=By;exports.TableNode=_y;exports.TableOfContents=hy;exports.TextNode=Ly;exports.ThematicBreakNode=Fy;exports.TwitterEmbedNode=cl;exports.Utils=ht;exports.YouTubeEmbedNode=dl;exports.ZERO_WIDTH_SPACE=Lf;exports.ZennDetailsNode=My;exports.ZennMessageNode=Ay;exports.__export=Zh;exports.__name=g;exports.abs=i1;exports.acos=d1;exports.adjustChannel=Ka;exports.argumentsTag=En;exports.array=Qc;exports.arrayBufferTag=pf;exports.arrayTag=gf;exports.asin=u1;exports.assignWithDepth_default=St;exports.at=tt;exports.atan2=s1;exports.booleanTag=An;exports.calculateMathMLDimensions=Fx;exports.calculateTextDimensions=no;exports.calculateTextHeight=Nn;exports.calculateTextWidth=me;exports.cleanAndMerge=lo;exports.clear=mc;exports.clear$1=aS;exports.clear$2=$v;exports.clear2=tS;exports.color=Nr;exports.commonDb_exports=rn;exports.common_default=Ur;exports.computeDimensionOfText=ug;exports.computeLabelTransform=pr;exports.configureLabelImages=zn;exports.configureSvgSize=en;exports.constant=Ue;exports.constant$1=Ks;exports.cos=o1;exports.createIntentTweetLink=gF;exports.createText=he;exports.curveBasis=Ls;exports.darken=z;exports.dataViewTag=yf;exports.dateTag=df;exports.dayjs2=Kh;exports.decodeEntities=Ne;exports.defaultConfig2=Dx;exports.defaultConfig_default=Qa;exports.define=Zs;exports.distExports=nf;exports.edgeLabels=Ai;exports.epsilon=aa;exports.extend=dn;exports.extractHeadings=FF;exports.extractYouTubeVideoId=$y;exports.fetchSiteMetadata=Py;exports.float32ArrayTag=Tf;exports.float64ArrayTag=Bf;exports.generateId=Pf;exports.getAccDescription=bc;exports.getAccTitle=xc;exports.getConfig=Ct;exports.getConfig2=gt;exports.getDefaultExportFromCjs=Hh;exports.getDiagramTitle=wc;exports.getEdgeId=sw;exports.getEffectiveHtmlLabels=Ot;exports.getIconSVG=Vr;exports.getLineFunctionsWithOffset=Hp;exports.getRegisteredLayoutAlgorithm=NS;exports.getStylesFromArray=Dn;exports.getSubGraphTitleMargins=ho;exports.getTag=oo;exports.getThemeVariables3=Jh;exports.getUrl=gc;exports.getUserDefinedConfig=mx;exports.halfPi=na;exports.hasKatex=Rr;exports.hue=Pb;exports.insertCluster=vg;exports.insertEdge=Gp;exports.insertEdgeLabel=Yp;exports.insertNode=rl;exports.int16ArrayTag=vf;exports.int32ArrayTag=Sf;exports.int8ArrayTag=wf;exports.interpolateNumber=Be;exports.interpolateRgb=Qo;exports.interpolateString=qc;exports.isDark=Jt;exports.isLabelStyle=Ln;exports.isPrimitive=ao;exports.isTypedArray=Ci;exports.isValidShape=jp;exports.lighten=q;exports.line=td;exports.lineBreakRegex=Yr;exports.load=af;exports.log=U;exports.mapTag=uf;exports.markerOffsets=Et;exports.markers_default=Kp;exports.max=a1;exports.min=n1;exports.nogamma=un;exports.numberTag=Mn;exports.objectTag=mf;exports.parseFontSize=Ri;exports.parseGenericTypes=Yo;exports.pi=to;exports.positionEdgeLabel=Up;exports.positionNode=eS;exports.random=Of;exports.regexpTag=hf;exports.registerIconPacks=Wf;exports.remarkBlockLink=pF;exports.remarkBlockLinkMetadata=yF;exports.remarkCustomHeadingId=CF;exports.remarkFootnoteBackLink=bF;exports.remarkHtmlAnchorToLink=kF;exports.remarkHtmlInHtml=wF;exports.remarkImageSize=vF;exports.remarkParentNode=SF;exports.remarkTwitterEmbed=BF;exports.remarkYouTubeEmbed=_F;exports.remarkZennMessage=LF;exports.render=DS;exports.renderKatexSanitized=tn;exports.rgbConvert=Rc;exports.rgba=_e;exports.sanitizeText=Kt;exports.select=dt;exports.selectSvgElement=wd;exports.setAccDescription=Cc;exports.setAccTitle=yc;exports.setConfig2=Rx;exports.setDiagramTitle=kc;exports.setNodeElem=Jv;exports.setTag=ff;exports.setupGraphViewbox=pc;exports.setupGraphViewbox2=vc;exports.sin=l1;exports.sqrt=h1;exports.stringTag=Fn;exports.styles2String=et;exports.symbolTag=cf;exports.tau=c1;exports.terminalLabels=Lt;exports.toContentAlign=HL;exports.uint16ArrayTag=bf;exports.uint32ArrayTag=kf;exports.uint8ArrayTag=xf;exports.uint8ClampedArrayTag=Cf;exports.unknownIcon=qf;exports.updateNodeBounds=rt;exports.useMarkdownToolbarState=uy;exports.utils_default=Zt;exports.withPath=Kc;exports.wrapLabel=Rf;
311
+ //# sourceMappingURL=extractHeadings-BsiIYa_e.cjs.map