@juki-team/base-ui 1.4.127 → 1.4.129

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 (271) hide show
  1. package/dist/esm/ArrowForwardIcon-IN9agpuQ.js +1 -0
  2. package/dist/esm/BarChart-BnEygCik.js +1 -0
  3. package/dist/esm/CartesianChart-46JvJlt2.js +47 -0
  4. package/dist/esm/ChangePasswordModal-W7o3d5xv.js +1 -0
  5. package/dist/esm/CodeEditor-btUZu2Dy.js +1 -0
  6. package/dist/esm/{DataGrid-BMin2rBG.js → DataGrid-C-1PcbQ9.js} +1 -1
  7. package/dist/esm/DataViewer-DdoMfhBT.js +1 -0
  8. package/dist/esm/DrawerView-C59g89Qq.js +1 -0
  9. package/dist/esm/ExcalidrawButton-7RauNqcW.js +1 -0
  10. package/dist/esm/GraphvizViewer-Cdd3s9Pz.js +1 -0
  11. package/dist/esm/ImageLoaderCropper-By7-NpjH.js +1 -0
  12. package/dist/esm/InputCellPhoneNumber-BoliLbve.js +1 -0
  13. package/dist/esm/{InputColor-D4iKI1yK.js → InputColor-B6fjWGPV.js} +1 -1
  14. package/dist/esm/LineChart-yzQzjap8.js +1 -0
  15. package/dist/esm/MdMath-DcAukZc5.js +1 -0
  16. package/dist/esm/MdMathEditor-Ckf7tXlp.js +28 -0
  17. package/dist/esm/{Popover-3_hEGjKj.js → Popover-DOgPkWfK.js} +1 -1
  18. package/dist/esm/ReplyIcon-DrZrr78M.js +1 -0
  19. package/dist/esm/SettingsIcon-DM1F7UIb.js +1 -0
  20. package/dist/esm/SlideDeck-yImvO_hq.js +1 -0
  21. package/dist/esm/TableOfContents-KP3dhzIR.js +1 -0
  22. package/dist/esm/TextHeadCell-CtlRYJ1U.js +1 -0
  23. package/dist/esm/Tooltip-CQx5RC2x.js +7 -0
  24. package/dist/esm/UserCodeEditor-DVycUyoi.js +30 -0
  25. package/dist/esm/ViewModuleIcon-CBJGd2NB.js +1 -0
  26. package/dist/esm/VirtualizedRowsFixed-CJRctik-.js +1 -0
  27. package/dist/esm/WorksheetAsSlides-33duB_50.js +1 -0
  28. package/dist/esm/WorksheetBodies-Ptk1_moK.js +1 -0
  29. package/dist/esm/WorksheetContents-WKXb5Uk4.js +1 -0
  30. package/dist/esm/WorksheetEditor-z9ucL22I.js +1 -0
  31. package/dist/esm/WorksheetNode-DdlERlmz.js +1 -0
  32. package/dist/esm/WorksheetViewer-C8lplKFc.js +1 -0
  33. package/dist/esm/arc-BalHlvik.js +1 -0
  34. package/dist/esm/architectureDiagram-3BPJPVTR-mkUe-O1b.js +1 -0
  35. package/dist/esm/{band-DVHgMxOa.js → band-sgKLmfhd.js} +1 -1
  36. package/dist/esm/blockDiagram-GPEHLZMM-DI6f452i.js +1 -0
  37. package/dist/esm/c4Diagram-AAUBKEIU-CprJ4eDK.js +1 -0
  38. package/dist/esm/channel-B3QafhkE.js +1 -0
  39. package/dist/esm/{chunk-2J33WTMH-CSNy6D0K.js → chunk-2J33WTMH-CRrW12Q1.js} +1 -1
  40. package/dist/esm/{chunk-4BX2VUAB-BG00Pq3P.js → chunk-4BX2VUAB-DP1enpjM.js} +1 -1
  41. package/dist/esm/{chunk-55IACEB6-_KG92tYv.js → chunk-55IACEB6-Qy7BShb8.js} +1 -1
  42. package/dist/esm/{chunk-727SXJPM-1yPcPicj.js → chunk-727SXJPM-DCaL4Ssn.js} +1 -1
  43. package/dist/esm/{chunk-AQP2D5EJ-B6rE4s-L.js → chunk-AQP2D5EJ-MvQ9vOa8.js} +1 -1
  44. package/dist/esm/{chunk-FMBD7UC4-B30SBvYv.js → chunk-FMBD7UC4-C_QBV__I.js} +1 -1
  45. package/dist/esm/{chunk-ND2GUHAM-Dew5vqZ7.js → chunk-ND2GUHAM-Cz6MG9Ip.js} +1 -1
  46. package/dist/esm/{chunk-QZHKN3VN-DBZ0ofQY.js → chunk-QZHKN3VN-CNeKC3i9.js} +1 -1
  47. package/dist/esm/classDiagram-4FO5ZUOK-CIl1HCsD.js +1 -0
  48. package/dist/esm/classDiagram-v2-Q7XG4LA2-CIl1HCsD.js +1 -0
  49. package/dist/esm/constants.js +1 -1
  50. package/dist/esm/contest--aeYKKxf.js +1 -0
  51. package/dist/esm/cose-bilkent-S5V4N54A-BU_DfNnH.js +1 -0
  52. package/dist/esm/{cytoscape.esm-B8MMPWBb.js → cytoscape.esm-ym4YJMee.js} +1 -1
  53. package/dist/esm/dagre-BM42HDAG-B0jhlami.js +1 -0
  54. package/dist/esm/date-D28INXpp.js +1 -0
  55. package/dist/esm/diagram-2AECGRRQ-BoG6bCz0.js +1 -0
  56. package/dist/esm/diagram-5GNKFQAL-CmPEF4Gb.js +1 -0
  57. package/dist/esm/diagram-KO2AKTUF-otFu6fY1.js +1 -0
  58. package/dist/esm/diagram-LMA3HP47-BNvQPERF.js +1 -0
  59. package/dist/esm/diagram-OG6HWLK6-GT5ck18c.js +1 -0
  60. package/dist/esm/erDiagram-TEJ5UH35-DOTojUvv.js +1 -0
  61. package/dist/esm/flowDiagram-I6XJVG4X-DMNWQIoP.js +1 -0
  62. package/dist/esm/ganttDiagram-6RSMTGT7-UueSCT2P.js +1 -0
  63. package/dist/esm/gitGraphDiagram-PVQCEYII-BMejzE3B.js +1 -0
  64. package/dist/esm/{graph-CBbILnwM.js → graph-ByvXLzfz.js} +1 -1
  65. package/dist/esm/helpers.js +1 -1
  66. package/dist/esm/{index-CiR06WNd.js → index-2vw3cISu.js} +1 -1
  67. package/dist/esm/index-3RT03X12.js +1 -0
  68. package/dist/esm/index-4xl-oI83.js +1 -0
  69. package/dist/esm/index-8NOL5jJy.js +1 -0
  70. package/dist/esm/index-B8r5j97Z.js +1 -0
  71. package/dist/esm/index-BozcvZKO.js +1 -0
  72. package/dist/esm/index-C7UTkWm2.js +1 -0
  73. package/dist/esm/index-CCC14puG.js +1 -0
  74. package/dist/esm/index-CHdwVvPu.js +1 -0
  75. package/dist/esm/index-CQTsT8Zj.js +1 -0
  76. package/dist/esm/index-CU5b90xS.js +1 -0
  77. package/dist/esm/index-CWWVtFL-.js +1 -0
  78. package/dist/esm/index-CYal7RVq.js +1 -0
  79. package/dist/esm/index-CZHb8PSE.js +1 -0
  80. package/dist/esm/index-C_iDYl6D.js +1 -0
  81. package/dist/esm/index-Ci0TIrsP.js +1 -0
  82. package/dist/esm/index-CncjGRa9.js +1 -0
  83. package/dist/esm/index-CoD0BG11.js +1 -0
  84. package/dist/esm/index-CroDROK5.js +1 -0
  85. package/dist/esm/index-D2MvgUx2.js +1 -0
  86. package/dist/esm/index-DI4w9v5q.js +1 -0
  87. package/dist/esm/index-DO5jS6VE.js +1 -0
  88. package/dist/esm/index-DPqNWk5z.js +1 -0
  89. package/dist/esm/index-DQ_RDg2x.js +1 -0
  90. package/dist/esm/index-DklIqAi8.js +1 -0
  91. package/dist/esm/{index-9FCB1eYq.js → index-Dwi3ag-n.js} +1 -1
  92. package/dist/esm/index-MXDpbG5L.js +2 -0
  93. package/dist/esm/index-P3Cb0cjc.js +1 -0
  94. package/dist/esm/index-XKEYn2Wr.js +1 -0
  95. package/dist/esm/index-mPuca8dy.js +1 -0
  96. package/dist/esm/index-uScqGt-h.js +1 -0
  97. package/dist/esm/index-wgkxcuUd.js +1 -0
  98. package/dist/esm/infoDiagram-5YYISTIA-BSxjrZJf.js +1 -0
  99. package/dist/esm/{isUndefined-CFeFfF_Q.js → isUndefined-DFy0_ZQT.js} +1 -1
  100. package/dist/esm/ishikawaDiagram-YF4QCWOH-B2-9liDF.js +1 -0
  101. package/dist/esm/journeyDiagram-JHISSGLW-DBQd4ic_.js +1 -0
  102. package/dist/esm/kanban-definition-UN3LZRKU-DFolGaRv.js +1 -0
  103. package/dist/esm/{layout-B7iAeCjH.js → layout-C8ygm6VF.js} +1 -1
  104. package/dist/esm/{basic-setup-Uxna1ORW.js → light-CK5396YO.js} +1 -1
  105. package/dist/esm/{linear-BqR6NtXG.js → linear-L30X52KW.js} +1 -1
  106. package/dist/esm/main.js +1 -1
  107. package/dist/esm/{map-CUEN-iGA.js → map-CkaOHTqG.js} +1 -1
  108. package/dist/esm/mermaid.core-EsBL2ECN.js +1 -0
  109. package/dist/esm/mindmap-definition-RKZ34NQL-BIQZzlCy.js +1 -0
  110. package/dist/esm/pieDiagram-4H26LBE5-DZBAcvRC.js +1 -0
  111. package/dist/esm/purify.es-J-_UhghA.js +2 -0
  112. package/dist/esm/quadrantDiagram-W4KKPZXB-b5MVV3Rk.js +1 -0
  113. package/dist/esm/requirementDiagram-4Y6WPE33-CLn9X-PZ.js +1 -0
  114. package/dist/esm/sankeyDiagram-5OEKKPKP-D4-b_g7U.js +1 -0
  115. package/dist/esm/sequenceDiagram-3UESZ5HK-CCdY9Q3W.js +1 -0
  116. package/dist/esm/server.js +1 -1
  117. package/dist/esm/settings.js +1 -1
  118. package/dist/esm/stateDiagram-AJRCARHV-BSMAHoem.js +1 -0
  119. package/dist/esm/stateDiagram-v2-BHNVJYJU-BeJ_O1Tl.js +1 -0
  120. package/dist/esm/{throttle-omWozCTR.js → throttle-_MCmQvyw.js} +1 -1
  121. package/dist/esm/{time-BgcLBBP-.js → time-BHcZPeyw.js} +1 -1
  122. package/dist/esm/{time-BhHpEZFB.js → time-BJsLnFy1.js} +1 -1
  123. package/dist/esm/timeline-definition-PNZ67QCA-o-UlOwfU.js +1 -0
  124. package/dist/esm/{toNumber-DDd3oWg0.js → toNumber-DP6YK8S3.js} +1 -1
  125. package/dist/esm/types-TNt9NcVE.js +1 -0
  126. package/dist/esm/vennDiagram-CIIHVFJN-CySj1ueN.js +1 -0
  127. package/dist/esm/wardleyDiagram-YWT4CUSO-B7YSHlE3.js +1 -0
  128. package/dist/esm/worksheet-BBAH_yZC.js +1 -0
  129. package/dist/esm/{worksheet-BfayCMey.js → worksheet-DTRmzBjG.js} +1 -1
  130. package/dist/esm/{worksheet-JNPwhsnI.js → worksheet-GN3yGKYw.js} +1 -1
  131. package/dist/esm/xychartDiagram-2RQKCTM6-D6EqpoC5.js +1 -0
  132. package/dist/module-types/src/components/atoms/_lazy_/Collapse/types.d.ts +1 -1
  133. package/dist/module-types/src/components/atoms/server/icons/specials/types.d.ts +5 -6
  134. package/dist/module-types/src/components/organisms/SubmitView/commons/SubmitViewContent.d.ts +1 -1
  135. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MilkdownEditorContent/MilkdownEditorContent.d.ts +0 -1
  136. package/dist/module-types/src/settings/ApiManager.d.ts +168 -45
  137. package/package.json +5 -3
  138. package/src/styles/components/atoms/_modal.scss +9 -0
  139. package/src/vendor/fumadocs-ui/css/generated/docs.css +2 -0
  140. package/src/vendor/fumadocs-ui/css/generated/flux.css +1 -0
  141. package/src/vendor/fumadocs-ui/css/generated/notebook.css +2 -0
  142. package/src/vendor/fumadocs-ui/css/preset.css +0 -1
  143. package/dist/esm/ArrowForwardIcon-C60hznwq.js +0 -1
  144. package/dist/esm/BarChart-Y665GO2I.js +0 -1
  145. package/dist/esm/CartesianChart-BSvx15yS.js +0 -47
  146. package/dist/esm/ChangePasswordModal-k-lMf3KZ.js +0 -1
  147. package/dist/esm/CodeEditor-Dzi2v961.js +0 -1
  148. package/dist/esm/CodeViewer-BdmCvDHi.js +0 -1
  149. package/dist/esm/Collapse-DT9m5JSq.js +0 -1
  150. package/dist/esm/DataViewer-DFjt8Z2T.js +0 -1
  151. package/dist/esm/DrawerView-DnA_hA_o.js +0 -1
  152. package/dist/esm/ExcalidrawButton-BIpwsxPt.js +0 -1
  153. package/dist/esm/GraphvizViewer-BcJ7nToT.js +0 -1
  154. package/dist/esm/ImageLoaderCropper-05YcRQBj.js +0 -1
  155. package/dist/esm/InputCellPhoneNumber-BMf06bCT.js +0 -1
  156. package/dist/esm/LineChart-BIIgUvoc.js +0 -1
  157. package/dist/esm/MdMath-DQTMZaLV.js +0 -1
  158. package/dist/esm/MdMathEditor-BNc7OJyC.js +0 -28
  159. package/dist/esm/ReplyIcon-DHT60m5d.js +0 -1
  160. package/dist/esm/SettingsIcon-CwPMEnlj.js +0 -1
  161. package/dist/esm/SlideDeck-CeJiattp.js +0 -1
  162. package/dist/esm/SubmissionDateField-BrmGyMm3.js +0 -1
  163. package/dist/esm/TableOfContents-CuG8yYpo.js +0 -1
  164. package/dist/esm/TextHeadCell-SVbfF_eL.js +0 -1
  165. package/dist/esm/Tooltip-DDKwIA6e.js +0 -7
  166. package/dist/esm/UserCodeEditor-B03D6M_j.js +0 -30
  167. package/dist/esm/VirtualizedRowsFixed-CmXcLfyc.js +0 -1
  168. package/dist/esm/WorksheetAsSlides-DAW1vFDM.js +0 -1
  169. package/dist/esm/WorksheetBodies-CoKyyPAM.js +0 -1
  170. package/dist/esm/WorksheetContents-3MJ6QvVj.js +0 -1
  171. package/dist/esm/WorksheetEditor-MJcu6NAp.js +0 -1
  172. package/dist/esm/WorksheetNode-CNdvC8qa.js +0 -1
  173. package/dist/esm/WorksheetViewer-Csl3IhGA.js +0 -1
  174. package/dist/esm/arc-BNZ5pIhU.js +0 -1
  175. package/dist/esm/architectureDiagram-3BPJPVTR-EGo92Js8.js +0 -1
  176. package/dist/esm/blockDiagram-GPEHLZMM-YEwStt0q.js +0 -1
  177. package/dist/esm/c4Diagram-AAUBKEIU-6qLMKLHQ.js +0 -1
  178. package/dist/esm/channel-DuJyewAO.js +0 -1
  179. package/dist/esm/classDiagram-4FO5ZUOK-D95DEj2F.js +0 -1
  180. package/dist/esm/classDiagram-v2-Q7XG4LA2-D95DEj2F.js +0 -1
  181. package/dist/esm/cose-bilkent-S5V4N54A-DvdEsdgg.js +0 -1
  182. package/dist/esm/dagre-BM42HDAG-CAK4m8n4.js +0 -1
  183. package/dist/esm/date-CmFU6v8V.js +0 -1
  184. package/dist/esm/diagram-2AECGRRQ-CSqNVFb4.js +0 -1
  185. package/dist/esm/diagram-5GNKFQAL-BWzWwjF5.js +0 -1
  186. package/dist/esm/diagram-KO2AKTUF-D2-JeanM.js +0 -1
  187. package/dist/esm/diagram-LMA3HP47-DS2R1tWs.js +0 -1
  188. package/dist/esm/diagram-OG6HWLK6-DTxKf0Qv.js +0 -1
  189. package/dist/esm/erDiagram-TEJ5UH35-WtYIPbRt.js +0 -1
  190. package/dist/esm/flowDiagram-I6XJVG4X-Dy8OXjRp.js +0 -1
  191. package/dist/esm/ganttDiagram-6RSMTGT7-EDpgQ3lf.js +0 -1
  192. package/dist/esm/gitGraphDiagram-PVQCEYII-B46XqY2u.js +0 -1
  193. package/dist/esm/index-6wuMZC45.js +0 -1
  194. package/dist/esm/index-7ZeiemAy.js +0 -1
  195. package/dist/esm/index-93zckEk3.js +0 -1
  196. package/dist/esm/index-B62yhWOD.js +0 -1
  197. package/dist/esm/index-BGOJy6XN.js +0 -1
  198. package/dist/esm/index-BLeJ2vIS.js +0 -1
  199. package/dist/esm/index-BNfTE7vw.js +0 -1
  200. package/dist/esm/index-BP3Q2zrN.js +0 -1
  201. package/dist/esm/index-BP3zM0tT.js +0 -1
  202. package/dist/esm/index-BRtSnjHY.js +0 -1
  203. package/dist/esm/index-BqzjQnaK.js +0 -1
  204. package/dist/esm/index-BwuVfyt_.js +0 -1
  205. package/dist/esm/index-C5ILZmlq.js +0 -1
  206. package/dist/esm/index-C78By0NM.js +0 -1
  207. package/dist/esm/index-CR8iXDSF.js +0 -1
  208. package/dist/esm/index-CjLxDzml.js +0 -1
  209. package/dist/esm/index-Cp9n6f_0.js +0 -2
  210. package/dist/esm/index-CscbTRs5.js +0 -1
  211. package/dist/esm/index-Cub1smTw.js +0 -1
  212. package/dist/esm/index-DazVIYP8.js +0 -1
  213. package/dist/esm/index-De9_SWGB.js +0 -1
  214. package/dist/esm/index-Dg7y6UO5.js +0 -1
  215. package/dist/esm/index-DntVU4z9.js +0 -1
  216. package/dist/esm/index-DpJxGesA.js +0 -1
  217. package/dist/esm/index-FHXK2zWb.js +0 -1
  218. package/dist/esm/index-LpQq9PxO.js +0 -1
  219. package/dist/esm/index-QDPpqsGj.js +0 -1
  220. package/dist/esm/index-_4A5sEHw.js +0 -1
  221. package/dist/esm/index-cKVkCxcy.js +0 -1
  222. package/dist/esm/index-uJKDC6Vv.js +0 -1
  223. package/dist/esm/infoDiagram-5YYISTIA-CY7j_JnA.js +0 -1
  224. package/dist/esm/ishikawaDiagram-YF4QCWOH-D6o2nQHa.js +0 -1
  225. package/dist/esm/journeyDiagram-JHISSGLW-DdFME4_e.js +0 -1
  226. package/dist/esm/kanban-definition-UN3LZRKU-DVq4JZWr.js +0 -1
  227. package/dist/esm/mermaid.core-BJ63Ijjp.js +0 -1
  228. package/dist/esm/mindmap-definition-RKZ34NQL-jgbgERyG.js +0 -1
  229. package/dist/esm/pieDiagram-4H26LBE5-Kk7ovyMv.js +0 -1
  230. package/dist/esm/purify.es-BkjUCQC6.js +0 -2
  231. package/dist/esm/quadrantDiagram-W4KKPZXB-DiMCYk-T.js +0 -1
  232. package/dist/esm/requirementDiagram-4Y6WPE33-DZBXo7zD.js +0 -1
  233. package/dist/esm/sankeyDiagram-5OEKKPKP-CJp9Tkkm.js +0 -1
  234. package/dist/esm/sequenceDiagram-3UESZ5HK-D76l6Rd4.js +0 -1
  235. package/dist/esm/stateDiagram-AJRCARHV-CesXVS_W.js +0 -1
  236. package/dist/esm/stateDiagram-v2-BHNVJYJU-DqWSoWM6.js +0 -1
  237. package/dist/esm/timeline-definition-PNZ67QCA-CDn8cvlq.js +0 -1
  238. package/dist/esm/types-Bp4jYQko.js +0 -1
  239. package/dist/esm/vennDiagram-CIIHVFJN-DlZtAp7y.js +0 -1
  240. package/dist/esm/wardleyDiagram-YWT4CUSO-DG4_85tj.js +0 -1
  241. package/dist/esm/websocket-BXbChnc8.js +0 -1
  242. package/dist/esm/worksheet-KMCQx4-g.js +0 -1
  243. package/dist/esm/xychartDiagram-2RQKCTM6-BYf7oiMn.js +0 -1
  244. package/dist/module-types/src/components/mockup/index.d.ts +0 -4
  245. package/dist/module-types/src/components/molecules/TabsInline/TabsInline.deprecated.d.ts +0 -2
  246. package/dist/module-types/src/components/molecules/TabsInlineBody/TabsInlineBody.deprecated.d.ts +0 -2
  247. package/dist/module-types/src/components/organisms/PresentationToolButtons/buttons/Pencil.deprecated.d.ts +0 -0
  248. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MdMathEditor.tiptap.deprecated.d.ts +0 -0
  249. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/TiptapEditorContent.d.ts +0 -0
  250. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/BlockImage.d.ts +0 -0
  251. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/ClearMarksOnEnter.d.ts +0 -0
  252. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/CurrentNodeHighlighter.d.ts +0 -0
  253. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/CustomCodeBlockLowlight.d.ts +0 -0
  254. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/CustomLink.d.ts +0 -0
  255. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/SmartHeadingBackspace.d.ts +0 -0
  256. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/SmartPasteMarkdown.d.ts +0 -0
  257. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/index.d.ts +0 -0
  258. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionEditorModal.d.ts +0 -10
  259. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionEditorModal.d.ts +0 -10
  260. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSection.old.d.ts +0 -6
  261. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSectionEditorModal.d.ts +0 -10
  262. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/ListSheetRecursiveSection.d.ts +0 -9
  263. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/ListSheetSection.d.ts +0 -7
  264. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/index.d.ts +0 -1
  265. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionEditorModal.d.ts +0 -10
  266. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditorModal.d.ts +0 -10
  267. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditorModal.old.d.ts +0 -0
  268. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionView.old.d.ts +0 -0
  269. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/UpRemoveDownButtons.d.ts +0 -7
  270. package/dist/module-types/src/components/providers/JukiPageInitializer/useMouseInsidePage.d.ts +0 -1
  271. package/dist/module-types/src/components/templates/MainMenu/DrawerViewMenuMobile/index.d.ts +0 -1
@@ -1 +0,0 @@
1
- import{bS as t}from"./index-Cp9n6f_0.js";import{p as e}from"./purify.es-BkjUCQC6.js";import{B as r,I as i,t as o,x as a,h as s,y as n,z as l,O as h,N as c,r as d,q as u,G as p,F as g,p as f,o as y,g as m,f as C,n as x,m as k,l as b,A as w}from"./string-CQk_HvWX.js";function S(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}function T(t){return"__proto__"===t}function B(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function v(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function _(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const F="[object RegExp]",L="[object String]",M="[object Number]",A="[object Boolean]",$="[object Arguments]",E="[object Symbol]",O="[object Date]",I="[object Map]",q="[object Set]",D="[object Array]",P="[object ArrayBuffer]",z="[object Object]",R="[object DataView]",W="[object Uint8Array]",j="[object Uint8ClampedArray]",N="[object Uint16Array]",H="[object Uint32Array]",Y="[object Int8Array]",U="[object Int16Array]",V="[object Int32Array]",X="[object Float32Array]",G="[object Float64Array]",Z="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}()||Function("return this")();function Q(t){return void 0!==Z.Buffer&&Z.Buffer.isBuffer(t)}function K(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function J(t,e,r,i=new Map,o=void 0){const a=o?.(t,e,r,i);if(void 0!==a)return a;if(B(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let a=0;a<t.length;a++)e[a]=J(t[a],a,r,i,o);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[a,s]of t)e.set(a,J(s,a,r,i,o));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const a of t)e.add(J(a,void 0,r,i,o));return e}if(Q(t))return t.subarray();if(K(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let a=0;a<t.length;a++)e[a]=J(t[a],a,r,i,o);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),tt(e,t,r,i,o),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),tt(e,t,r,i,o),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),tt(e,t,r,i,o),e}if(t instanceof Error){const e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,tt(e,t,r,i,o),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return i.set(t,e),tt(e,t,r,i,o),e}if(t instanceof Number){const e=new Number(t.valueOf());return i.set(t,e),tt(e,t,r,i,o),e}if(t instanceof String){const e=new String(t.valueOf());return i.set(t,e),tt(e,t,r,i,o),e}if("object"==typeof t&&function(t){switch(_(t)){case $:case D:case P:case R:case A:case O:case X:case G:case Y:case U:case V:case I:case M:case z:case F:case q:case L:case E:case W:case j:case N:case H:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),tt(e,t,r,i,o),e}return t}function tt(t,e,r=t,i,o){const a=[...Object.keys(e),...v(e)];for(let s=0;s<a.length;s++){const n=a[s],l=Object.getOwnPropertyDescriptor(t,n);(null==l||l.writable)&&(t[n]=J(e[n],n,r,i,o))}}function et(t,e){return function(t,e){return J(t,void 0,t,new Map,e)}(t,(e,r,i,o)=>{if("object"==typeof t){if(_(t)===z&&"function"!=typeof t.constructor){const e={};return o.set(t,e),tt(e,t,i,o),e}switch(Object.prototype.toString.call(t)){case M:case L:case A:{const e=new t.constructor(t?.valueOf());return tt(e,t),e}case $:{const e={};return tt(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function rt(t){return et(t)}function it(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===_(t)}function ot(t){return"object"==typeof t&&null!==t}function at(t){return ot(t)&&S(t)}function st(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);const s=t.apply(this,i);return r.cache=a.set(o,s)||a,s},i=st.Cache||Map;return r.cache=new i,r}function nt(){}function lt(t){return K(t)}function ht(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];if(null==e)return!1;return!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function ct(t,e,r,i){if(B(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if(B(t))return t;if(Array.isArray(t)||K(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}if("undefined"!=typeof File&&t instanceof File)return new r([t],t.name,{type:t.type,lastModified:t.lastModified});if("object"==typeof t){const r=Object.create(e);return Object.assign(r,t)}return t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const o=[...Object.keys(e),...v(e)];for(let a=0;a<o.length;a++){const s=o[a];if(T(s))continue;let n=e[s],l=t[s];if(it(n)&&(n={...n}),it(l)&&(l={...l}),Q(n)&&(n=rt(n)),Array.isArray(n))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const i=e[r];t[i]=l[i]}l=t}else if(at(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const h=r(l,n,s,t,e,i);void 0!==h?t[s]=h:Array.isArray(n)||ot(l)&&ot(n)&&(ht(l)||ht(n)||lt(l)||lt(n))?t[s]=ct(l,n,r,i):null==l&&ht(n)?t[s]=ct({},n,r,i):null==l&&lt(n)?t[s]=rt(n):void 0!==l&&void 0===n||(t[s]=n)}return t}function dt(t,...e){return function(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let t=0;t<r.length;t++)o=ct(o,r[t],i,new Map);return o}(t,...e,nt)}function ut(t){if(null==t)return!0;if(S(t))return!!("function"==typeof t.splice||"string"==typeof t||Q(t)||lt(t)||it(t))&&0===t.length;if("object"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}function pt(t,e){this._basis=new r(t),this._beta=e}st.Cache=Map,pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,o=t[0],a=e[0],s=t[r]-o,n=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+i*s),this._beta*e[l]+(1-this._beta)*(a+i*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var gt=function t(e){function i(t){return 1===e?new r(t):new pt(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function ft(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function yt(t,e){this._context=t,this._k=(1-e)/6}yt.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:ft(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ft(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var mt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ct(t,e){this._context=t,this._k=(1-e)/6}Ct.prototype={areaStart:i,areaEnd:i,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ft(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new Ct(t,e)}return r.tension=function(e){return t(+e)},r}(0);function kt(t,e){this._context=t,this._k=(1-e)/6}kt.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,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:ft(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bt=function t(e){function r(t){return new kt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var i=t._x1,a=t._y1,s=t._x2,n=t._y2;if(t._l01_a>o){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,a=(a*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>o){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/d,n=(n*c+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(i,a,s,n,t._x2,t._y2)}function St(t,e){this._context=t,this._alpha=e}St.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Tt=function t(e){function r(t){return e?new St(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Bt(t,e){this._context=t,this._alpha=e}Bt.prototype={areaStart:i,areaEnd:i,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return e?new Bt(t,e):new Ct(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function _t(t,e){this._context=t,this._alpha=e}_t.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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:wt(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ft,Lt=function t(e){function r(t){return e?new _t(t,e):new kt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5),Mt=180/Math.PI,At={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $t(t,e,r,i,o,a){var s,n,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),t*i<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:o,translateY:a,rotate:Math.atan2(e,t)*Mt,skewX:Math.atan(l)*Mt,scaleX:s,scaleY:n}}function Et(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(s,n){var l=[],h=[];return s=t(s),n=t(n),function(t,i,o,s,n,l){if(t!==o||i!==s){var h=n.push("translate(",null,e,null,r);l.push({i:h-4,x:a(t,o)},{i:h-2,x:a(i,s)})}else(o||s)&&n.push("translate("+o+e+s+r)}(s.translateX,s.translateY,n.translateX,n.translateY,l,h),function(t,e,r,s){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),s.push({i:r.push(o(r)+"rotate(",null,i)-2,x:a(t,e)})):e&&r.push(o(r)+"rotate("+e+i)}(s.rotate,n.rotate,l,h),function(t,e,r,s){t!==e?s.push({i:r.push(o(r)+"skewX(",null,i)-2,x:a(t,e)}):e&&r.push(o(r)+"skewX("+e+i)}(s.skewX,n.skewX,l,h),function(t,e,r,i,s,n){if(t!==r||e!==i){var l=s.push(o(s)+"scale(",null,",",null,")");n.push({i:l-4,x:a(t,r)},{i:l-2,x:a(e,i)})}else 1===r&&1===i||s.push(o(s)+"scale("+r+","+i+")")}(s.scaleX,s.scaleY,n.scaleX,n.scaleY,l,h),s=n=null,function(t){for(var e,r=-1,i=h.length;++r<i;)l[(e=h[r]).i]=e.x(t);return l.join("")}}}var Ot,It=Et(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?At:$t(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),qt=Et(function(t){return null==t?At:(Ft||(Ft=document.createElementNS("http://www.w3.org/2000/svg","g")),Ft.setAttribute("transform",t),(t=Ft.transform.baseVal.consolidate())?$t((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):At)},", ",")",")"),Dt={exports:{}};var Pt=(Ot||(Ot=1,Dt.exports=function(){var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",a="minute",s="hour",n="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={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(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},C={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,h),a=r-o<0,s=e.clone().add(i+(a?-1:1),h);return+(-(i+(r-o)/(a?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:h,y:d,w:l,d:n,D:u,h:s,m:a,s:o,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},x="en",k={};k[x]=y;var b="$isDayjsObject",w=function(t){return t instanceof v||!(!t||!t[b])},S=function t(e,r,i){var o;if(!e)return x;if("string"==typeof e){var a=e.toLowerCase();k[a]&&(o=a),r&&(k[a]=r,o=a);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var n=e.name;k[n]=e,o=n}return!i&&o&&(x=o),o||!i&&x},T=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new v(r)},B=C;B.l=S,B.i=w,B.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var v=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[b]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(B.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return B},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=T(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return T(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<T(t)},m.$g=function(t,e,r){return B.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,i=!!B.u(e)||e,c=B.p(t),p=function(t,e){var o=B.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return i?o:o.endOf(n)},g=function(t,e){return B.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},f=this.$W,y=this.$M,m=this.$D,C="set"+(this.$u?"UTC":"");switch(c){case d:return i?p(1,0):p(31,11);case h:return i?p(1,y):p(0,y+1);case l:var x=this.$locale().weekStart||0,k=(f<x?f+7:f)-x;return p(i?m-k:m+(6-k),y);case n:case u:return g(C+"Hours",0);case s:return g(C+"Minutes",1);case a:return g(C+"Seconds",2);case o:return g(C+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,l=B.p(t),c="set"+(this.$u?"UTC":""),p=(r={},r[n]=c+"Date",r[u]=c+"Date",r[h]=c+"Month",r[d]=c+"FullYear",r[s]=c+"Hours",r[a]=c+"Minutes",r[o]=c+"Seconds",r[i]=c+"Milliseconds",r)[l],g=l===n?this.$D+(e-this.$W):e;if(l===h||l===d){var f=this.clone().set(u,1);f.$d[p](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else p&&this.$d[p](g);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[B.p(t)]()},m.add=function(i,c){var u,p=this;i=Number(i);var g=B.p(c),f=function(t){var e=T(p);return B.w(e.date(e.date()+Math.round(t*i)),p)};if(g===h)return this.set(h,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===n)return f(1);if(g===l)return f(7);var y=(u={},u[a]=e,u[s]=r,u[o]=t,u)[g]||1,m=this.$d.getTime()+i*y;return B.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=B.z(this),a=this.$H,s=this.$m,n=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,d=function(t,r,o,a){return t&&(t[r]||t(e,i))||o[r].slice(0,a)},u=function(t){return B.s(a%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(f,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return B.s(e.$y,4,"0");case"M":return n+1;case"MM":return B.s(n+1,2,"0");case"MMM":return d(r.monthsShort,n,h,3);case"MMMM":return d(h,n);case"D":return e.$D;case"DD":return B.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return d(r.weekdaysMin,e.$W,l,2);case"ddd":return d(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(a);case"HH":return B.s(a,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return g(a,s,!0);case"A":return g(a,s,!1);case"m":return String(s);case"mm":return B.s(s,2,"0");case"s":return String(e.$s);case"ss":return B.s(e.$s,2,"0");case"SSS":return B.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(i,u,p){var g,f=this,y=B.p(u),m=T(i),C=(m.utcOffset()-this.utcOffset())*e,x=this-m,k=function(){return B.m(f,m)};switch(y){case d:g=k()/12;break;case h:g=k();break;case c:g=k()/3;break;case l:g=(x-C)/6048e5;break;case n:g=(x-C)/864e5;break;case s:g=x/r;break;case a:g=x/e;break;case o:g=x/t;break;default:g=x}return p?g:B.a(g)},m.daysInMonth=function(){return this.endOf(h).$D},m.$locale=function(){return k[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=S(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return B.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),_=v.prototype;return T.prototype=_,[["$ms",i],["$s",o],["$m",a],["$H",s],["$W",n],["$M",h],["$y",d],["$D",u]].forEach(function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),T.extend=function(t,e){return t.$i||(t(e,v,T),t.$i=!0),T},T.locale=S,T.isDayjs=w,T.unix=function(t){return T(1e3*t)},T.en=k[x],T.Ls=k,T.p={},T}()),Dt.exports),zt=t(Pt),Rt=Object.defineProperty,Wt=(t,e)=>Rt(t,"name",{value:e,configurable:!0}),jt=(t,e)=>{for(var r in e)Rt(t,r,{get:e[r],enumerable:!0})},Nt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Ht={trace:Wt((...t)=>{},"trace"),debug:Wt((...t)=>{},"debug"),info:Wt((...t)=>{},"info"),warn:Wt((...t)=>{},"warn"),error:Wt((...t)=>{},"error"),fatal:Wt((...t)=>{},"fatal")},Yt=Wt(function(t="fatal"){let e=Nt.fatal;"string"==typeof t?t.toLowerCase()in Nt&&(e=Nt[t]):"number"==typeof t&&(e=t),Ht.trace=()=>{},Ht.debug=()=>{},Ht.info=()=>{},Ht.warn=()=>{},Ht.error=()=>{},Ht.fatal=()=>{},e<=Nt.fatal&&(Ht.fatal=console.error?console.error.bind(console,Ut("FATAL"),"color: orange"):console.log.bind(console,"",Ut("FATAL"))),e<=Nt.error&&(Ht.error=console.error?console.error.bind(console,Ut("ERROR"),"color: orange"):console.log.bind(console,"",Ut("ERROR"))),e<=Nt.warn&&(Ht.warn=console.warn?console.warn.bind(console,Ut("WARN"),"color: orange"):console.log.bind(console,"",Ut("WARN"))),e<=Nt.info&&(Ht.info=console.info?console.info.bind(console,Ut("INFO"),"color: lightblue"):console.log.bind(console,"",Ut("INFO"))),e<=Nt.debug&&(Ht.debug=console.debug?console.debug.bind(console,Ut("DEBUG"),"color: lightgreen"):console.log.bind(console,"",Ut("DEBUG"))),e<=Nt.trace&&(Ht.trace=console.debug?console.debug.bind(console,Ut("TRACE"),"color: lightgreen"):console.log.bind(console,"",Ut("TRACE")))},"setLogLevel"),Ut=Wt(t=>`%c${zt().format("ss.SSS")} : ${t} : `,"format");const Vt={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return 255*Vt.hue2rgb(a,o,t+1/3);case"g":return 255*Vt.hue2rgb(a,o,t);case"b":return 255*Vt.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if("l"===i)return 100*s;if(o===a)return 0;const n=o-a;if("s"===i)return 100*(s>.5?n/(2-o-a):n/(o+a));switch(o){case t:return 60*((e-r)/n+(e<r?6:0));case e:return 60*((r-t)/n+2);case r:return 60*((t-e)/n+4);default:return-1}}},Xt={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},Gt={channel:Vt,lang:Xt,unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},Zt={};for(let t=0;t<=255;t++)Zt[t]=Gt.unit.dec2hex(t);const Qt=0,Kt=1,Jt=2;class te{constructor(){this.type=Qt}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=Qt}is(t){return this.type===t}}const ee=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new te}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=Qt,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=Gt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=Gt.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=Gt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=Gt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=Gt.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=Gt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Gt.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Gt.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(Jt)||void 0===e?(this._ensureHSL(),Gt.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Gt.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Gt.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(Kt)||void 0===e?(this._ensureRGB(),Gt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(Kt),this.changed=!0,this.data.r=t}set g(t){this.type.set(Kt),this.changed=!0,this.data.g=t}set b(t){this.type.set(Kt),this.changed=!0,this.data.b=t}set h(t){this.type.set(Jt),this.changed=!0,this.data.h=t}set s(t){this.type.set(Jt),this.changed=!0,this.data.s=t}set l(t){this.type.set(Jt),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),re={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(re.re);if(!e)return;const r=e[1],i=parseInt(r,16),o=r.length,a=o%4==0,s=o>4,n=s?1:17,l=s?8:4,h=a?0:-1,c=s?255:15;return ee.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:a?(i&c)*n/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${Zt[Math.round(e)]}${Zt[Math.round(r)]}${Zt[Math.round(i)]}${Zt[Math.round(255*o)]}`:`#${Zt[Math.round(e)]}${Zt[Math.round(r)]}${Zt[Math.round(i)]}`}},ie={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:t=>{const e=t.match(ie.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return Gt.channel.clamp.h(.9*parseFloat(t));case"rad":return Gt.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Gt.channel.clamp.h(360*parseFloat(t))}}return Gt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(ie.re);if(!r)return;const[,i,o,a,s,n]=r;return ee.set({h:ie._hue2deg(i),s:Gt.channel.clamp.s(parseFloat(o)),l:Gt.channel.clamp.l(parseFloat(a)),a:s?Gt.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${Gt.lang.round(e)}, ${Gt.lang.round(r)}%, ${Gt.lang.round(i)}%, ${o})`:`hsl(${Gt.lang.round(e)}, ${Gt.lang.round(r)}%, ${Gt.lang.round(i)}%)`}},oe={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:t=>{t=t.toLowerCase();const e=oe.colors[t];if(e)return re.parse(e)},stringify:t=>{const e=re.stringify(t);for(const t in oe.colors)if(oe.colors[t]===e)return t}},ae={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:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(ae.re);if(!r)return;const[,i,o,a,s,n,l,h,c]=r;return ee.set({r:Gt.channel.clamp.r(o?2.55*parseFloat(i):parseFloat(i)),g:Gt.channel.clamp.g(s?2.55*parseFloat(a):parseFloat(a)),b:Gt.channel.clamp.b(l?2.55*parseFloat(n):parseFloat(n)),a:h?Gt.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${Gt.lang.round(e)}, ${Gt.lang.round(r)}, ${Gt.lang.round(i)}, ${Gt.lang.round(o)})`:`rgb(${Gt.lang.round(e)}, ${Gt.lang.round(r)}, ${Gt.lang.round(i)})`}},se={format:{keyword:oe,hex:re,rgb:ae,rgba:ae,hsl:ie,hsla:ie},parse:t=>{if("string"!=typeof t)return t;const e=re.parse(t)||ae.parse(t)||ie.parse(t)||oe.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Jt)||void 0===t.data.r?ie.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ae.stringify(t):re.stringify(t)},ne=(t,e)=>{const r=se.parse(t);for(const t in e)r[t]=Gt.channel.clamp[t](e[t]);return se.stringify(r)},le=(t,e,r=0,i=1)=>{if("number"!=typeof t)return ne(t,{a:e});const o=ee.set({r:Gt.channel.clamp.r(t),g:Gt.channel.clamp.g(e),b:Gt.channel.clamp.b(r),a:Gt.channel.clamp.a(i)});return se.stringify(o)},he=t=>(t=>{const{r:e,g:r,b:i}=se.parse(t),o=.2126*Gt.channel.toLinear(e)+.7152*Gt.channel.toLinear(r)+.0722*Gt.channel.toLinear(i);return Gt.lang.round(o)})(t)>=.5,ce=t=>!he(t),de=(t,e,r)=>{const i=se.parse(t),o=i[e],a=Gt.channel.clamp[e](o+r);return o!==a&&(i[e]=a),se.stringify(i)},ue=(t,e)=>de(t,"l",e),pe=(t,e)=>de(t,"l",-e),ge=(t,e)=>{const r=se.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return ne(t,i)},fe=(t,e=100)=>{const r=se.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:o,b:a,a:s}=se.parse(t),{r:n,g:l,b:h,a:c}=se.parse(e),d=r/100,u=2*d-1,p=s-c,g=((u*p===-1?u:(u+p)/(1+u*p))+1)/2,f=1-g;return le(i*g+n*f,o*g+l*f,a*g+h*f,s*d+c*(1-d))})(r,t,e)};var ye,me=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ce=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,xe=/\s*%%.*\n/gm,ke=class extends Error{static{Wt(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},be={},we=Wt(function(t,e){t=t.replace(me,"").replace(Ce,"").replace(xe,"\n");for(const[r,{detector:i}]of Object.entries(be)){if(i(t,e))return r}throw new ke(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Se=Wt((...t)=>{for(const{id:e,detector:r,loader:i}of t)Te(e,r,i)},"registerLazyLoadedDiagrams"),Te=Wt((t,e,r)=>{be[t]&&Ht.warn(`Detector with key ${t} already exists. Overwriting.`),be[t]={detector:e,loader:r},Ht.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Be=Wt(t=>be[t].loader,"getDiagramLoader"),ve=Wt((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>ve(t,e,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||void 0!==t[o]&&"object"!=typeof t[o]?(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o]):(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=ve(t[o],e[o],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),_e=ve,Fe="#ffffff",Le="#f2f2f2",Me=Wt((t,e)=>ge(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),Ae=class{static{Wt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ue(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||pe(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||pe(this.mainBkg,10)):(this.rowOdd=this.rowOdd||ue(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||ue(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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??ge(this.primaryColor,{l:-30}),this.venn2=this.venn2??ge(this.secondaryColor,{l:-30}),this.venn3=this.venn3??ge(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??ge(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??ge(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??ge(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??ge(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??ge(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},$e=Wt(t=>{const e=new Ae;return e.calculate(t),e},"getThemeVariables"),Ee=class{static{Wt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ue(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.background),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ue(fe("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=le(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=pe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=pe(this.sectionBkgColor,10),this.taskBorderColor=le(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=le(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||ue(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||pe(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=ue(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=ue(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=ue(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=fe(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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||ge(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});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)]??ue(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ue(this.secondaryColor,20),this.git1=ue(this.pie2||this.secondaryColor,20),this.git2=ue(this.pie3||this.tertiaryColor,20),this.git3=ue(this.pie4||ge(this.primaryColor,{h:-30}),20),this.git4=ue(this.pie5||ge(this.primaryColor,{h:-60}),20),this.git5=ue(this.pie6||ge(this.primaryColor,{h:-90}),10),this.git6=ue(this.pie7||ge(this.primaryColor,{h:60}),10),this.git7=ue(this.pie8||ge(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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||ue("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||ue("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||ue("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||ue("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||ue(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||ue(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ue(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ue(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Oe=Wt(t=>{const e=new Ee;return e.calculate(t),e},"getThemeVariables"),Ie=class{static{Wt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ge(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Me(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=le(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||pe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||pe(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||ge(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||ge(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||fe(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||fe(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.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||ue(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||ue(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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||ge(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||ge(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||ge(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??ge(this.primaryColor,{l:-30}),this.venn2=this.venn2??ge(this.secondaryColor,{l:-30}),this.venn3=this.venn3??ge(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??ge(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??ge(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??ge(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??ge(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??ge(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||pe(fe(this.git0),25),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},qe=Wt(t=>{const e=new Ie;return e.calculate(t),e},"getThemeVariables"),De=class{static{Wt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=ue("#cde498",10),this.primaryBorderColor=Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.primaryColor),this.lineColor=fe(this.background),this.textColor=fe(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=pe(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||pe(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||pe(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||ge(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&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]||ge(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});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||ue(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||ue(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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{l:-30}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-30}),this.pie6=this.pie6||ge(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||ge(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??ge(this.primaryColor,{l:-30}),this.venn2=this.venn2??ge(this.secondaryColor,{l:-30}),this.venn3=this.venn3??ge(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??ge(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??ge(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??ge(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??ge(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??ge(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||fe(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Pe=Wt(t=>{const e=new De;return e.calculate(t),e},"getThemeVariables"),ze=class{static{Wt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ue(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.lineColor=fe(this.background),this.textColor=fe(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||ue(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=ue(this.contrast,55),this.border2=this.contrast,this.actorBorder=ue(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(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]||ge(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{l:-(8+5*t)});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=ue(this.contrast,30),this.sectionBkgColor2=ue(this.contrast,30),this.taskBorderColor=pe(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=ue(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=pe(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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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=pe(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||ge(this.primaryColor,{h:-30}),this.git4=this.pie5||ge(this.primaryColor,{h:-60}),this.git5=this.pie6||ge(this.primaryColor,{h:-90}),this.git6=this.pie7||ge(this.primaryColor,{h:60}),this.git7=this.pie8||ge(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Re=Wt(t=>{const e=new ze;return e.calculate(t),e},"getThemeVariables"),We=class{static{Wt(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Me(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||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=ge(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||ue(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||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||ge(t,{h:30}),this.cScale4=this.cScale4||ge(t,{h:60}),this.cScale5=this.cScale5||ge(t,{h:90}),this.cScale6=this.cScale6||ge(t,{h:120}),this.cScale7=this.cScale7||ge(t,{h:150}),this.cScale8=this.cScale8||ge(t,{h:210,l:150}),this.cScale9=this.cScale9||ge(t,{h:270}),this.cScale10=this.cScale10||ge(t,{h:300}),this.cScale11=this.cScale11||ge(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||ge(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||ge(t,{h:64}),this.fillType3=this.fillType3||ge(e,{h:64}),this.fillType4=this.fillType4||ge(t,{h:-64}),this.fillType5=this.fillType5||ge(e,{h:-64}),this.fillType6=this.fillType6||ge(t,{h:128}),this.fillType7=this.fillType7||ge(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||ge(t,{l:-10}),this.pie5=this.pie5||ge(e,{l:-10}),this.pie6=this.pie6||ge(r,{l:-10}),this.pie7=this.pie7||ge(t,{h:60,l:-10}),this.pie8=this.pie8||ge(t,{h:-60,l:-10}),this.pie9=this.pie9||ge(t,{h:120,l:0}),this.pie10=this.pie10||ge(t,{h:60,l:-20}),this.pie11=this.pie11||ge(t,{h:-60,l:-20}),this.pie12=this.pie12||ge(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||ge(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||ge(t,{h:-30}),this.git4=this.git4||ge(t,{h:-60}),this.git5=this.git5||ge(t,{h:-90}),this.git6=this.git6||ge(t,{h:60}),this.git7=this.git7||ge(t,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},je=Wt(t=>{const e=new We;return e.calculate(t),e},"getThemeVariables"),Ne=class{static{Wt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ue(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.background),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ue(fe("#323D47"),10),this.border1="#ccc",this.border2=le(255,255,255,.25),this.arrowheadColor=fe(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||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ue(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(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=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},He=Wt(t=>{const e=new Ne;return e.calculate(t),e},"getThemeVariables"),Ye=class{static{Wt(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Me("#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||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=ge(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||ue(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||ge(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||ge(t,{h:64}),this.fillType3=this.fillType3||ge(e,{h:64}),this.fillType4=this.fillType4||ge(t,{h:-64}),this.fillType5=this.fillType5||ge(e,{h:-64}),this.fillType6=this.fillType6||ge(t,{h:128}),this.fillType7=this.fillType7||ge(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||ge(t,{l:-10}),this.pie5=this.pie5||ge(e,{l:-10}),this.pie6=this.pie6||ge(r,{l:-10}),this.pie7=this.pie7||ge(t,{h:60,l:-10}),this.pie8=this.pie8||ge(t,{h:-60,l:-10}),this.pie9=this.pie9||ge(t,{h:120,l:0}),this.pie10=this.pie10||ge(t,{h:60,l:-20}),this.pie11=this.pie11||ge(t,{h:-60,l:-20}),this.pie12=this.pie12||ge(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||ge(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||ge(t,{h:-30}),this.git4=this.git4||ge(t,{h:-60}),this.git5=this.git5||ge(t,{h:-90}),this.git6=this.git6||ge(t,{h:60}),this.git7=this.git7||ge(t,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Ue=Wt(t=>{const e=new Ye;return e.calculate(t),e},"getThemeVariables"),Ve=class{static{Wt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ue(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.background),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ue(fe("#323D47"),10),this.border1="#ccc",this.border2=le(255,255,255,.25),this.arrowheadColor=fe(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||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ue(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=pe(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Xe=Wt(t=>{const e=new Ve;return e.calculate(t),e},"getThemeVariables"),Ge=class{static{Wt(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Me(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||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=ge(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||ue(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||ge(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||ge(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||ge(t,{h:64}),this.fillType3=this.fillType3||ge(e,{h:64}),this.fillType4=this.fillType4||ge(t,{h:-64}),this.fillType5=this.fillType5||ge(e,{h:-64}),this.fillType6=this.fillType6||ge(t,{h:128}),this.fillType7=this.fillType7||ge(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||ge(t,{l:-10}),this.pie5=this.pie5||ge(e,{l:-10}),this.pie6=this.pie6||ge(r,{l:-10}),this.pie7=this.pie7||ge(t,{h:60,l:-10}),this.pie8=this.pie8||ge(t,{h:-60,l:-10}),this.pie9=this.pie9||ge(t,{h:120,l:0}),this.pie10=this.pie10||ge(t,{h:60,l:-20}),this.pie11=this.pie11||ge(t,{h:-60,l:-20}),this.pie12=this.pie12||ge(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||ge(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||ge(t,{h:-30}),this.git4=this.git4||ge(t,{h:-60}),this.git5=this.git5||ge(t,{h:-90}),this.git6=this.git6||ge(t,{h:60}),this.git7=this.git7||ge(t,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Ze=Wt(t=>{const e=new Ge;return e.calculate(t),e},"getThemeVariables"),Qe=class{static{Wt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ue(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.background),this.secondaryBorderColor=Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Me(this.tertiaryColor,this.darkMode),this.primaryTextColor=fe(this.primaryColor),this.secondaryTextColor=fe(this.secondaryColor),this.tertiaryTextColor=fe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ue(fe("#323D47"),10),this.border1="#ccc",this.border2=le(255,255,255,.25),this.arrowheadColor=fe(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||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Me(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Me(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Me(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Me(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||fe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||fe(this.tertiaryColor),this.lineColor=this.lineColor||fe(this.background),this.arrowheadColor=this.arrowheadColor||fe(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?pe(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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||fe(this.lineColor),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||ue(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||fe(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||ue(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||pe(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=pe(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||ge(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||ge(this.primaryColor,{h:64}),this.fillType3=this.fillType3||ge(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||ge(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||ge(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||ge(this.primaryColor,{h:128}),this.fillType7=this.fillType7||ge(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||ge(this.primaryColor,{l:-10}),this.pie5=this.pie5||ge(this.secondaryColor,{l:-10}),this.pie6=this.pie6||ge(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||ge(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||ge(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||ge(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||ge(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||ge(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||ge(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||ge(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||ge(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||ge(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||ge(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||ge(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||ge(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ce(this.quadrant1Fill)?ue(this.quadrant1Fill):pe(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?pe(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||ge(this.primaryColor,{h:-30}),this.git4=this.git4||ge(this.primaryColor,{h:-60}),this.git5=this.git5||ge(this.primaryColor,{h:-90}),this.git6=this.git6||ge(this.primaryColor,{h:60}),this.git7=this.git7||ge(this.primaryColor,{h:120}),this.darkMode?(this.git0=ue(this.git0,25),this.git1=ue(this.git1,25),this.git2=ue(this.git2,25),this.git3=ue(this.git3,25),this.git4=ue(this.git4,25),this.git5=ue(this.git5,25),this.git6=ue(this.git6,25),this.git7=ue(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||fe(this.git0),this.gitInv1=this.gitInv1||fe(this.git1),this.gitInv2=this.gitInv2||fe(this.git2),this.gitInv3=this.gitInv3||fe(this.git3),this.gitInv4=this.gitInv4||fe(this.git4),this.gitInv5=this.gitInv5||fe(this.git5),this.gitInv6=this.gitInv6||fe(this.git6),this.gitInv7=this.gitInv7||fe(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||Fe,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Le}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Ke={base:{getThemeVariables:$e},dark:{getThemeVariables:Oe},default:{getThemeVariables:qe},forest:{getThemeVariables:Pe},neutral:{getThemeVariables:Re},neo:{getThemeVariables:je},"neo-dark":{getThemeVariables:He},redux:{getThemeVariables:Ue},"redux-dark":{getThemeVariables:Xe},"redux-color":{getThemeVariables:Ze},"redux-dark-color":{getThemeVariables:Wt(t=>{const e=new Qe;return e.calculate(t),e},"getThemeVariables")}},Je={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,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},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},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},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},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},tr={...Je,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ke.default.getThemeVariables(),sequence:{...Je.sequence,messageFont:Wt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:Wt(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:Wt(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Je.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Je.c4,useWidth:void 0,personFont:Wt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Je.flowchart,inheritDir:!1},external_personFont:Wt(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:Wt(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:Wt(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:Wt(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:Wt(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:Wt(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:Wt(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:Wt(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:Wt(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:Wt(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:Wt(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:Wt(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:Wt(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:Wt(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:Wt(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:Wt(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:Wt(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:Wt(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:Wt(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:Wt(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:Wt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Je.pie,useWidth:984},xyChart:{...Je.xyChart,useWidth:void 0},requirement:{...Je.requirement,useWidth:void 0},packet:{...Je.packet},eventmodeling:{...Je.eventmodeling},treeView:{...Je.treeView,useWidth:void 0},radar:{...Je.radar},ishikawa:{...Je.ishikawa},sankey:{...Je.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:{...Je.venn}},er=Wt((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...er(t[i],"")]:[...r,e+i],[]),"keyify"),rr=new Set(er(tr,"")),ir=tr,or=Wt(t=>{if(Ht.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>or(t));else{for(const e of Object.keys(t)){if(Ht.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!rr.has(e)||null==t[e]){Ht.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){if("nodeColors"===e){const r=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const i of Object.keys(t[e]))"string"==typeof t[e][i]&&r.test(t[e][i])||(Ht.debug("sanitize deleting invalid color:",i,t[e][i]),delete t[e][i])}else Ht.debug("sanitizing object",e),or(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(Ht.debug("sanitizing css option",e),t[e]=ar(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Ht.debug("After sanitization",t)}},"sanitizeDirective"),ar=Wt(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),sr=Object.freeze(ir),nr=Wt(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),lr=_e({},sr),hr=[],cr=_e({},sr),dr=Wt((t,e)=>{let r=_e({},t),i={};for(const t of e)Cr(t),i=_e(i,t);if(r=_e(r,i),i.theme&&i.theme in Ke){const t=_e({},ye),e=_e(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ke&&(r.themeVariables=Ke[r.theme].getThemeVariables(e))}return Tr(cr=r),cr},"updateCurrentConfig"),ur=Wt(t=>(lr=_e({},sr),lr=_e(lr,t),t.theme&&Ke[t.theme]&&(lr.themeVariables=Ke[t.theme].getThemeVariables(t.themeVariables)),dr(lr,hr),lr),"setSiteConfig"),pr=Wt(t=>{ye=_e({},t)},"saveConfigFromInitialize"),gr=Wt(t=>(lr=_e(lr,t),dr(lr,hr),lr),"updateSiteConfig"),fr=Wt(()=>_e({},lr),"getSiteConfig"),yr=Wt(t=>(Tr(t),_e(cr,t),mr()),"setConfig"),mr=Wt(()=>_e({},cr),"getConfig"),Cr=Wt(t=>{t&&(["secure",...lr.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(Ht.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Cr(t[e])}))},"sanitize"),xr=Wt(t=>{or(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),hr.push(t),dr(lr,hr)},"addDirective"),kr=Wt((t=lr)=>{dr(t,hr=[])},"reset"),br={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."},wr={},Sr=Wt(t=>{wr[t]||(Ht.warn(br[t]),wr[t]=!0)},"issueWarning"),Tr=Wt(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Sr("LAZY_LOAD_DEPRECATED")},"checkConfig"),Br=Wt(()=>{let t={};ye&&(t=_e(t,ye));for(const e of hr)t=_e(t,e);return t},"getUserDefinedConfig"),vr=Wt(t=>(null!=t.flowchart?.htmlLabels&&Sr("FLOWCHART_HTML_LABELS_DEPRECATED"),nr(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),_r=/<br\s*\/?>/gi,Fr=Wt(t=>{if(!t)return[""];return Pr(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Lr=(()=>{let t=!1;return()=>{t||(Mr(),t=!0)}})();function Mr(){const t="data-temp-href-target";e.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),e.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}Wt(Mr,"setupDompurifyHooks");var Ar=Wt(t=>{Lr();return e.sanitize(t)},"removeScript"),$r=Wt((t,e)=>{if(vr(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Ar(t):"loose"!==r&&(t=(t=(t=Pr(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Dr(t))}return t},"sanitizeMore"),Er=Wt((t,r)=>t?t=r.dompurifyConfig?e.sanitize($r(t,r),r.dompurifyConfig).toString():e.sanitize($r(t,r),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Or=Wt((t,e)=>"string"==typeof t?Er(t,e):t.flat().map(t=>Er(t,e)),"sanitizeTextOrArray"),Ir=Wt(t=>_r.test(t),"hasBreaks"),qr=Wt(t=>t.split(_r),"splitBreaks"),Dr=Wt(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Pr=Wt(t=>t.replace(_r,"#br#"),"breakToPlaceholder"),zr=Wt(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Rr=Wt(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Wr=Wt(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),jr=Wt(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const o=e[t-1],a=e[t+1];Hr(o,a)&&(i=o+","+a,t++,r.pop())}r.push(Yr(i))}return r.join("")},"parseGenericTypes"),Nr=Wt((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Hr=Wt((t,e)=>{const r=Nr(t,"~"),i=Nr(e,"~");return 1===r&&1===i},"shouldCombineSets"),Yr=Wt(t=>{const e=Nr(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ur=Wt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Vr=/\$\$(.*)\$\$/g,Xr=Wt(t=>(t.match(Vr)?.length??0)>0,"hasKatex"),Gr=Wt(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Qr(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Zr=Wt(async(t,e)=>{if(!Xr(t))return t;if(!(Ur()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Vr,"MathML is unsupported in this environment.");{const{default:r}=await import("./types-Bp4jYQko.js").then(function(t){return t.p}),i=e.forceLegacyMathML||!Ur()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(_r).map(t=>Xr(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Vr,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qr=Wt(async(t,e)=>Er(await Zr(t,e),e),"renderKatexSanitized"),Kr={getRows:Fr,sanitizeText:Er,sanitizeTextOrArray:Or,hasBreaks:Ir,splitBreaks:qr,lineBreakRegex:_r,removeScript:Ar,getUrl:zr,evaluate:nr,getMax:Rr,getMin:Wr},Jr=Wt(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),ti=Wt(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),ei=Wt(function(t,e,r,i){const o=ti(e,r,i);Jr(t,o)},"configureSvgSize"),ri=Wt(function(t,e,r,i){const o=e.node().getBBox(),a=o.width,s=o.height;Ht.info(`SVG bounds: ${a}x${s}`,o);let n=0,l=0;Ht.info(`Graph bounds: ${n}x${l}`,t),n=a+2*r,l=s+2*r,Ht.info(`Calculated bounds: ${n}x${l}`),ei(e,l,n,i);const h=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),ii={};function oi(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}Wt(oi,"cssStyleSheetToString");var ai=Wt((t,e,r,i)=>{let o="";return t in ii&&ii[t]?o=ii[t]({...r,svgId:i}):Ht.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${o}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),si=Wt((t,e)=>{void 0!==e&&(ii[t]=e)},"addStylesForDiagram"),ni=ai,li={};jt(li,{clear:()=>pi,getAccDescription:()=>mi,getAccTitle:()=>fi,getDiagramTitle:()=>xi,setAccDescription:()=>yi,setAccTitle:()=>gi,setDiagramTitle:()=>Ci});var hi="",ci="",di="",ui=Wt(t=>Er(t,mr()),"sanitizeText"),pi=Wt(()=>{hi="",di="",ci=""},"clear"),gi=Wt(t=>{hi=ui(t).replace(/^\s+/g,"")},"setAccTitle"),fi=Wt(()=>hi,"getAccTitle"),yi=Wt(t=>{di=ui(t).replace(/\n\s+/g,"\n")},"setAccDescription"),mi=Wt(()=>di,"getAccDescription"),Ci=Wt(t=>{ci=ui(t)},"setDiagramTitle"),xi=Wt(()=>ci,"getDiagramTitle"),ki=Ht,bi=Yt,wi=mr,Si=yr,Ti=sr,Bi=Wt(t=>Er(t,wi()),"sanitizeText"),vi=ri,_i=Wt(()=>li,"getCommonDb"),Fi={},Li=Wt((t,e,r)=>{Fi[t]&&ki.warn(`Diagram with id ${t} already registered. Overwriting.`),Fi[t]=e,r&&Te(t,r),si(t,e.styles),e.injectUtils?.(ki,bi,wi,Bi,vi,_i(),()=>{})},"registerDiagram"),Mi=Wt(t=>{if(t in Fi)return Fi[t];throw new Ai(t)},"getDiagram"),Ai=class extends Error{static{Wt(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}},$i={value:()=>{}};function Ei(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new Oi(i)}function Oi(t){this._=t}function Ii(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function qi(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=$i,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}Oi.prototype=Ei.prototype={constructor:Oi,on:function(t,e){var r,i,o=this._,a=(i=o,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),s=-1,n=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s<n;)if(r=(t=a[s]).type)o[r]=qi(o[r],t.name,e);else if(null==e)for(r in o)o[r]=qi(o[r],t.name,null);return this}for(;++s<n;)if((r=(t=a[s]).type)&&(r=Ii(o[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Oi(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,o=new Array(r),a=0;a<r;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,r=(i=this._[t]).length;a<r;++a)i[a].value.apply(e,o)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,a=i.length;o<a;++o)i[o].value.apply(e,r)}};var Di="http://www.w3.org/1999/xhtml",Pi={svg:"http://www.w3.org/2000/svg",xhtml:Di,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function zi(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),Pi.hasOwnProperty(e)?{space:Pi[e],local:t}:t}function Ri(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Di&&e.documentElement.namespaceURI===Di?e.createElement(t):e.createElementNS(r,t)}}function Wi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ji(t){var e=zi(t);return(e.local?Wi:Ri)(e)}function Ni(){}function Hi(t){return null==t?Ni:function(){return this.querySelector(t)}}function Yi(){return[]}function Ui(t){return null==t?Yi:function(){return this.querySelectorAll(t)}}function Vi(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function Xi(t){return function(){return this.matches(t)}}function Gi(t){return function(e){return e.matches(t)}}var Zi=Array.prototype.find;function Qi(){return this.firstElementChild}var Ki=Array.prototype.filter;function Ji(){return Array.from(this.children)}function to(t){return new Array(t.length)}function eo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function ro(t,e,r,i,o,a){for(var s,n=0,l=e.length,h=a.length;n<h;++n)(s=e[n])?(s.__data__=a[n],i[n]=s):r[n]=new eo(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function io(t,e,r,i,o,a,s){var n,l,h,c=new Map,d=e.length,u=a.length,p=new Array(d);for(n=0;n<d;++n)(l=e[n])&&(p[n]=h=s.call(l,l.__data__,n,e)+"",c.has(h)?o[n]=l:c.set(h,l));for(n=0;n<u;++n)h=s.call(t,a[n],n,a)+"",(l=c.get(h))?(i[n]=l,l.__data__=a[n],c.delete(h)):r[n]=new eo(t,a[n]);for(n=0;n<d;++n)(l=e[n])&&c.get(p[n])===l&&(o[n]=l)}function oo(t){return t.__data__}function ao(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function so(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function no(t){return function(){this.removeAttribute(t)}}function lo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ho(t,e){return function(){this.setAttribute(t,e)}}function co(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function uo(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function po(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function go(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function fo(t){return function(){this.style.removeProperty(t)}}function yo(t,e,r){return function(){this.style.setProperty(t,e,r)}}function mo(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function Co(t,e){return t.style.getPropertyValue(e)||go(t).getComputedStyle(t,null).getPropertyValue(e)}function xo(t){return function(){delete this[t]}}function ko(t,e){return function(){this[t]=e}}function bo(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function wo(t){return t.trim().split(/^|\s+/)}function So(t){return t.classList||new To(t)}function To(t){this._node=t,this._names=wo(t.getAttribute("class")||"")}function Bo(t,e){for(var r=So(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function vo(t,e){for(var r=So(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function _o(t){return function(){Bo(this,t)}}function Fo(t){return function(){vo(this,t)}}function Lo(t,e){return function(){(e.apply(this,arguments)?Bo:vo)(this,t)}}function Mo(){this.textContent=""}function Ao(t){return function(){this.textContent=t}}function $o(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Eo(){this.innerHTML=""}function Oo(t){return function(){this.innerHTML=t}}function Io(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function qo(){this.nextSibling&&this.parentNode.appendChild(this)}function Do(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Po(){return null}function zo(){var t=this.parentNode;t&&t.removeChild(this)}function Ro(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Wo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jo(t){return function(){var e=this.__on;if(e){for(var r,i=0,o=-1,a=e.length;i<a;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?e.length=o:delete this.__on}}}function No(t,e,r){return function(){var i,o=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var s=0,n=o.length;s<n;++s)if((i=o[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),void(i.value=e);this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},o?o.push(i):this.__on=[i]}}function Ho(t,e,r){var i=go(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,r):(o=i.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Yo(t,e){return function(){return Ho(this,t,e)}}function Uo(t,e){return function(){return Ho(this,t,e.apply(this,arguments))}}eo.prototype={constructor:eo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},To.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Vo=[null];function Xo(t,e){this._groups=t,this._parents=e}function Go(){return new Xo([[document.documentElement]],Vo)}function Zo(t){return"string"==typeof t?new Xo([[document.querySelector(t)]],[document.documentElement]):new Xo([[t]],Vo)}Xo.prototype=Go.prototype={constructor:Xo,select:function(t){"function"!=typeof t&&(t=Hi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s,n=e[o],l=n.length,h=i[o]=new Array(l),c=0;c<l;++c)(a=n[c])&&(s=t.call(a,a.__data__,c,n))&&("__data__"in a&&(s.__data__=a.__data__),h[c]=s);return new Xo(i,this._parents)},selectAll:function(t){t="function"==typeof t?Vi(t):Ui(t);for(var e=this._groups,r=e.length,i=[],o=[],a=0;a<r;++a)for(var s,n=e[a],l=n.length,h=0;h<l;++h)(s=n[h])&&(i.push(t.call(s,s.__data__,h,n)),o.push(s));return new Xo(i,o)},selectChild:function(t){return this.select(null==t?Qi:function(t){return function(){return Zi.call(this.children,t)}}("function"==typeof t?t:Gi(t)))},selectChildren:function(t){return this.selectAll(null==t?Ji:function(t){return function(){return Ki.call(this.children,t)}}("function"==typeof t?t:Gi(t)))},filter:function(t){"function"!=typeof t&&(t=Xi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new Xo(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,oo);var r=e?io:ro,i=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=o.length,s=new Array(a),n=new Array(a),l=new Array(a),h=0;h<a;++h){var c=i[h],d=o[h],u=d.length,p=ao(t.call(c,c&&c.__data__,h,i)),g=p.length,f=n[h]=new Array(g),y=s[h]=new Array(g);r(c,d,f,y,l[h]=new Array(u),p,e);for(var m,C,x=0,k=0;x<g;++x)if(m=f[x]){for(x>=k&&(k=x+1);!(C=y[k])&&++k<g;);m._next=C||null}}return(s=new Xo(s,i))._enter=n,s._exit=l,s},enter:function(){return new Xo(this._enter||this._groups.map(to),this._parents)},exit:function(){return new Xo(this._exit||this._groups.map(to),this._parents)},join:function(t,e,r){var i=this.enter(),o=this,a=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,o=r.length,a=i.length,s=Math.min(o,a),n=new Array(o),l=0;l<s;++l)for(var h,c=r[l],d=i[l],u=c.length,p=n[l]=new Array(u),g=0;g<u;++g)(h=c[g]||d[g])&&(p[g]=h);for(;l<o;++l)n[l]=r[l];return new Xo(n,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,o=t[e],a=o.length-1,s=o[a];--a>=0;)(i=o[a])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=so);for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a){for(var s,n=r[a],l=n.length,h=o[a]=new Array(l),c=0;c<l;++c)(s=n[c])&&(h[c]=s);h.sort(e)}return new Xo(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],o=0,a=i.length;o<a;++o){var s=i[o];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var o,a=e[r],s=0,n=a.length;s<n;++s)(o=a[s])&&t.call(o,o.__data__,s,a);return this},attr:function(t,e){var r=zi(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?lo:no:"function"==typeof e?r.local?po:uo:r.local?co:ho)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?fo:"function"==typeof e?mo:yo)(t,e,null==r?"":r)):Co(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?xo:"function"==typeof e?bo:ko)(t,e)):this.node()[t]},classed:function(t,e){var r=wo(t+"");if(arguments.length<2){for(var i=So(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?Lo:e?_o:Fo)(r,e))},text:function(t){return arguments.length?this.each(null==t?Mo:("function"==typeof t?$o:Ao)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Eo:("function"==typeof t?Io:Oo)(t)):this.node().innerHTML},raise:function(){return this.each(qo)},lower:function(){return this.each(Do)},append:function(t){var e="function"==typeof t?t:ji(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:ji(t),i=null==e?Po:"function"==typeof e?e:Hi(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(zo)},clone:function(t){return this.select(t?Wo:Ro)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,o,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),s=a.length;if(!(arguments.length<2)){for(n=e?No:jo,i=0;i<s;++i)this.each(n(a[i],e,r));return this}var n=this.node().__on;if(n)for(var l,h=0,c=n.length;h<c;++h)for(i=0,l=n[h];i<s;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Uo:Yo)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,o=t[e],a=0,s=o.length;a<s;++a)(i=o[a])&&(yield i)}};var Qo,Ko,Jo=0,ta=0,ea=0,ra=0,ia=0,oa=0,aa="object"==typeof performance&&performance.now?performance:Date,sa="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function na(){return ia||(sa(la),ia=aa.now()+oa)}function la(){ia=0}function ha(){this._call=this._time=this._next=null}function ca(t,e,r){var i=new ha;return i.restart(t,e,r),i}function da(){ia=(ra=aa.now())+oa,Jo=ta=0;try{!function(){na(),++Jo;for(var t,e=Qo;e;)(t=ia-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Jo}()}finally{Jo=0,function(){var t,e,r=Qo,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Qo=e);Ko=t,pa(i)}(),ia=0}}function ua(){var t=aa.now(),e=t-ra;e>1e3&&(oa-=e,ra=t)}function pa(t){Jo||(ta&&(ta=clearTimeout(ta)),t-ia>24?(t<1/0&&(ta=setTimeout(da,t-aa.now()-oa)),ea&&(ea=clearInterval(ea))):(ea||(ra=aa.now(),ea=setInterval(ua,1e3)),Jo=1,sa(da)))}function ga(t,e,r){var i=new ha;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}ha.prototype=ca.prototype={constructor:ha,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?na():+r)+(null==e?0:+e),this._next||Ko===this||(Ko?Ko._next=this:Qo=this,Ko=this),this._call=t,this._time=r,pa()},stop:function(){this._call&&(this._call=null,this._time=1/0,pa())}};var fa=Ei("start","end","cancel","interrupt"),ya=[];function ma(t,e,r,i,o,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var i,o=t.__transition;function a(t){r.state=1,r.timer.restart(s,r.delay,r.time),r.delay<=t&&s(t-r.delay)}function s(a){var h,c,d,u;if(1!==r.state)return l();for(h in o)if((u=o[h]).name===r.name){if(3===u.state)return ga(s);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(ga(function(){3===r.state&&(r.state=4,r.timer.restart(n,r.delay,r.time),n(a))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function n(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(l),r.state=5,1),a=-1,s=i.length;++a<s;)i[a].call(t,o);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){for(var i in r.state=6,r.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=r,r.timer=ca(a,0,r.time)}(t,r,{name:e,index:i,group:o,on:fa,tween:ya,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Ca(t,e){var r=ka(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function xa(t,e){var r=ka(t,e);if(r.state>3)throw new Error("too late; already running");return r}function ka(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ba(t,e){var r,i;return function(){var o=xa(this,t),a=o.tween;if(a!==r)for(var s=0,n=(i=r=a).length;s<n;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}o.tween=i}}function wa(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var a=xa(this,t),s=a.tween;if(s!==i){o=(i=s).slice();for(var n={name:e,value:r},l=0,h=o.length;l<h;++l)if(o[l].name===e){o[l]=n;break}l===h&&o.push(n)}a.tween=o}}function Sa(t,e,r){var i=t._id;return t.each(function(){var t=xa(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return ka(t,i).value[e]}}function Ta(t,e){var r;return("number"==typeof e?a:e instanceof s?n:(r=s(e))?(e=r,n):l)(t,e)}function Ba(t){return function(){this.removeAttribute(t)}}function va(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _a(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttribute(t);return s===a?null:s===i?o:o=e(i=s,r)}}function Fa(t,e,r){var i,o,a=r+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===i?o:o=e(i=s,r)}}function La(t,e,r){var i,o,a;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttribute(t))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l));this.removeAttribute(t)}}function Ma(t,e,r){var i,o,a;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttributeNS(t.space,t.local))===(n=l+"")?null:s===i&&n===o?a:(o=n,a=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function Aa(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,o)),r}return o._value=e,o}function $a(t,e){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o)),r}return o._value=e,o}function Ea(t,e){return function(){Ca(this,t).delay=+e.apply(this,arguments)}}function Oa(t,e){return e=+e,function(){Ca(this,t).delay=e}}function Ia(t,e){return function(){xa(this,t).duration=+e.apply(this,arguments)}}function qa(t,e){return e=+e,function(){xa(this,t).duration=e}}var Da=Go.prototype.constructor;function Pa(t){return function(){this.style.removeProperty(t)}}var za=0;function Ra(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Wa(){return++za}var ja=Go.prototype;Ra.prototype={constructor:Ra,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Hi(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var n,l,h=i[s],c=h.length,d=a[s]=new Array(c),u=0;u<c;++u)(n=h[u])&&(l=t.call(n,n.__data__,u,h))&&("__data__"in n&&(l.__data__=n.__data__),d[u]=l,ma(d[u],e,r,u,d,ka(n,r)));return new Ra(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Ui(t));for(var i=this._groups,o=i.length,a=[],s=[],n=0;n<o;++n)for(var l,h=i[n],c=h.length,d=0;d<c;++d)if(l=h[d]){for(var u,p=t.call(l,l.__data__,d,h),g=ka(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&ma(u,e,r,f,p,g);a.push(p),s.push(l)}return new Ra(a,s,e,r)},selectChild:ja.selectChild,selectChildren:ja.selectChildren,filter:function(t){"function"!=typeof t&&(t=Xi(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var a,s=e[o],n=s.length,l=i[o]=[],h=0;h<n;++h)(a=s[h])&&t.call(a,a.__data__,h,s)&&l.push(a);return new Ra(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,o=r.length,a=Math.min(i,o),s=new Array(i),n=0;n<a;++n)for(var l,h=e[n],c=r[n],d=h.length,u=s[n]=new Array(d),p=0;p<d;++p)(l=h[p]||c[p])&&(u[p]=l);for(;n<i;++n)s[n]=e[n];return new Ra(s,this._parents,this._name,this._id)},selection:function(){return new Da(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=Wa(),i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)if(s=n[h]){var c=ka(s,e);ma(s,t,r,h,n,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ra(i,this._parents,t,r)},call:ja.call,nodes:ja.nodes,node:ja.node,size:ja.size,empty:ja.empty,each:ja.each,on:function(t,e){var r=this._id;return arguments.length<2?ka(this.node(),r).on.on(t):this.each(function(t,e,r){var i,o,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?Ca:xa;return function(){var s=a(this,t),n=s.on;n!==i&&(o=(i=n).copy()).on(e,r),s.on=o}}(r,t,e))},attr:function(t,e){var r=zi(t),i="transform"===r?qt:Ta;return this.attrTween(t,"function"==typeof e?(r.local?Ma:La)(r,i,Sa(this,"attr."+t,e)):null==e?(r.local?va:Ba)(r):(r.local?Fa:_a)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=zi(t);return this.tween(r,(i.local?Aa:$a)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?It:Ta;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var a=Co(this,t),s=(this.style.removeProperty(t),Co(this,t));return a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,i)).on("end.style."+t,Pa(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,a;return function(){var s=Co(this,t),n=r(this),l=n+"";return null==n&&(this.style.removeProperty(t),l=n=Co(this,t)),s===l?null:s===i&&l===o?a:(o=l,a=e(i=s,n))}}(t,i,Sa(this,"style."+t,e))).each(function(t,e){var r,i,o,a,s="style."+e,n="end."+s;return function(){var l=xa(this,t),h=l.on,c=null==l.value[s]?a||(a=Pa(e)):void 0;h===r&&o===c||(i=(r=h).copy()).on(n,o=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,a=r+"";return function(){var s=Co(this,t);return s===a?null:s===i?o:o=e(i=s,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,o;function a(){var a=e.apply(this,arguments);return a!==o&&(i=(o=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Sa(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=ka(this.node(),r).tween,a=0,s=o.length;a<s;++a)if((i=o[a]).name===t)return i.value;return null}return this.each((null==e?ba:wa)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ea:Oa)(e,t)):ka(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ia:qa)(e,t)):ka(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){xa(this,t).ease=e}}(e,t)):ka(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;xa(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,o=r.size();return new Promise(function(a,s){var n={value:s},l={value:function(){0===--o&&a()}};r.each(function(){var r=xa(this,i),o=r.on;o!==t&&((e=(t=o).copy())._.cancel.push(n),e._.interrupt.push(n),e._.end.push(l)),r.on=e}),0===o&&a()})},[Symbol.iterator]:ja[Symbol.iterator]};var Na={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ha(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Ya(t,e,r){this.k=t,this.x=e,this.y=r}Go.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,o,a=t.__transition,s=!0;if(a){for(o in e=null==e?null:e+"",a)(r=a[o]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[o]):s=!1;s&&delete t.__transition}}(this,t)})},Go.prototype.transition=function(t){var e,r;t instanceof Ra?(e=t._id,t=t._name):(e=Wa(),(r=Na).time=na(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var s,n=i[a],l=n.length,h=0;h<l;++h)(s=n[h])&&ma(s,t,e,h,n,r||Ha(s,e));return new Ra(i,this._parents,t,e)},Ya.prototype={constructor:Ya,scale:function(t){return 1===t?this:new Ya(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ya(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Ya.prototype;var Ua=Wt(t=>{const{securityLevel:e}=wi();let r=Zo("body");if("sandbox"===e){const e=Zo(`#i${t}`);r=Zo((e.node()?.contentDocument??document).body)}return r.select(`#${t}`)},"selectSvgElement");function Va(t){return null==t}function Xa(t){return"object"==typeof t&&null!==t}function Ga(t){return Array.isArray(t)?t:Va(t)?[]:[t]}function Za(t,e){var r,i,o,a;if(e)for(r=0,i=(a=Object.keys(e)).length;r<i;r+=1)t[o=a[r]]=e[o];return t}function Qa(t,e){var r,i="";for(r=0;r<e;r+=1)i+=t;return i}function Ka(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}Wt(Va,"isNothing"),Wt(Xa,"isObject"),Wt(Ga,"toArray"),Wt(Za,"extend"),Wt(Qa,"repeat"),Wt(Ka,"isNegativeZero");var Ja={isNothing:Va,isObject:Xa,toArray:Ga,repeat:Qa,isNegativeZero:Ka,extend:Za};function ts(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function es(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ts(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Wt(ts,"formatError"),Wt(es,"YAMLException$1"),es.prototype=Object.create(Error.prototype),es.prototype.constructor=es,es.prototype.toString=Wt(function(t){return this.name+": "+ts(this,t)},"toString");var rs=es;function is(t,e,r,i,o){var a="",s="",n=Math.floor(o/2)-1;return i-e>n&&(e=i-n+(a=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function os(t,e){return Ja.repeat(" ",e-t.length)+t}function as(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,o=[0],a=[],s=-1;r=i.exec(t.buffer);)a.push(r.index),o.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var n,l,h="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+c+3);for(n=1;n<=e.linesBefore&&!(s-n<0);n++)l=is(t.buffer,o[s-n],a[s-n],t.position-(o[s]-o[s-n]),d),h=Ja.repeat(" ",e.indent)+os((t.line-n+1).toString(),c)+" | "+l.str+"\n"+h;for(l=is(t.buffer,o[s],a[s],t.position,d),h+=Ja.repeat(" ",e.indent)+os((t.line+1).toString(),c)+" | "+l.str+"\n",h+=Ja.repeat("-",e.indent+c+3+l.pos)+"^\n",n=1;n<=e.linesAfter&&!(s+n>=a.length);n++)l=is(t.buffer,o[s+n],a[s+n],t.position-(o[s]-o[s+n]),d),h+=Ja.repeat(" ",e.indent)+os((t.line+n+1).toString(),c)+" | "+l.str+"\n";return h.replace(/\n$/,"")}Wt(is,"getLine"),Wt(os,"padStart"),Wt(as,"makeSnippet");var ss=as,ns=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ls=["scalar","sequence","mapping"];function hs(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function cs(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===ns.indexOf(e))throw new rs('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=hs(e.styleAliases||null),-1===ls.indexOf(this.kind))throw new rs('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}Wt(hs,"compileStyleAliases"),Wt(cs,"Type$1");var ds=cs;function us(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function ps(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(Wt(i,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(i);return r}function gs(t){return this.extend(t)}Wt(us,"compileList"),Wt(ps,"compileMap"),Wt(gs,"Schema$1"),gs.prototype.extend=Wt(function(t){var e=[],r=[];if(t instanceof ds)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new rs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach(function(t){if(!(t instanceof ds))throw new rs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new rs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new rs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof ds))throw new rs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(gs.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=us(i,"implicit"),i.compiledExplicit=us(i,"explicit"),i.compiledTypeMap=ps(i.compiledImplicit,i.compiledExplicit),i},"extend");var fs=new gs({explicit:[new ds("tag:yaml.org,2002:str",{kind:"scalar",construct:Wt(function(t){return null!==t?t:""},"construct")}),new ds("tag:yaml.org,2002:seq",{kind:"sequence",construct:Wt(function(t){return null!==t?t:[]},"construct")}),new ds("tag:yaml.org,2002:map",{kind:"mapping",construct:Wt(function(t){return null!==t?t:{}},"construct")})]});function ys(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function ms(){return null}function Cs(t){return null===t}Wt(ys,"resolveYamlNull"),Wt(ms,"constructYamlNull"),Wt(Cs,"isNull");var xs=new ds("tag:yaml.org,2002:null",{kind:"scalar",resolve:ys,construct:ms,predicate:Cs,represent:{canonical:Wt(function(){return"~"},"canonical"),lowercase:Wt(function(){return"null"},"lowercase"),uppercase:Wt(function(){return"NULL"},"uppercase"),camelcase:Wt(function(){return"Null"},"camelcase"),empty:Wt(function(){return""},"empty")},defaultStyle:"lowercase"});function ks(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function bs(t){return"true"===t||"True"===t||"TRUE"===t}function ws(t){return"[object Boolean]"===Object.prototype.toString.call(t)}Wt(ks,"resolveYamlBoolean"),Wt(bs,"constructYamlBoolean"),Wt(ws,"isBoolean");var Ss=new ds("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ks,construct:bs,predicate:ws,represent:{lowercase:Wt(function(t){return t?"true":"false"},"lowercase"),uppercase:Wt(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:Wt(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Ts(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Bs(t){return 48<=t&&t<=55}function vs(t){return 48<=t&&t<=57}function _s(t){if(null===t)return!1;var e,r=t.length,i=0,o=!1;if(!r)return!1;if("-"!==(e=t[i])&&"+"!==e||(e=t[++i]),"0"===e){if(i+1===r)return!0;if("b"===(e=t[++i])){for(i++;i<r;i++)if("_"!==(e=t[i])){if("0"!==e&&"1"!==e)return!1;o=!0}return o&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Ts(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Bs(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!vs(t.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===e)}function Fs(t){var e,r=t,i=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(e=r[0])&&"+"!==e||("-"===e&&(i=-1),e=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===e){if("b"===r[1])return i*parseInt(r.slice(2),2);if("x"===r[1])return i*parseInt(r.slice(2),16);if("o"===r[1])return i*parseInt(r.slice(2),8)}return i*parseInt(r,10)}function Ls(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!Ja.isNegativeZero(t)}Wt(Ts,"isHexCode"),Wt(Bs,"isOctCode"),Wt(vs,"isDecCode"),Wt(_s,"resolveYamlInteger"),Wt(Fs,"constructYamlInteger"),Wt(Ls,"isInteger");var Ms=new ds("tag:yaml.org,2002:int",{kind:"scalar",resolve:_s,construct:Fs,predicate:Ls,represent:{binary:Wt(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:Wt(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:Wt(function(t){return t.toString(10)},"decimal"),hexadecimal:Wt(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),As=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function $s(t){return null!==t&&!(!As.test(t)||"_"===t[t.length-1])}function Es(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}Wt($s,"resolveYamlFloat"),Wt(Es,"constructYamlFloat");var Os=/^[-+]?[0-9]+e/;function Is(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ja.isNegativeZero(t))return"-0.0";return r=t.toString(10),Os.test(r)?r.replace("e",".e"):r}function qs(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||Ja.isNegativeZero(t))}Wt(Is,"representYamlFloat"),Wt(qs,"isFloat");var Ds=new ds("tag:yaml.org,2002:float",{kind:"scalar",resolve:$s,construct:Es,predicate:qs,represent:Is,defaultStyle:"lowercase"}),Ps=fs.extend({implicit:[xs,Ss,Ms,Ds]}),zs=Ps,Rs=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ws=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 js(t){return null!==t&&(null!==Rs.exec(t)||null!==Ws.exec(t))}function Ns(t){var e,r,i,o,a,s,n,l,h=0,c=null;if(null===(e=Rs.exec(t))&&(e=Ws.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],s=+e[5],n=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,o,a,s,n,h)),c&&l.setTime(l.getTime()-c),l}function Hs(t){return t.toISOString()}Wt(js,"resolveYamlTimestamp"),Wt(Ns,"constructYamlTimestamp"),Wt(Hs,"representYamlTimestamp");var Ys=new ds("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:js,construct:Ns,instanceOf:Date,represent:Hs});function Us(t){return"<<"===t||null===t}Wt(Us,"resolveYamlMerge");var Vs=new ds("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Us}),Xs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function Gs(t){if(null===t)return!1;var e,r,i=0,o=t.length,a=Xs;for(r=0;r<o;r++)if(!((e=a.indexOf(t.charAt(r)))>64)){if(e<0)return!1;i+=6}return i%8==0}function Zs(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=Xs,s=0,n=[];for(e=0;e<o;e++)e%4==0&&e&&(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|a.indexOf(i.charAt(e));return 0===(r=o%4*6)?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):18===r?(n.push(s>>10&255),n.push(s>>2&255)):12===r&&n.push(s>>4&255),new Uint8Array(n)}function Qs(t){var e,r,i="",o=0,a=t.length,s=Xs;for(e=0;e<a;e++)e%3==0&&e&&(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]),o=(o<<8)+t[e];return 0===(r=a%3)?(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]):2===r?(i+=s[o>>10&63],i+=s[o>>4&63],i+=s[o<<2&63],i+=s[64]):1===r&&(i+=s[o>>2&63],i+=s[o<<4&63],i+=s[64],i+=s[64]),i}function Ks(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Wt(Gs,"resolveYamlBinary"),Wt(Zs,"constructYamlBinary"),Wt(Qs,"representYamlBinary"),Wt(Ks,"isBinary");var Js=new ds("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Gs,construct:Zs,predicate:Ks,represent:Qs}),tn=Object.prototype.hasOwnProperty,en=Object.prototype.toString;function rn(t){if(null===t)return!0;var e,r,i,o,a,s=[],n=t;for(e=0,r=n.length;e<r;e+=1){if(i=n[e],a=!1,"[object Object]"!==en.call(i))return!1;for(o in i)if(tn.call(i,o)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==s.indexOf(o))return!1;s.push(o)}return!0}function on(t){return null!==t?t:[]}Wt(rn,"resolveYamlOmap"),Wt(on,"constructYamlOmap");var an=new ds("tag:yaml.org,2002:omap",{kind:"sequence",resolve:rn,construct:on}),sn=Object.prototype.toString;function nn(t){if(null===t)return!0;var e,r,i,o,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(i=s[e],"[object Object]"!==sn.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;a[e]=[o[0],i[o[0]]]}return!0}function ln(t){if(null===t)return[];var e,r,i,o,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)i=s[e],o=Object.keys(i),a[e]=[o[0],i[o[0]]];return a}Wt(nn,"resolveYamlPairs"),Wt(ln,"constructYamlPairs");var hn=new ds("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:nn,construct:ln}),cn=Object.prototype.hasOwnProperty;function dn(t){if(null===t)return!0;var e,r=t;for(e in r)if(cn.call(r,e)&&null!==r[e])return!1;return!0}function un(t){return null!==t?t:{}}Wt(dn,"resolveYamlSet"),Wt(un,"constructYamlSet");var pn=new ds("tag:yaml.org,2002:set",{kind:"mapping",resolve:dn,construct:un}),gn=zs.extend({implicit:[Ys,Vs],explicit:[Js,an,hn,pn]}),fn=Object.prototype.hasOwnProperty,yn=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mn=/[\x85\u2028\u2029]/,Cn=/[,\[\]\{\}]/,xn=/^(?:!|!!|![a-z\-]+!)$/i,kn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function bn(t){return Object.prototype.toString.call(t)}function wn(t){return 10===t||13===t}function Sn(t){return 9===t||32===t}function Tn(t){return 9===t||32===t||10===t||13===t}function Bn(t){return 44===t||91===t||93===t||123===t||125===t}function vn(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function _n(t){return 120===t?2:117===t?4:85===t?8:0}function Fn(t){return 48<=t&&t<=57?t-48:-1}function Ln(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Mn(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function An(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}Wt(bn,"_class"),Wt(wn,"is_EOL"),Wt(Sn,"is_WHITE_SPACE"),Wt(Tn,"is_WS_OR_EOL"),Wt(Bn,"is_FLOW_INDICATOR"),Wt(vn,"fromHexCode"),Wt(_n,"escapedHexLen"),Wt(Fn,"fromDecimalCode"),Wt(Ln,"simpleEscapeSequence"),Wt(Mn,"charFromCodepoint"),Wt(An,"setProperty");var $n,En=new Array(256),On=new Array(256);for($n=0;$n<256;$n++)En[$n]=Ln($n)?1:0,On[$n]=Ln($n);function In(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||gn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function qn(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=ss(r),new rs(e,r)}function Dn(t,e){throw qn(t,e)}function Pn(t,e){t.onWarning&&t.onWarning.call(null,qn(t,e))}Wt(In,"State$1"),Wt(qn,"generateError"),Wt(Dn,"throwError"),Wt(Pn,"throwWarning");var zn={YAML:Wt(function(t,e,r){var i,o,a;null!==t.version&&Dn(t,"duplication of %YAML directive"),1!==r.length&&Dn(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Dn(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),1!==o&&Dn(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Pn(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Wt(function(t,e,r){var i,o;2!==r.length&&Dn(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],xn.test(i)||Dn(t,"ill-formed tag handle (first argument) of the TAG directive"),fn.call(t.tagMap,i)&&Dn(t,'there is a previously declared suffix for "'+i+'" tag handle'),kn.test(o)||Dn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(e){Dn(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function Rn(t,e,r,i){var o,a,s,n;if(e<r){if(n=t.input.slice(e,r),i)for(o=0,a=n.length;o<a;o+=1)9===(s=n.charCodeAt(o))||32<=s&&s<=1114111||Dn(t,"expected valid JSON character");else yn.test(n)&&Dn(t,"the stream contains non-printable characters");t.result+=n}}function Wn(t,e,r,i){var o,a,s,n;for(Ja.isObject(r)||Dn(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(o=Object.keys(r)).length;s<n;s+=1)a=o[s],fn.call(e,a)||(An(e,a,r[a]),i[a]=!0)}function jn(t,e,r,i,o,a,s,n,l){var h,c;if(Array.isArray(o))for(h=0,c=(o=Array.prototype.slice.call(o)).length;h<c;h+=1)Array.isArray(o[h])&&Dn(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===bn(o[h])&&(o[h]="[object Object]");if("object"==typeof o&&"[object Object]"===bn(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(h=0,c=a.length;h<c;h+=1)Wn(t,e,a[h],r);else Wn(t,e,a,r);else t.json||fn.call(r,o)||!fn.call(e,o)||(t.line=s||t.line,t.lineStart=n||t.lineStart,t.position=l||t.position,Dn(t,"duplicated mapping key")),An(e,o,a),delete r[o];return e}function Nn(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Dn(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Hn(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);0!==o;){for(;Sn(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!wn(o))break;for(Nn(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&Pn(t,"deficient indentation"),i}function Yn(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!Tn(e)))}function Un(t,e){1===e?t.result+=" ":e>1&&(t.result+=Ja.repeat("\n",e-1))}function Vn(t,e,r){var i,o,a,s,n,l,h,c,d=t.kind,u=t.result;if(Tn(c=t.input.charCodeAt(t.position))||Bn(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Tn(i=t.input.charCodeAt(t.position+1))||r&&Bn(i)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;0!==c;){if(58===c){if(Tn(i=t.input.charCodeAt(t.position+1))||r&&Bn(i))break}else if(35===c){if(Tn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Yn(t)||r&&Bn(c))break;if(wn(c)){if(n=t.line,l=t.lineStart,h=t.lineIndent,Hn(t,!1,-1),t.lineIndent>=e){s=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=n,t.lineStart=l,t.lineIndent=h;break}}s&&(Rn(t,o,a,!1),Un(t,t.line-n),o=a=t.position,s=!1),Sn(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return Rn(t,o,a,!1),!!t.result||(t.kind=d,t.result=u,!1)}function Xn(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Rn(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else wn(r)?(Rn(t,i,o,!0),Un(t,Hn(t,!1,e)),i=o=t.position):t.position===t.lineStart&&Yn(t)?Dn(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Dn(t,"unexpected end of the stream within a single quoted scalar")}function Gn(t,e){var r,i,o,a,s,n;if(34!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));){if(34===n)return Rn(t,r,t.position,!0),t.position++,!0;if(92===n){if(Rn(t,r,t.position,!0),wn(n=t.input.charCodeAt(++t.position)))Hn(t,!1,e);else if(n<256&&En[n])t.result+=On[n],t.position++;else if((s=_n(n))>0){for(o=s,a=0;o>0;o--)(s=vn(n=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:Dn(t,"expected hexadecimal character");t.result+=Mn(a),t.position++}else Dn(t,"unknown escape sequence");r=i=t.position}else wn(n)?(Rn(t,r,i,!0),Un(t,Hn(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Yn(t)?Dn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Dn(t,"unexpected end of the stream within a double quoted scalar")}function Zn(t,e){var r,i,o,a,s,n,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,h=!1,a=[];else{if(123!==p)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(Hn(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;g?44===p&&Dn(t,"expected the node content, but found ','"):Dn(t,"missed comma between flow collection entries"),u=null,n=l=!1,63===p&&Tn(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,Hn(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,il(t,e,1,!1,!0),d=t.tag,c=t.result,Hn(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(n=!0,p=t.input.charCodeAt(++t.position),Hn(t,!0,e),il(t,e,1,!1,!0),u=t.result),h?jn(t,a,m,d,c,u,r,i,o):n?a.push(jn(t,null,m,d,c,u,r,i,o)):a.push(c),Hn(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Dn(t,"unexpected end of the stream within a flow collection")}function Qn(t,e){var r,i,o,a,s=1,n=!1,l=!1,h=e,c=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:Dn(t,"repeat of a chomping mode identifier");else{if(!((o=Fn(a))>=0))break;0===o?Dn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Dn(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if(Sn(a)){do{a=t.input.charCodeAt(++t.position)}while(Sn(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!wn(a)&&0!==a)}for(;0!==a;){for(Nn(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndent<h)&&32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>h&&(h=t.lineIndent),wn(a))c++;else{if(t.lineIndent<h){3===s?t.result+=Ja.repeat("\n",n?1+c:c):1===s&&n&&(t.result+="\n");break}for(i?Sn(a)?(d=!0,t.result+=Ja.repeat("\n",n?1+c:c)):d?(d=!1,t.result+=Ja.repeat("\n",c+1)):0===c?n&&(t.result+=" "):t.result+=Ja.repeat("\n",c):t.result+=Ja.repeat("\n",n?1+c:c),n=!0,l=!0,c=0,r=t.position;!wn(a)&&0!==a;)a=t.input.charCodeAt(++t.position);Rn(t,r,t.position,!1)}}return!0}function Kn(t,e){var r,i,o=t.tag,a=t.anchor,s=[],n=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Dn(t,"tab characters must not be used in indentation")),45===i)&&Tn(t.input.charCodeAt(t.position+1));)if(n=!0,t.position++,Hn(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,il(t,e,3,!1,!0),s.push(t.result),Hn(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)Dn(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!n&&(t.tag=o,t.anchor=a,t.kind="sequence",t.result=s,!0)}function Jn(t,e,r){var i,o,a,s,n,l,h,c=t.tag,d=t.anchor,u={},p=Object.create(null),g=null,f=null,y=null,m=!1,C=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=u),h=t.input.charCodeAt(t.position);0!==h;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,Dn(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==h&&58!==h||!Tn(i)){if(s=t.line,n=t.lineStart,l=t.position,!il(t,r,2,!1,!0))break;if(t.line===a){for(h=t.input.charCodeAt(t.position);Sn(h);)h=t.input.charCodeAt(++t.position);if(58===h)Tn(h=t.input.charCodeAt(++t.position))||Dn(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(jn(t,u,p,g,f,null,s,n,l),g=f=y=null),C=!0,m=!1,o=!1,g=t.tag,f=t.result;else{if(!C)return t.tag=c,t.anchor=d,!0;Dn(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return t.tag=c,t.anchor=d,!0;Dn(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(jn(t,u,p,g,f,null,s,n,l),g=f=y=null),C=!0,m=!0,o=!0):m?(m=!1,o=!0):Dn(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,h=i;if((t.line===a||t.lineIndent>e)&&(m&&(s=t.line,n=t.lineStart,l=t.position),il(t,e,4,!0,o)&&(m?f=t.result:y=t.result),m||(jn(t,u,p,g,f,y,s,n,l),g=f=y=null),Hn(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)Dn(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&jn(t,u,p,g,f,null,s,n,l),C&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),C}function tl(t){var e,r,i,o,a=!1,s=!1;if(33!==(o=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&Dn(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(a=!0,o=t.input.charCodeAt(++t.position)):33===o?(s=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&62!==o);t.position<t.length?(i=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):Dn(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!Tn(o);)33===o&&(s?Dn(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),xn.test(r)||Dn(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Cn.test(i)&&Dn(t,"tag suffix cannot contain flow indicator characters")}i&&!kn.test(i)&&Dn(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){Dn(t,"tag name is malformed: "+i)}return a?t.tag=i:fn.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:Dn(t,'undeclared tag handle "'+r+'"'),!0}function el(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&Dn(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Tn(r)&&!Bn(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Dn(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function rl(t){var e,r,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!Tn(i)&&!Bn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Dn(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),fn.call(t.anchorMap,r)||Dn(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Hn(t,!0,-1),!0}function il(t,e,r,i,o){var a,s,n,l,h,c,d,u,p,g=1,f=!1,y=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=n=4===r||3===r,i&&Hn(t,!0,-1)&&(f=!0,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)),1===g)for(;tl(t)||el(t);)Hn(t,!0,-1)?(f=!0,n=a,t.lineIndent>e?g=1:t.lineIndent===e?g=0:t.lineIndent<e&&(g=-1)):n=!1;if(n&&(n=f||o),1!==g&&4!==r||(u=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===g?n&&(Kn(t,p)||Jn(t,p,u))||Zn(t,u)?y=!0:(s&&Qn(t,u)||Xn(t,u)||Gn(t,u)?y=!0:rl(t)?(y=!0,null===t.tag&&null===t.anchor||Dn(t,"alias node should not have any properties")):Vn(t,u,1===r)&&(y=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===g&&(y=n&&Kn(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Dn(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l<h;l+=1)if((d=t.implicitTypes[l]).resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if("!"!==t.tag){if(fn.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,l=0,h=(c=t.typeMap.multi[t.kind||"fallback"]).length;l<h;l+=1)if(t.tag.slice(0,c[l].tag.length)===c[l].tag){d=c[l];break}d||Dn(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&Dn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Dn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ol(t){var e,r,i,o,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(Hn(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(s=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Tn(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Dn(t,"directive name must not be less than one character in length");0!==o;){for(;Sn(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!wn(o));break}if(wn(o))break;for(e=t.position;0!==o&&!Tn(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&Nn(t),fn.call(zn,r)?zn[r](t,r,i):Pn(t,'unknown document directive "'+r+'"')}Hn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Hn(t,!0,-1)):s&&Dn(t,"directives end mark is expected"),il(t,t.lineIndent-1,4,!1,!0),Hn(t,!0,-1),t.checkLineBreaks&&mn.test(t.input.slice(a,t.position))&&Pn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Yn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Hn(t,!0,-1)):t.position<t.length-1&&Dn(t,"end of the stream or a document separator is expected")}function al(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new In(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,Dn(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ol(r);return r.documents}function sl(t,e){var r=al(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new rs("expected a single document in the stream, but found more")}}Wt(Rn,"captureSegment"),Wt(Wn,"mergeMappings"),Wt(jn,"storeMappingPair"),Wt(Nn,"readLineBreak"),Wt(Hn,"skipSeparationSpace"),Wt(Yn,"testDocumentSeparator"),Wt(Un,"writeFoldedLines"),Wt(Vn,"readPlainScalar"),Wt(Xn,"readSingleQuotedScalar"),Wt(Gn,"readDoubleQuotedScalar"),Wt(Zn,"readFlowCollection"),Wt(Qn,"readBlockScalar"),Wt(Kn,"readBlockSequence"),Wt(Jn,"readBlockMapping"),Wt(tl,"readTagProperty"),Wt(el,"readAnchorProperty"),Wt(rl,"readAlias"),Wt(il,"composeNode"),Wt(ol,"readDocument"),Wt(al,"loadDocuments"),Wt(function(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=al(t,r);if("function"!=typeof e)return i;for(var o=0,a=i.length;o<a;o+=1)e(i[o])},"loadAll$1"),Wt(sl,"load$1");var nl={load:sl},ll=Object.prototype.toString,hl=Object.prototype.hasOwnProperty,cl=65279,dl={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},ul=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],pl=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function gl(t,e){var r,i,o,a,s,n,l;if(null===e)return{};for(r={},o=0,a=(i=Object.keys(e)).length;o<a;o+=1)s=i[o],n=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&hl.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[s]=n;return r}function fl(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else{if(!(t<=4294967295))throw new rs("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+Ja.repeat("0",i-e.length)+e}Wt(gl,"compileStyleMap"),Wt(fl,"encodeHex");function yl(t){this.schema=t.schema||gn,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Ja.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=gl(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ml(t,e){for(var r,i=Ja.repeat(" ",e),o=0,a=-1,s="",n=t.length;o<n;)-1===(a=t.indexOf("\n",o))?(r=t.slice(o),o=n):(r=t.slice(o,a+1),o=a+1),r.length&&"\n"!==r&&(s+=i),s+=r;return s}function Cl(t,e){return"\n"+Ja.repeat(" ",t.indent*e)}function xl(t,e){var r,i;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function kl(t){return 32===t||9===t}function bl(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==cl||65536<=t&&t<=1114111}function wl(t){return bl(t)&&t!==cl&&13!==t&&10!==t}function Sl(t,e,r){var i=wl(t),o=i&&!kl(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||wl(e)&&!kl(e)&&35===t||58===e&&o}function Tl(t){return bl(t)&&t!==cl&&!kl(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function Bl(t){return!kl(t)&&58!==t}function vl(t,e){var r,i=t.charCodeAt(e);return i>=55296&&i<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function _l(t){return/^\n* /.test(t)}Wt(yl,"State"),Wt(ml,"indentString"),Wt(Cl,"generateNextLine"),Wt(xl,"testImplicitResolving"),Wt(kl,"isWhitespace"),Wt(bl,"isPrintable"),Wt(wl,"isNsCharOrWhitespace"),Wt(Sl,"isPlainSafe"),Wt(Tl,"isPlainSafeFirst"),Wt(Bl,"isPlainSafeLast"),Wt(vl,"codePointAt"),Wt(_l,"needIndentIndicator");function Fl(t,e,r,i,o,a,s,n){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Tl(vl(t,0))&&Bl(vl(t,t.length-1));if(e||s)for(l=0;l<t.length;h>=65536?l+=2:l++){if(!bl(h=vl(t,l)))return 5;f=f&&Sl(h,c,n),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(10===(h=vl(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!bl(h))return 5;f=f&&Sl(h,c,n),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&_l(t)?5:s?2===a?5:2:u?4:3:!f||s||o(t)?2===a?5:2:1}function Ll(t,e,r,i,o){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==ul.indexOf(e)||pl.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),n=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return xl(t,e)}switch(Wt(l,"testAmbiguity"),Fl(e,n,t.indent,s,l,t.quotingType,t.forceQuotes&&!i,o)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Ml(e,t.indent)+Al(ml(e,a));case 4:return">"+Ml(e,t.indent)+Al(ml($l(e,s),a));case 5:return'"'+Ol(e)+'"';default:throw new rs("impossible error: invalid scalar style")}}()}function Ml(t,e){var r=_l(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function Al(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function $l(t,e){for(var r,i,o,a=/(\n+)([^\n]*)/g,s=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,El(t.slice(0,r),e)),n="\n"===t[0]||" "===t[0];o=a.exec(t);){var l=o[1],h=o[2];i=" "===h[0],s+=l+(n||i||""===h?"":"\n")+El(h,e),n=i}return s}function El(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,a=0,s=0,n=0,l="";r=o.exec(t);)(n=r.index)-a>e&&(i=s>a?s:n,l+="\n"+t.slice(a,i),a=i+1),s=n;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function Ol(t){for(var e,r="",i=0,o=0;o<t.length;i>=65536?o+=2:o++)i=vl(t,o),!(e=dl[i])&&bl(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||fl(i);return r}function Il(t,e,r){var i,o,a,s="",n=t.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],t.replacer&&(a=t.replacer.call(r,String(i),a)),(Rl(t,e,a,!1,!1)||void 0===a&&Rl(t,e,null,!1,!1))&&(""!==s&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=n,t.dump="["+s+"]"}function ql(t,e,r,i){var o,a,s,n="",l=t.tag;for(o=0,a=r.length;o<a;o+=1)s=r[o],t.replacer&&(s=t.replacer.call(r,String(o),s)),(Rl(t,e+1,s,!0,!0,!1,!0)||void 0===s&&Rl(t,e+1,null,!0,!0,!1,!0))&&(i&&""===n||(n+=Cl(t,e)),t.dump&&10===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=l,t.dump=n||"[]"}function Dl(t,e,r){var i,o,a,s,n,l="",h=t.tag,c=Object.keys(r);for(i=0,o=c.length;i<o;i+=1)n="",""!==l&&(n+=", "),t.condenseFlow&&(n+='"'),s=r[a=c[i]],t.replacer&&(s=t.replacer.call(r,a,s)),Rl(t,e,a,!1,!1)&&(t.dump.length>1024&&(n+="? "),n+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Rl(t,e,s,!1,!1)&&(l+=n+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Pl(t,e,r,i){var o,a,s,n,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new rs("sortKeys must be a boolean or a function");for(o=0,a=u.length;o<a;o+=1)h="",i&&""===c||(h+=Cl(t,e)),n=r[s=u[o]],t.replacer&&(n=t.replacer.call(r,s,n)),Rl(t,e+1,s,!0,!0,!0)&&((l=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Cl(t,e)),Rl(t,e+1,n,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function zl(t,e,r){var i,o,a,s,n,l;for(a=0,s=(o=r?t.explicitTypes:t.implicitTypes).length;a<s;a+=1)if(((n=o[a]).instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof e&&e instanceof n.instanceOf)&&(!n.predicate||n.predicate(e))){if(r?n.multi&&n.representName?t.tag=n.representName(e):t.tag=n.tag:t.tag="?",n.represent){if(l=t.styleMap[n.tag]||n.defaultStyle,"[object Function]"===ll.call(n.represent))i=n.represent(e,l);else{if(!hl.call(n.represent,l))throw new rs("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');i=n.represent[l](e,l)}t.dump=i}return!0}return!1}function Rl(t,e,r,i,o,a,s){t.tag=null,t.dump=r,zl(t,r,!1)||zl(t,r,!0);var n,l=ll.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Pl(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Dl(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?ql(t,e-1,t.dump,o):ql(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Il(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new rs("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Ll(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(n=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),n="!"===t.tag[0]?"!"+n:"tag:yaml.org,2002:"===n.slice(0,18)?"!!"+n.slice(18):"!<"+n+">",t.dump=n+" "+t.dump)}return!0}function Wl(t,e){var r,i,o=[],a=[];for(jl(t,o,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(o[a[r]]);e.usedDuplicates=new Array(i)}function jl(t,e,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=e.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(e.push(t),Array.isArray(t))for(o=0,a=t.length;o<a;o+=1)jl(t[o],e,r);else for(o=0,a=(i=Object.keys(t)).length;o<a;o+=1)jl(t[i[o]],e,r)}Wt(Fl,"chooseScalarStyle"),Wt(Ll,"writeScalar"),Wt(Ml,"blockHeader"),Wt(Al,"dropEndingNewline"),Wt($l,"foldString"),Wt(El,"foldLine"),Wt(Ol,"escapeString"),Wt(Il,"writeFlowSequence"),Wt(ql,"writeBlockSequence"),Wt(Dl,"writeFlowMapping"),Wt(Pl,"writeBlockMapping"),Wt(zl,"detectType"),Wt(Rl,"writeNode"),Wt(Wl,"getDuplicateReferences"),Wt(jl,"inspectNode"),Wt(function(t,e){var r=new yl(e=e||{});r.noRefs||Wl(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Rl(r,0,i,!0,!0)?r.dump+"\n":""},"dump$1"),Wt(function(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}},"renamed");var Nl=Ps,Hl=nl.load,Yl=Wt((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),Ul={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},Vl={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Xl(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Ql(t),e=Ql(e);const[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,n=a-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}Wt(Xl,"calculateDeltaAndAngle");var Gl,Zl,Ql=Wt(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),Kl=Wt(t=>({x:Wt(function(e,r,i){let o=0;const a=Ql(i[0]).x<Ql(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(Ul,t.arrowTypeStart)){const{angle:e,deltaX:r}=Xl(i[0],i[1]);o=Ul[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ul,t.arrowTypeEnd)){const{angle:e,deltaX:r}=Xl(i[i.length-1],i[i.length-2]);o=Ul[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const s=Math.abs(Ql(e).x-Ql(i[i.length-1]).x),n=Math.abs(Ql(e).y-Ql(i[i.length-1]).y),l=Math.abs(Ql(e).x-Ql(i[0]).x),h=Math.abs(Ql(e).y-Ql(i[0]).y),c=Ul[t.arrowTypeStart],d=Ul[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="right"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===a?-1:1,o+=t}return Ql(e).x+o},"x"),y:Wt(function(e,r,i){let o=0;const a=Ql(i[0]).y<Ql(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(Ul,t.arrowTypeStart)){const{angle:e,deltaY:r}=Xl(i[0],i[1]);o=Ul[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ul,t.arrowTypeEnd)){const{angle:e,deltaY:r}=Xl(i[i.length-1],i[i.length-2]);o=Ul[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const s=Math.abs(Ql(e).y-Ql(i[i.length-1]).y),n=Math.abs(Ql(e).x-Ql(i[i.length-1]).x),l=Math.abs(Ql(e).y-Ql(i[0]).y),h=Math.abs(Ql(e).x-Ql(i[0]).x),c=Ul[t.arrowTypeStart],d=Ul[t.arrowTypeEnd];if(s<d&&s>0&&n<d){let t=d+1-s;t*="up"===a?-1:1,o-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===a?-1:1,o+=t}return Ql(e).y+o},"y")}),"getLineFunctionsWithOffset"),Jl={},th={};var eh=function(){if(Zl)return Jl;Zl=1,Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.sanitizeUrl=function(i){if(!i)return t.BLANK_URL;var o,a=r(i.trim());do{o=(a=r(a=e(a).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim())).match(t.ctrlCharactersRegex)||a.match(t.htmlEntitiesRegex)||a.match(t.htmlCtrlEntityRegex)||a.match(t.whitespaceEscapeCharsRegex)}while(o&&o.length>0);var s=a;if(!s)return t.BLANK_URL;if(function(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}(s))return s;var n=s.trimStart(),l=n.match(t.urlSchemeRegex);if(!l)return s;var h=l[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(h))return t.BLANK_URL;var c=n.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return t.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var t=(Gl||(Gl=1,Object.defineProperty(th,"__esModule",{value:!0}),th.BLANK_URL=th.relativeFirstCharacters=th.whitespaceEscapeCharsRegex=th.urlSchemeRegex=th.ctrlCharactersRegex=th.htmlCtrlEntityRegex=th.htmlEntitiesRegex=th.invalidProtocolRegex=void 0,th.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,th.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,th.htmlCtrlEntityRegex=/&(newline|tab);/gi,th.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,th.urlSchemeRegex=/^.+(:|&colon;)/gim,th.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,th.relativeFirstCharacters=[".","/"],th.BLANK_URL="about:blank"),th);function e(e){return e.replace(t.ctrlCharactersRegex,"").replace(t.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function r(t){try{return decodeURIComponent(t)}catch(e){return t}}return Jl}(),rh="​",ih={curveBasis:b,curveBasisClosed:k,curveBasisOpen:x,curveBumpX:C,curveBumpY:m,curveBundle:gt,curveCardinalClosed:xt,curveCardinalOpen:bt,curveCardinal:mt,curveCatmullRomClosed:vt,curveCatmullRomOpen:Lt,curveCatmullRom:Tt,curveLinear:y,curveLinearClosed:f,curveMonotoneX:g,curveMonotoneY:p,curveNatural:u,curveStep:d,curveStepAfter:c,curveStepBefore:h},oh=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ah=Wt(function(t,e){const r=sh(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const t=r.map(t=>t.args);or(t),i=_e(i,[...t])}else i=r.args;if(!i)return;let o=we(t,e);const a="config";return void 0!==i[a]&&("flowchart-v2"===o&&(o="flowchart"),i[o]=i[a],delete i[a]),i},"detectInit"),sh=Wt(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${oh.source})(?=[}][%]{2}).*\n`,"ig");let i;t=t.trim().replace(r,"").replace(/'/gm,'"'),Ht.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(i=Ce.exec(t));)if(i.index===Ce.lastIndex&&Ce.lastIndex++,i&&!e||e&&i[1]?.match(e)||e&&i[2]?.match(e)){const t=i[1]?i[1]:i[2],e=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return Ht.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),nh=Wt(function(t){return t.replace(Ce,"")},"removeDirectives"),lh=Wt(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function hh(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return ih[r]??e}function ch(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?eh.sanitizeUrl(r):r}Wt(hh,"interpolateToCurve"),Wt(ch,"formatUrl");var dh=Wt((t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let e=0;e<i;e++)if(a=a[r[e]],!a)return void Ht.error(`Function name: ${t} not found in window`);a[o](...e)},"runFunc");function uh(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function ph(t){let e,r=0;t.forEach(t=>{r+=uh(t,e),e=t});return yh(t,r/2)}function gh(t){return 1===t.length?t[0]:ph(t)}Wt(uh,"distance"),Wt(ph,"traverseEdge"),Wt(gh,"calcLabelPosition");var fh=Wt((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),yh=Wt((t,e)=>{let r,i=e;for(const e of t){if(r){const t=uh(e,r);if(0===t)return r;if(t<i)i-=t;else{const o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:fh((1-o)*r.x+o*e.x,5),y:fh((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),mh=Wt((t,e,r)=>{Ht.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=yh(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+i.x)/2,s.y=-Math.cos(a)*o+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function Ch(t,e,r){const i=structuredClone(r);Ht.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const o=yh(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-o.y,i[0].x-o.x),n={x:0,y:0};return"start_left"===e?(n.x=Math.sin(s+Math.PI)*a+(i[0].x+o.x)/2,n.y=-Math.cos(s+Math.PI)*a+(i[0].y+o.y)/2):"end_right"===e?(n.x=Math.sin(s-Math.PI)*a+(i[0].x+o.x)/2-5,n.y=-Math.cos(s-Math.PI)*a+(i[0].y+o.y)/2-5):"end_left"===e?(n.x=Math.sin(s)*a+(i[0].x+o.x)/2-5,n.y=-Math.cos(s)*a+(i[0].y+o.y)/2-5):(n.x=Math.sin(s)*a+(i[0].x+o.x)/2,n.y=-Math.cos(s)*a+(i[0].y+o.y)/2),n}function xh(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}Wt(Ch,"calcTerminalLabelPosition"),Wt(xh,"getStylesFromArray");var kh=0,bh=Wt(()=>(kh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kh),"generateId");function wh(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}Wt(wh,"makeRandomHex");var Sh=Wt(t=>wh(t.length),"random"),Th=Wt(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"),Bh=Wt(function(t,e){const r=e.text.replace(Kr.lineBreakRegex," "),[,i]=qh(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",i),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o},"drawSimpleText"),vh=st((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Kr.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),o=[];let a="";return i.forEach((t,s)=>{const n=Lh(`${t} `,r),l=Lh(a,r);if(n>e){const{hyphenatedStrings:i,remainingWord:s}=_h(t,e,"-",r);o.push(a,...i),a=s}else l+n>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");s+1===i.length&&o.push(a)}),o.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),_h=st((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let s="";return o.forEach((t,n)=>{const l=`${s}${t}`;if(Lh(l,i)>=e){const t=n+1,e=o.length===t,i=`${l}${r}`;a.push(e?l:i),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Fh(t,e){return Ah(t,e).height}function Lh(t,e){return Ah(t,e).width}Wt(Fh,"calculateTextHeight"),Wt(Lh,"calculateTextWidth");var Mh,Ah=st((t,e)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=qh(r),s=["sans-serif",i],n=t.split(Kr.lineBreakRegex),l=[],h=Zo("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const t of s){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of n){const s=Th();s.text=i||"​";const n=Bh(c,s).style("font-size",a).style("font-weight",o).style("font-family",t),l=(n._groups||n)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}l.push(r)}c.remove();return l[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]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),$h=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{Wt(this,"InitIDGenerator")}},Eh=Wt(function(t){return Mh=Mh||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Mh.innerHTML=t,unescape(Mh.textContent)},"entityDecode");function Oh(t){return"str"in t}Wt(Oh,"isDetailedError");var Ih=Wt((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),qh=Wt(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Dh(t,e){return dt({},t,e)}Wt(Dh,"cleanAndMerge");var Ph={assignWithDepth:_e,wrapLabel:vh,calculateTextHeight:Fh,calculateTextWidth:Lh,calculateTextDimensions:Ah,cleanAndMerge:Dh,detectInit:ah,detectDirective:sh,isSubstringInArray:lh,interpolateToCurve:hh,calcLabelPosition:gh,calcCardinalityPosition:mh,calcTerminalLabelPosition:Ch,formatUrl:ch,getStylesFromArray:xh,generateId:bh,random:Sh,runFunc:dh,entityDecode:Eh,insertTitle:Ih,isLabelCoordinateInPath:Nh,parseFontSize:qh,InitIDGenerator:$h},zh=Wt(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),Rh=Wt(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Wh=Wt((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function jh(t){return t??null}function Nh(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}Wt(jh,"handleUndefinedAttr"),Wt(Nh,"isLabelCoordinateInPath");var Hh=Wt(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function Yh(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const i=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",i){const e=wi().fontSize?wi().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=ir.fontSize]=qh(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}Wt(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}Wt(Yh,"configureLabelImages");var Uh=Wt(t=>{const{handDrawnSeed:e}=wi();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Vh=Wt(t=>{const e=Xh([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),Xh=Wt(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),Gh=Wt(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),Zh=Wt(t=>{const{stylesArray:e}=Vh(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{const e=t[0];Gh(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),Qh=Wt((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=wi(),{nodeBorder:o,mainBkg:a}=r,{stylesMap:s}=Vh(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||o,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:Kh(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),Kh=Wt(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");const Jh=Object.freeze({left:0,top:0,width:16,height:16}),tc=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ec=Object.freeze({...Jh,...tc}),rc=Object.freeze({...ec,body:"",hidden:!1}),ic=Object.freeze({width:null,height:null}),oc=Object.freeze({...ic,...tc}),ac=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function sc(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in rc)i in tc?i in t&&!(i in r)&&(r[i]=tc[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function nc(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let a={};function s(t){a=sc(i[t]||o[t],a)}return s(e),r.forEach(s),sc(t,a)}function lc(t,e){if(t.icons[e])return nc(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(o[e]=[r].concat(a))}return o[e]}),o}(t,[e])[e];return r?nc(t,e,r):null}const hc=/(-?[0-9.]*[0-9]+[0-9.]*)/g,cc=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function dc(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(hc);if(null===i||!i.length)return t;const o=[];let a=i.shift(),s=cc.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(a=i.shift(),void 0===a)return o.join("");s=!s}}const uc=/\sid="(\S+)"/g,pc=new Map;function gc(t){const e=[];let r;for(;r=uc.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=pc.get(t)||0;return pc.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}function fc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var yc={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function mc(t){yc=t}var Cc={exec:()=>null};function xc(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(bc.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var kc=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),bc={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+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},wc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sc=/(?:[*+-]|\d{1,9}[.)])/,Tc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Bc=xc(Tc).replace(/bull/g,Sc).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(),vc=xc(Tc).replace(/bull/g,Sc).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(),_c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Fc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Lc=xc(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Fc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mc=xc(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sc).getRegex(),Ac="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",$c=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ec=xc("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",$c).replace("tag",Ac).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Oc=xc(_c).replace("hr",wc).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",Ac).getRegex(),Ic={blockquote:xc(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Oc).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Lc,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:wc,html:Ec,lheading:Bc,list:Mc,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Oc,table:Cc,text:/^[^\n]+/},qc=xc("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",Ac).getRegex(),Dc={...Ic,lheading:vc,table:qc,paragraph:xc(_c).replace("hr",wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",qc).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",Ac).getRegex()},Pc={...Ic,html:xc("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$c).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:Cc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xc(_c).replace("hr",wc).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Bc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zc=/^( {2,}|\\)\n(?!\s*$)/,Rc=/[\p{P}\p{S}]/u,Wc=/[\s\p{P}\p{S}]/u,jc=/[^\s\p{P}\p{S}]/u,Nc=xc(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wc).getRegex(),Hc=/(?!~)[\p{P}\p{S}]/u,Yc=xc(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",kc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Uc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Vc=xc(Uc,"u").replace(/punct/g,Rc).getRegex(),Xc=xc(Uc,"u").replace(/punct/g,Hc).getRegex(),Gc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zc=xc(Gc,"gu").replace(/notPunctSpace/g,jc).replace(/punctSpace/g,Wc).replace(/punct/g,Rc).getRegex(),Qc=xc(Gc,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Hc).getRegex(),Kc=xc("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,jc).replace(/punctSpace/g,Wc).replace(/punct/g,Rc).getRegex(),Jc=xc(/\\(punct)/,"gu").replace(/punct/g,Rc).getRegex(),td=xc(/^<(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(),ed=xc($c).replace("(?:--\x3e|$)","--\x3e").getRegex(),rd=xc("^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",ed).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),id=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,od=xc(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",id).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ad=xc(/^!?\[(label)\]\[(ref)\]/).replace("label",id).replace("ref",Fc).getRegex(),sd=xc(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fc).getRegex(),nd=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ld={_backpedal:Cc,anyPunctuation:Jc,autolink:td,blockSkip:Yc,br:zc,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:Cc,emStrongLDelim:Vc,emStrongRDelimAst:Zc,emStrongRDelimUnd:Kc,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:od,nolink:sd,punctuation:Nc,reflink:ad,reflinkSearch:xc("reflink|nolink(?!\\()","g").replace("reflink",ad).replace("nolink",sd).getRegex(),tag:rd,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:Cc},hd={...ld,link:xc(/^!?\[(label)\]\((.*?)\)/).replace("label",id).getRegex(),reflink:xc(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",id).getRegex()},cd={...ld,emStrongRDelimAst:Qc,emStrongLDelim:Xc,url:xc(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",nd).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:xc(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",nd).getRegex()},dd={...cd,br:xc(zc).replace("{2,}","*").getRegex(),text:xc(cd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ud={normal:Ic,gfm:Dc,pedantic:Pc},pd={normal:ld,gfm:cd,breaks:dd,pedantic:hd},gd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fd=t=>gd[t];function yd(t,e){if(e){if(bc.escapeTest.test(t))return t.replace(bc.escapeReplace,fd)}else if(bc.escapeTestNoEncode.test(t))return t.replace(bc.escapeReplaceNoEncode,fd);return t}function md(t){try{t=encodeURI(t).replace(bc.percentDecode,"%")}catch{return null}return t}function Cd(t,e){let r=t.replace(bc.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}),i=r.split(bc.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(bc.slashPipe,"|");return i}function xd(t,e,r){let i=t.length;if(0===i)return"";let o=0;for(;o<i;){if(t.charAt(i-o-1)!==e)break;o++}return t.slice(0,i-o)}function kd(t,e,r,i,o){let a=e.href,s=e.title||null,n=t[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:s,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}var bd=class{options;rules;lexer;constructor(t){this.options=t||yc}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:xd(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=xd(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:xd(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=xd(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,a=!1,s=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))s.push(t[e]),a=!0;else{if(a)break;s.push(t[e])}t=t.slice(e);let n=s.join("\n"),l=n.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${n}`:n,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=h,0===t.length)break;let c=o.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),s=this.blockquote(a);o[o.length-1]=s,r=r.substring(0,r.length-e.raw.length)+s.raw,i=i.substring(0,i.length-e.text.length)+s.text;break}if("list"===c?.type){let e=c,a=e.raw+"\n"+t.join("\n"),s=this.list(a);o[o.length-1]=s,r=r.substring(0,r.length-c.raw.length)+s.raw,i=i.substring(0,i.length-e.raw.length)+s.raw,t=a.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,i="",n="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,n=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,n=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),s=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||a.test(h)||s.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())n+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||a.test(l)||r.test(l))break;n+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(n),p&&(u="[ ] "!==p[0],n=n.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:n,tokens:[]}),o.raw+=i}let n=o.items.at(-1);if(!n)return;n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t<o.items.length;t++)if(this.lexer.state.top=!1,o.items[t].tokens=this.lexer.blockTokens(o.items[t].text,[]),!o.loose){let e=o.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t<o.items.length;t++)o.items[t].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Cd(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?a.align.push("right"):this.rules.other.tableAlignCenter.test(t)?a.align.push("center"):this.rules.other.tableAlignLeft.test(t)?a.align.push("left"):a.align.push(null);for(let t=0;t<r.length;t++)a.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:a.align[t]});for(let t of o)a.rows.push(Cd(t,a.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=xd(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),kd(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return kd(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,a=[...i[0]].length-1,s=a,n=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){s+=o;continue}if((i[5]||i[6])&&a%3&&!((a+o)%3)){n+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+n);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+o);if(Math.min(a,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},wd=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||yc,this.options.tokenizer=this.options.tokenizer||new bd,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 e={other:bc,block:ud.normal,inline:pd.normal};this.options.pedantic?(e.block=ud.pedantic,e.inline=pd.pedantic):this.options.gfm&&(e.block=ud.gfm,this.options.breaks?e.inline=pd.breaks:e.inline=pd.gfm),this.tokenizer.rules=e}static get rules(){return{block:ud,inline:pd}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(bc.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(bc.tabCharGlobal," ").replace(bc.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;t;){let r;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,s)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Sd=class{options;parser;constructor(t){this.options=t||yc}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(bc.notSpaceStart)?.[0],o=t.replace(bc.endingNewline,"")+"\n";return i?'<pre><code class="language-'+yd(i)+'">'+(r?o:yd(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:yd(o,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+yd(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}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>${yd(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=md(t);if(null===o)return i;let a='<a href="'+(t=o)+'"';return e&&(a+=' title="'+yd(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=md(t);if(null===o)return yd(r);let a=`<img src="${t=o}" alt="${r}"`;return e&&(a+=` title="${yd(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:yd(t.text)}},Td=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""}},Bd=class t{options;renderer;textRenderer;constructor(t){this.options=t||yc,this.options.renderer=this.options.renderer||new Sd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Td}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=o,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let a=o;switch(a.type){case"space":r+=this.renderer.space(a);continue;case"hr":r+=this.renderer.hr(a);continue;case"heading":r+=this.renderer.heading(a);continue;case"code":r+=this.renderer.code(a);continue;case"table":r+=this.renderer.table(a);continue;case"blockquote":r+=this.renderer.blockquote(a);continue;case"list":r+=this.renderer.list(a);continue;case"html":r+=this.renderer.html(a);continue;case"def":r+=this.renderer.def(a);continue;case"paragraph":r+=this.renderer.paragraph(a);continue;case"text":{let o=a,s=this.renderer.text(o);for(;i+1<t.length&&"text"===t[i+1].type;)o=t[++i],s+="\n"+this.renderer.text(o);r+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let t=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=t||"";continue}}let a=o;switch(a.type){case"escape":case"text":r+=e.text(a);break;case"html":r+=e.html(a);break;case"link":r+=e.link(a);break;case"image":r+=e.image(a);break;case"strong":r+=e.strong(a);break;case"em":r+=e.em(a);break;case"codespan":r+=e.codespan(a);break;case"br":r+=e.br(a);break;case"del":r+=e.del(a);break;default:{let t='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},vd=class{options;block;constructor(t){this.options=t||yc}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?wd.lex:wd.lexInline}provideParser(){return this.block?Bd.parse:Bd.parseInline}},_d=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Bd;Renderer=Sd;TextRenderer=Td;Lexer=wd;Tokenizer=bd;Hooks=vd;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Sd(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new bd(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new vd;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],a=e[i];vd.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&vd.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return a.call(e,r)})();let i=o.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return wd.lex(t,e??this.defaults)}parser(t,e){return Bd.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)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 e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?wd.lex:wd.lexInline)(r,o),a=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(a,o.walkTokens));let s=await(o.hooks?await o.hooks.provideParser():t?Bd.parse:Bd.parseInline)(a,o);return o.hooks?await o.hooks.postprocess(s):s})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?wd.lex:wd.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?Bd.parse:Bd.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(t){return a(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+yd(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Fd(t,e){return _d.parse(t,e)}function Ld(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var o=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(o.length){var a=new RegExp("\n[\t ]{"+Math.min.apply(Math,o)+"}","g");i=i.map(function(t){return t.replace(a,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return e.forEach(function(t,e){var r=s.match(/(?:^|\n)( *)$/),o=r?r[1]:"",a=t;"string"==typeof t&&t.includes("\n")&&(a=String(t).split("\n").map(function(t,e){return 0===e?t:""+o+t}).join("\n")),s+=a+i[e+1]}),s}Fd.options=Fd.setOptions=function(t){return _d.setOptions(t),Fd.defaults=_d.defaults,mc(Fd.defaults),Fd},Fd.getDefaults=fc,Fd.defaults=yc,Fd.use=function(...t){return _d.use(...t),Fd.defaults=_d.defaults,mc(Fd.defaults),Fd},Fd.walkTokens=function(t,e){return _d.walkTokens(t,e)},Fd.parseInline=_d.parseInline,Fd.Parser=Bd,Fd.parser=Bd.parse,Fd.Renderer=Sd,Fd.TextRenderer=Td,Fd.Lexer=wd,Fd.lexer=wd.lex,Fd.Tokenizer=bd,Fd.Hooks=vd,Fd.parse=Fd,Fd.options,Fd.setOptions,Fd.use,Fd.walkTokens,Fd.parseInline,Bd.parse,wd.lex;var Md={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},Ad=new Map,$d=new Map,Ed=Wt(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Ht.debug("Registering icon pack:",e.name),"loader"in e)$d.set(e.name,e.loader);else{if(!("icons"in e))throw Ht.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Ad.set(e.name,e.icons)}}},"registerIconPacks"),Od=Wt(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),e=o.pop(),r={provider:o.length>0?o[0]:i,prefix:e,name:t};return ac(r)?r:null}const a=o[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return ac(t)?t:null}if(r&&""===i){const t={provider:i,prefix:"",name:a};return ac(t,r)?t:null}return null})(t,0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=Ad.get(i);if(!o){const t=$d.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},Ad.set(i,o)}catch(t){throw Ht.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=lc(o,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),Id=Wt(async t=>{try{return await Od(t),!0}catch{return!1}},"isIconAvailable"),qd=Wt(async(t,e,r)=>{let i;try{i=await Od(t,e?.fallbackPrefix)}catch(t){Ht.error(t),i=Md}const o=function(t,e){const r={...ec,...t},i={...oc,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let s,n=t.rotate;switch(r?i?n+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4,n){case 1:s=o.height/2+o.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:s=o.width/2+o.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}n%2==1&&(o.left!==o.top&&(s=o.left,o.left=o.top,o.top=s),o.width!==o.height&&(s=o.width,o.width=o.height,o.height=s)),e.length&&(a=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===o||-1===a)break;const s=t.indexOf(">",a);if(-1===s)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(t);return o=i.defs,a=e+i.content+r,o?"<defs>"+o+"</defs>"+a:a;var o,a}(a,'<g transform="'+e.join(" ")+'">',"</g>"))});const s=i.width,n=i.height,l=o.width,h=o.height;let c,d;null===s?(d=null===n?"1em":"auto"===n?h:n,c=dc(d,l/h)):(c="auto"===s?l:s,d=null===n?dc(c,h/l):"auto"===n?h:n);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",c),p("height",d);const g=[o.left,o.top,l,h];return u.viewBox=g.join(" "),{attributes:u,viewBox:g,body:a}}(i,e),a=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(gc(o.body),{...o.attributes,...r});return Er(a,mr())},"getIconSVG");function Dd(t,{markdownAutoWrap:e}){return Ld(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"))}function Pd(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function zd(t,e={}){const r=Dd(t,e),i=Fd.lexer(r),o=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&o[a].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return Wt(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function Rd(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Wd(t,{markdownAutoWrap:e}={}){const r=Fd.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(Ht.warn(`Unsupported markdown: ${t.type}`),t.raw)}return Wt(i,"output"),r.map(i).join("")}function jd(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Nd(t,e){return Hd(t,[],jd(e.content),e.type)}function Hd(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?Hd(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Yd(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ud(t,e)}function Ud(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return Ud(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,o]=Nd(e,a);r.push([i]),o.content&&t.unshift(o)}return Ud(t,e,r)}function Vd(t,e){e&&t.attr("style",e)}Wt(Dd,"preprocessMarkdown"),Wt(Pd,"nonMarkdownToLines"),Wt(zd,"markdownToLines"),Wt(Rd,"nonMarkdownToHTML"),Wt(Wd,"markdownToHTML"),Wt(jd,"splitTextToChars"),Wt(Nd,"splitWordToFitWidth"),Wt(Hd,"splitWordToFitWidthRecursion"),Wt(Yd,"splitLineToFitWidth"),Wt(Ud,"splitLineToFitWidthRecursion"),Wt(Vd,"applyStyle");async function Xd(t,e,r,i,o=!1,a=mr()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const n=s.append("xhtml:div"),l=Xr(e.label)?await Qr(e.label.replace(Kr.lineBreakRegex,"\n"),a):Er(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),Vd(c,e.labelStyle),c.attr("class",`${h} ${i}`),Vd(n,e.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"),o&&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()),s.node()}function Gd(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function Zd(t,e,r){const i=t.append("text"),o=Gd(i,1,e);tu(o,r);const a=o.node().getComputedTextLength();return i.remove(),a}function Qd(t,e,r){const i=t.append("text"),o=Gd(i,1,e);tu(o,[{content:r,type:"normal"}]);const a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function Kd(t,e,r,i=!1,o=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),n=a.append("text").attr("y","-10.1");o&&n.attr("text-anchor","middle");let l=0;for(const e of r){const r=Wt(e=>Zd(a,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:Yd(e,r);for(const t of i){tu(Gd(n,l,1.1,o),t),l++}}if(i){const t=n.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return n.node()}function Jd(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function tu(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(Jd(e.content)):i.text(" "+Jd(e.content))})}async function eu(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,o)=>(r.push((async()=>{const r=`${i}:${o}`;return await Id(r)?await qd(r,void 0,{class:"label-icon"}):`<i class='${Er(t,e).replace(":"," ")}'></i>`})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}Wt(Xd,"addHtmlSpan"),Wt(Gd,"createTspan"),Wt(Zd,"computeWidthOfText"),Wt(Qd,"computeDimensionOfText"),Wt(Kd,"createFormattedText"),Wt(Jd,"decodeHTMLEntities"),Wt(tu,"updateTextContentAndStyles"),Wt(eu,"replaceIconSubstring");var ru=Wt(async(t,e="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:a=!0,markdown:s=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(Ht.debug("XYZ createText",e,r,i,o,a,n,"addSvgBackground: ",h),a){const i=s?Wd(e,c):Rd(e),a=await eu(Rh(i),c),d=e.replace(/\\\\/g,"\\"),u={isNode:n,label:Xr(e)?d:a,labelStyle:r.replace("fill:","color:")};return await Xd(t,u,l,o,h,c)}{const o=Rh(e.replace(/<br\s*\/?>/g,"<br/>")),a=Kd(l,t,s?zd(o.replace("<br>","<br/>"),c):Pd(o),!!e&&h,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Zo(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Zo(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Zo(a).select("text").attr("style",e)}return i?Zo(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Zo(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText");function iu(t,e,r){if(t&&t.length){const[i,o]=e,a=Math.PI/180*r,s=Math.cos(a),n=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*s-(r-o)*n+i,e[1]=(t-i)*n+(r-o)*s+o}}}function ou(t,e){return t[0]===e[0]&&t[1]===e[1]}function au(t,e,r,i=1){const o=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,n=[0,0];if(o)for(const t of s)iu(t,n,o);const l=function(t,e,r){const i=[];for(const e of t){const t=[...e];ou(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const o=[];e=Math.max(e,.1);const a=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);a.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return o;let s=[],n=a[0].ymin,l=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>n);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:n,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=n)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||l%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;o.push([[Math.round(r.x),n],[Math.round(i.x),n]])}n+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),l++}return o}(s,a,i);if(o){for(const t of s)iu(t,n,-o);!function(t,e,r){const i=[];t.forEach(t=>i.push(...t)),iu(i,e,r)}(l,n,-o)}return l}function su(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=o),au(t,o,i,a||1)}class nu{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=su(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function lu(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class hu extends nu{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=su(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(o),n=.5*r*Math.sin(o);for(const[t,e]of i)lu([t,e])&&a.push([[t[0]-s,t[1]+n],[...e]],[[t[0]+s,t[1]-n],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class cu extends nu{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class du{constructor(t){this.helper=t}fillPolygons(t,e){const r=su(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const a=i/4;for(const s of t){const t=lu(s),n=t/i,l=Math.ceil(n)-1,h=t-l*i,c=(s[0][0]+s[1][0])/2-i/4,d=Math.min(s[0][1],s[1][1]);for(let t=0;t<l;t++){const s=d+h+t*i,n=c-a+2*Math.random()*a,l=s-a+2*Math.random()*a,u=this.helper.ellipse(n,l,o,o,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class uu{constructor(t){this.helper=t}fillPolygons(t,e){const r=su(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const a=lu(t),s=Math.floor(a/(r+i)),n=(a+i-s*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<s;t++){const a=t*(r+i),s=a+r,h=[l[0]+a*Math.cos(c)+n*Math.cos(c),l[1]+a*Math.sin(c)+n*Math.sin(c)],d=[l[0]+s*Math.cos(c)+n*Math.cos(c),l[1]+s*Math.sin(c)+n*Math.sin(c)];o.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],e))}}),o}}class pu{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=su(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=lu(t),a=Math.round(o/(2*e));let s=t[0],n=t[1];s[0]>n[0]&&(s=t[1],n=t[0]);const l=Math.atan((n[1]-s[1])/(n[0]-s[0]));for(let t=0;t<a;t++){const o=2*t*e,a=2*(t+1)*e,n=Math.sqrt(2*Math.pow(e,2)),h=[s[0]+o*Math.cos(l),s[1]+o*Math.sin(l)],c=[s[0]+a*Math.cos(l),s[1]+a*Math.sin(l)],d=[h[0]+n*Math.cos(l+Math.PI/4),h[1]+n*Math.sin(l+Math.PI/4)];i.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const gu={};class fu{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const yu={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 mu(t,e){return t.type===e}function Cu(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,a=r[o];for(;!mu(a,2);){let s=0;const n=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return Cu("M0,0"+t);o++,s=yu[a.text],i=a.text}else mu(a,1)?s=yu[i]:(o++,s=yu[a.text],i=a.text);if(!(o+s<r.length))throw new Error("Path data ended short");for(let t=o;t<o+s;t++){const e=r[t];if(!mu(e,1))throw new Error("Param not a number: "+i+","+e.text);n[n.length]=+e.text}if("number"!=typeof yu[i])throw new Error("Bad segment: "+i);{const t={key:i,data:n};e.push(t),o+=s,a=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function xu(t){let e=0,r=0,i=0,o=0;const a=[];for(const{key:s,data:n}of t)switch(s){case"M":a.push({key:"M",data:[...n]}),[e,r]=n,[i,o]=n;break;case"m":e+=n[0],r+=n[1],a.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":a.push({key:"L",data:[...n]}),[e,r]=n;break;case"l":e+=n[0],r+=n[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...n]}),e=n[4],r=n[5];break;case"c":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],r=n[3];break;case"q":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],r=n[6];break;case"a":e+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,r]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],r=n[3];break;case"s":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],r=n[1];break;case"t":e+=n[0],r+=n[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function ku(t){const e=[];let r="",i=0,o=0,a=0,s=0,n=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],n=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-n),a=o+(o-l)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),n=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,a]=c;let s=0,h=0;"Q"===r||"T"===r?(s=i+(i-n),h=o+(o-l)):(s=i,h=o);const d=i+2*(s-i)/3,u=o+2*(h-o)/3,p=t+2*(s-t)/3,g=a+2*(h-a)/3;e.push({key:"C",data:[d,u,p,g,t,a]}),n=s,l=h,i=t,o=a;break}case"Q":{const[t,r,a,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,p,a,s]}),n=t,l=r,i=a,o=s;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],s=c[3],n=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(wu(i,o,l,h,t,r,a,s,n).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=s}r=h}return e}function bu(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function wu(t,e,r,i,o,a,s,n,l,h){const c=(d=s,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=bu(t,e,-c),[r,i]=bu(r,i,-c);const s=(t-r)/2,h=(e-i)/2;let d=s*s/(o*o)+h*h/(a*a);d>1&&(d=Math.sqrt(d),o*=d,a*=d);const u=o*o,m=a*a,C=u*m-u*h*h-m*s*s,x=u*h*h+m*s*s,k=(n===l?-1:1)*Math.sqrt(Math.abs(C/x));f=k*o*h/a+(t+r)/2,y=k*-a*s/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),t<f&&(p=Math.PI-p),r<f&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,n=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=wu(r=f+o*Math.cos(g),i=y+a*Math.sin(g),e,n,o,a,s,0,l,[g,t,f,y])}m=g-p;const C=Math.cos(p),x=Math.sin(p),k=Math.cos(g),b=Math.sin(g),w=Math.tan(m/4),S=4/3*o*w,T=4/3*a*w,B=[t,e],v=[t+S*x,e-T*C],_=[r+S*b,i-T*k],F=[r,i];if(v[0]=2*B[0]-v[0],v[1]=2*B[1]-v[1],h)return[v,_,F].concat(u);{u=[v,_,F].concat(u);const t=[];for(let e=0;e<u.length;e+=3){const r=bu(u[e][0],u[e][1],c),i=bu(u[e+1][0],u[e+1][1],c),o=bu(u[e+2][0],u[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const Su={randOffset:function(t,e){return qu(t,e)},randOffsetWithRange:function(t,e,r){return Iu(t,e,r)},ellipse:function(t,e,r,i,o){return Fu(t,e,o,_u(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return Du(t,e,r,i,o,!0)}};function Tu(t,e,r,i,o){return{type:"path",ops:Du(t,e,r,i,o)}}function Bu(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...Du(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...Du(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?Tu(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function vu(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=zu(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:zu(r[0],1.5*(1+.22*e.roughness),Eu(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=zu(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:zu(a,1.5*(1+.22*e.roughness),Eu(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function _u(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/o;let s=Math.abs(t/2),n=Math.abs(e/2);const l=1-r.curveFitting;return s+=qu(s*l,r),n+=qu(n*l,r),{increment:a,rx:s,ry:n}}function Fu(t,e,r,i){const[o,a]=Wu(i.increment,t,e,i.rx,i.ry,1,i.increment*Iu(.1,Iu(.4,1,r),r),r);let s=Ru(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=Wu(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=Ru(o,null,r);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Lu(t,e,r,i,o,a,s,n,l){const h=t,c=e;let d=Math.abs(r/2),u=Math.abs(i/2);d+=qu(.01*d,l),u+=qu(.01*u,l);let p=o,g=a;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=ju(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=ju(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return s&&(n?m.push(...Du(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...Du(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function Mu(t,e){const r=ku(xu(Cu(t))),i=[];let o=[0,0],a=[0,0];for(const{key:t,data:s}of r)switch(t){case"M":a=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...Du(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,o,n,l,h]=s;i.push(...Nu(t,r,o,n,l,h,a,e)),a=[l,h];break}case"Z":i.push(...Du(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function Au(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+qu(t,e),i[0][1]+qu(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+qu(t,e),i[a][1]+qu(t,e)]})}}return{type:"fillPath",ops:r}}function $u(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!gu[r])switch(r){case"zigzag":gu[r]||(gu[r]=new hu(e));break;case"cross-hatch":gu[r]||(gu[r]=new cu(e));break;case"dots":gu[r]||(gu[r]=new du(e));break;case"dashed":gu[r]||(gu[r]=new uu(e));break;case"zigzag-line":gu[r]||(gu[r]=new pu(e));break;default:r="hachure",gu[r]||(gu[r]=new nu(e))}return gu[r]}(e,Su).fillPolygons(t,e)}function Eu(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Ou(t){return t.randomizer||(t.randomizer=new fu(t.seed||0)),t.randomizer.next()}function Iu(t,e,r,i=1){return r.roughness*i*(Ou(r)*(e-t)+t)}function qu(t,e,r=1){return Iu(-t,t,e,r)}function Du(t,e,r,i,o,a=!1){const s=a?o.disableMultiStrokeFill:o.disableMultiStroke,n=Pu(t,e,r,i,o,!0,!1);if(s)return n;const l=Pu(t,e,r,i,o,!0,!0);return n.concat(l)}function Pu(t,e,r,i,o,a,s){const n=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,u=.2+.2*Ou(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=qu(p,o,h),g=qu(g,o,h);const f=[],y=()=>qu(d,o,h),m=()=>qu(c,o,h),C=o.preserveVertices;return s?f.push({op:"move",data:[t+(C?0:y()),e+(C?0:y())]}):f.push({op:"move",data:[t+(C?0:qu(c,o,h)),e+(C?0:qu(c,o,h))]}),s?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(C?0:y()),i+(C?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(C?0:m()),i+(C?0:m())]}),f}function zu(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+qu(e,r),t[0][1]+qu(e,r)]),i.push([t[0][0]+qu(e,r),t[0][1]+qu(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+qu(e,r),t[o][1]+qu(e,r)]),o===t.length-1&&i.push([t[o][0]+qu(e,r),t[o][1]+qu(e,r)]);return Ru(i,null,r)}function Ru(t,e,r){const i=t.length,o=[];if(i>3){const e=[],a=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let r=1;r+2<i;r++){const i=t[r];e[0]=[i[0],i[1]],e[1]=[i[0]+(a*t[r+1][0]-a*t[r-1][0])/6,i[1]+(a*t[r+1][1]-a*t[r-1][1])/6],e[2]=[t[r+1][0]+(a*t[r][0]-a*t[r+2][0])/6,t[r+1][1]+(a*t[r][1]-a*t[r+2][1])/6],e[3]=[t[r+1][0],t[r+1][1]],o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[3][0],e[3][1]]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...Pu(t[0][0],t[0][1],t[1][0],t[1][1],r,0,!0));return o}function Wu(t,e,r,i,o,a,s,n){const l=[],h=[];if(0===n.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+o*Math.sin(a)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=qu(.5,n)-Math.PI/2;h.push([qu(a,n)+e+.9*i*Math.cos(c-t),qu(a,n)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let s=c;s<d;s+=t){const t=[qu(a,n)+e+i*Math.cos(s),qu(a,n)+r+o*Math.sin(s)];l.push(t),h.push(t)}h.push([qu(a,n)+e+i*Math.cos(c+2*Math.PI+.5*s),qu(a,n)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([qu(a,n)+e+.98*i*Math.cos(c+s),qu(a,n)+r+.98*o*Math.sin(c+s)]),h.push([qu(a,n)+e+.9*i*Math.cos(c+.5*s),qu(a,n)+r+.9*o*Math.sin(c+.5*s)])}return[h,l]}function ju(t,e,r,i,o,a,s,n,l){const h=a+qu(.1,l),c=[];c.push([qu(n,l)+e+.9*i*Math.cos(h-t),qu(n,l)+r+.9*o*Math.sin(h-t)]);for(let a=h;a<=s;a+=t)c.push([qu(n,l)+e+i*Math.cos(a),qu(n,l)+r+o*Math.sin(a)]);return c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),Ru(c,0,l)}function Nu(t,e,r,i,o,a,s,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let p=0;p<d;p++)0===p?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(u?0:qu(h[0],n)),s[1]+(u?0:qu(h[0],n))]}),c=u?[o,a]:[o+qu(h[p],n),a+qu(h[p],n)],l.push({op:"bcurveTo",data:[t+qu(h[p],n),e+qu(h[p],n),r+qu(h[p],n),i+qu(h[p],n),c[0],c[1]]});return l}function Hu(t){return[...t]}function Yu(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(Hu(t[0]),Hu(t[1]),Hu(t[2]),Hu(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],a=1-e;i.push(Hu(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],o[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function Uu(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Vu(t,e,r){const i=Uu(e,r);if(0===i)return Uu(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),Uu(t,Xu(e,r,o))}function Xu(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function Gu(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],a=t[e+3];let s=3*i[0]-2*r[0]-a[0];s*=s;let n=3*i[1]-2*r[1]-a[1];n*=n;let l=3*o[0]-2*a[0]-r[0];l*=l;let h=3*o[1]-2*a[1]-r[1];return h*=h,s<l&&(s=l),n<h&&(n=h),s+n}(t,e)<r){const r=t[e+0];o.length?(a=o[o.length-1],s=r,Math.sqrt(Uu(a,s))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,a=t[e+0],s=t[e+1],n=t[e+2],l=t[e+3],h=Xu(a,s,i),c=Xu(s,n,i),d=Xu(n,l,i),u=Xu(h,c,i),p=Xu(c,d,i),g=Xu(u,p,i);Gu([a,h,u,g],0,r,o),Gu([g,p,d,l],0,r,o)}var a,s;return o}function Zu(t,e){return Qu(t,0,t.length,e)}function Qu(t,e,r,i,o){const a=o||[],s=t[e],n=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=Vu(t[i],s,n);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Qu(t,e,h+1,i,a),Qu(t,h,r,i,a)):(a.length||a.push(s),a.push(n)),a}function Ku(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)Gu(t,3*r,e,i);return r&&r>0?Qu(i,0,i.length,r):i}const Ju="none";class tp{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const a=this._o(o);return this._d("line",[Tu(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){const a=this._o(o),s=[],n=function(t,e,r,i,o){return function(t,e){return Bu(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,a);if(a.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?s.push(Au([o],a)):s.push($u([o],a))}return a.stroke!==Ju&&s.push(n),this._d("rectangle",s,a)}ellipse(t,e,r,i,o){const a=this._o(o),s=[],n=_u(r,i,a),l=Fu(t,e,a,n);if(a.fill)if("solid"===a.fillStyle){const r=Fu(t,e,a,n).opset;r.type="fillPath",s.push(r)}else s.push($u([l.estimatedPoints],a));return a.stroke!==Ju&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[Bu(t,!1,r)],r)}arc(t,e,r,i,o,a,s=!1,n){const l=this._o(n),h=[],c=Lu(t,e,r,i,o,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const n=Lu(t,e,r,i,o,a,!0,!1,s);n.type="fillPath",h.push(n)}else h.push(function(t,e,r,i,o,a,s){const n=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=qu(.01*h,s),c+=qu(.01*c,s);let d=o,u=a;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/s.curveStepCount,g=[];for(let t=d;t<=u;t+=p)g.push([n+h*Math.cos(t),l+c*Math.sin(t)]);return g.push([n+h*Math.cos(u),l+c*Math.sin(u)]),g.push([n,l]),$u([g],s)}(t,e,r,i,o,a,l));return l.stroke!==Ju&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=vu(t,r);if(r.fill&&r.fill!==Ju)if("solid"===r.fillStyle){const e=vu(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Ku(Yu([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Ku(Yu(i),10,(1+r.roughness)/2))}e.length&&i.push($u([e],r))}return r.stroke!==Ju&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=Bu(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(Au([t],r)):i.push($u([t],r))),r.stroke!==Ju&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==Ju,a=r.stroke!==Ju,s=!!(r.simplification&&r.simplification<1),n=function(t,e,r){const i=ku(xu(Cu(t))),o=[];let a=[],s=[0,0],n=[];const l=()=>{n.length>=4&&a.push(...Ku(n,1)),n=[]},h=()=>{l(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),s=[e[0],e[1]],a.push(s);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!n.length){const t=a.length?a[a.length-1]:s;n.push([t[0],t[1]])}n.push([e[0],e[1]]),n.push([e[2],e[3]]),n.push([e[4],e[5]]);break;case"Z":l(),a.push([s[0],s[1]])}if(h(),!r)return o;const c=[];for(const t of o){const e=Zu(t,r);e.length&&c.push(e)}return c}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=Mu(t,r);if(o)if("solid"===r.fillStyle)if(1===n.length){const e=Mu(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(Au(n,r));else i.push($u(n,r));return a&&(s?n.forEach(t=>{i.push(Bu(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Ju};break;case"fillPath":e={d:this.opsToPath(t),stroke:Ju,strokeWidth:0,fill:r.fill||Ju};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||Ju,strokeWidth:r,fill:Ju}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class ep{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tp(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rp="http://www.w3.org/2000/svg";class ip{constructor(t,e){this.svg=t,this.gen=new tp(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rp,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=i.createElementNS(rp,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rp,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rp,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var op={canvas:(t,e)=>new ep(t,e),svg:(t,e)=>new ip(t,e),generator:t=>new tp(t),newSeed:()=>tp.newSeed()},ap=Wt(async(t,e,r)=>{let i;const o=e.useHtmlLabels||nr(wi()?.htmlLabels);i=r||"node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",jh(e.labelStyle));let n;n=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const l=!!e.icon||!!e.img,h="markdown"===e.labelType,c=await ru(s,Er(Rh(n),wi()),{useHtmlLabels:o,width:e.width||wi().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:l,markdown:h},wi());let d=c.getBBox();const u=(e?.padding??0)/2;if(o){const t=c.children[0],e=Zo(c);await Yh(t,n),d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return o?s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):s.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:d,halfPadding:u,label:s}},"labelHelper"),sp=Wt(async(t,e,r)=>{const i=r.useHtmlLabels??vr(wi()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ru(o,Er(Rh(e),wi()),{useHtmlLabels:i,width:r.width||wi()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const n=r.padding/2;if(vr(wi())){const t=a.children[0],e=Zo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}return i?o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):o.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:n,label:o}},"insertLabel"),np=Wt((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),lp=Wt((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function hp(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function cp(t,e,r,i,o,a){const s=[],n=r-t,l=i-e,h=n/a,c=2*Math.PI/h,d=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*n,i=d+o*Math.sin(c*(r-t));s.push({x:r,y:i})}return s}function dp(t,e,r,i,o,a){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}function up(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=Wt((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}Wt(hp,"createPathFromPoints"),Wt(cp,"generateFullSineWavePoints"),Wt(dp,"generateCirclePoints"),Wt(up,"mergePaths");var pp=Wt((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,n=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(n)*l>Math.abs(s)*h?(n<0&&(h=-h),r=0===n?0:h*s/n,i=h):(s<0&&(l=-l),r=l,i=0===s?0:l*n/s),{x:o+r,y:a+i}},"intersectRect"),gp=pp,fp=Wt(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const s=wi(),n=vr(s);return await ru(t,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},s)},"createLabel"),yp=fp,mp=Wt((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),Cp=Wt(async(t,e)=>{Ht.info("Creating subgraph rect for ",e.id,e);const r=wi(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Zh(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=vr(r),p=d.insert("g").attr("class","cluster-label ");let g;g="markdown"===e.labelType?await ru(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width}):await yp(p,e.label,e.labelStyle||"",!1,!0);let f=g.getBBox();if(vr(r)){const t=g.children[0],e=Zo(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,C=e.x-y/2,x=e.y-m/2;let k;if(Ht.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=op.svg(d),r=Qh(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:o}),i=t.path(mp(C,x,y,m,0),r);k=d.insert(()=>(Ht.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",x).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:b}=Hh(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+b})`),n){const t=p.select("span");t&&t.attr("style",n)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return gp(e,t)},{cluster:d,labelBBox:f}},"rect"),xp=Wt((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return gp(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),kp=Wt(async(t,e)=>{const r=wi(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:n,nodeBorder:l}=i,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),c=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label");let u=h.append("rect");const p=await yp(d,e.label,e.labelStyle,void 0,!0);let g=p.getBBox();if(vr(r)){const t=p.children[0],e=Zo(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const f=0*e.padding,y=f/2,m=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+f;e.width<=g.width+e.padding?e.diff=(m-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+f,x=e.height+f-g.height-6,k=e.x-m/2,b=e.y-C/2;e.width=m;const w=e.y-e.height/2-y+g.height+2;let S;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=op.svg(h),i=e.rx||e.ry?r.path(mp(k,b,m,C,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:o}):r.rectangle(k,b,m,C,{seed:o});S=h.insert(()=>i,":first-child");const c=r.rectangle(k,w,m,x,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:l,seed:o});S=h.insert(()=>i,":first-child"),u=h.insert(()=>c)}else{S=c.insert("rect",":first-child");const t="outer";S.attr("class",t).attr("x",k).attr("y",b).attr("width",m).attr("height",C).attr("data-look",e.look),u.attr("class","inner").attr("x",k).attr("y",w).attr("width",m).attr("height",x)}d.attr("transform",`translate(${e.x-g.width/2}, ${b+1-(vr(r)?0:3)})`);const T=S.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(t){return gp(e,t)},{cluster:h,labelBBox:g}},"roundedWithTitle"),bp=Wt(async(t,e)=>{Ht.info("Creating subgraph rect for ",e.id,e);const r=wi(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=Zh(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),u=vr(r),p=d.insert("g").attr("class","cluster-label "),g=await ru(p,e.label,{style:e.labelStyle,useHtmlLabels:u,isNode:!0,width:e.width});let f=g.getBBox();if(vr(r)){const t=g.children[0],e=Zo(g);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}const y=e.width<=f.width+e.padding?f.width+e.padding:e.width;e.width<=f.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const m=e.height,C=e.x-y/2,x=e.y-m/2;let k;if(Ht.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=op.svg(d),r=Qh(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:o}),i=t.path(mp(C,x,y,m,e.rx),r);k=d.insert(()=>(Ht.debug("Rough node insert CXC",i),i),":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";")),k.select("path").attr("style",c.join(";").replace("fill","stroke"))}else k=d.insert("rect",":first-child"),k.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",x).attr("width",y).attr("height",m);const{subGraphTitleTopMargin:b}=Hh(r);if(p.attr("transform",`translate(${e.x-f.width/2}, ${e.y-e.height/2+b})`),n){const t=p.select("span");t&&t.attr("style",n)}const w=k.node().getBBox();return e.offsetX=0,e.width=w.width,e.height=w.height,e.offsetY=f.height-e.padding/2,e.intersect=function(t){return gp(e,t)},{cluster:d,labelBBox:f}},"kanbanSection"),wp=Wt((t,e)=>{const r=wi(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:a}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),n=s.insert("g",":first-child"),l=0*e.padding,h=e.width+l;e.diff=-e.padding;const c=e.height+l,d=e.x-h/2,u=e.y-c/2;let p;if(e.width=h,"handDrawn"===e.look){const t=op.svg(s).rectangle(d,u,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});p=s.insert(()=>t,":first-child")}else{p=n.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),p.attr("class",t).attr("x",d).attr("y",u).attr("width",h).attr("height",c).attr("data-look",e.look)}const g=p.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return gp(e,t)},{cluster:s,labelBBox:{}}},"divider"),Sp={rect:Cp,squareRect:Cp,roundedWithTitle:kp,noteGroup:xp,divider:wp,kanbanSection:bp},Tp=new Map,Bp=Wt(async(t,e)=>{const r=e.shape||"rect",i=await Sp[r](t,e);return Tp.set(e.id,i),i},"insertCluster"),vp=Wt(()=>{Tp=new Map},"clear");function _p(t,e){return t.intersect(e)}Wt(_p,"intersectNode");var Fp=_p;function Lp(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,n=a-i.y,l=Math.sqrt(e*e*n*n+r*r*s*s),h=Math.abs(e*r*s/l);i.x<o&&(h=-h);var c=Math.abs(e*r*n/l);return i.y<a&&(c=-c),{x:o+h,y:a+c}}Wt(Lp,"intersectEllipse");var Mp=Lp;function Ap(t,e,r){return Mp(t,e,e,r)}Wt(Ap,"intersectCircle");var $p=Ap;function Ep(t,e,r,i){{const o=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,n=o*r.x+a*r.y+s,l=o*i.x+a*i.y+s,h=1e-6;if(0!==n&&0!==l&&Op(n,l))return;const c=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+u,g=c*e.x+d*e.y+u;if(Math.abs(p)<h&&Math.abs(g)<h&&Op(p,g))return;const f=o*d-c*a;if(0===f)return;const y=Math.abs(f/2);let m=a*u-d*s;const C=m<0?(m-y)/f:(m+y)/f;m=c*s-o*u;return{x:C,y:m<0?(m-y)/f:(m+y)/f}}}function Op(t,e){return t*e>0}Wt(Ep,"intersectLine"),Wt(Op,"sameSign");var Ip=Ep;function qp(t,e,r){let i=t.x,o=t.y,a=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),n=Math.min(n,t.y)}):(s=Math.min(s,e.x),n=Math.min(n,e.y));let l=i-t.width/2-s,h=o-t.height/2-n;for(let i=0;i<e.length;i++){let o=e[i],s=e[i<e.length-1?i+1:0],n=Ip(t,r,{x:l+o.x,y:h+o.y},{x:l+s.x,y:h+s.y});n&&a.push(n)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,n=e.y-r.y,l=Math.sqrt(s*s+n*n);return a<l?-1:a===l?0:1}),a[0]):t}Wt(qp,"intersectPolygon");var Dp={node:Fp,circle:$p,ellipse:Mp,polygon:qp,rect:gp};function Pp(t,e){const{labelStyles:r}=Zh(e);e.labelStyle=r;const i=lp(e);let o=i;i||(o="anchor");const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),{cssStyles:s}=e,n=op.svg(a),l=Qh(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(l.roughness=0);const h=n.circle(0,0,2,l),c=a.insert(()=>h,":first-child");return c.attr("class","anchor").attr("style",jh(s)),np(e,c),e.intersect=function(t){return Ht.info("Circle intersect",e,1,t),Dp.circle(e,1,t)},a}function zp(t,e,r,i,o,a,s){const n=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/a,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=n+p*a*Math.sin(h)*(s?-1:1),f=l-p*o*Math.cos(h)*(s?-1:1),y=Math.atan2((e-f)/a,(t-g)/o);let m=Math.atan2((i-f)/a,(r-g)/o)-y;s&&m<0&&(m+=2*Math.PI),!s&&m>0&&(m-=2*Math.PI);const C=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=g+o*Math.cos(e),i=f+a*Math.sin(e);C.push({x:r,y:i})}return C}function Rp(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function Wp(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,n=Wt(t=>t+s,"calcTotalHeight"),l=Wt(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await ap(t,e,lp(e)),d=n(e?.height?e?.height:c.height),[u,p]=l(d),g=Rp(d,u,p),f=(e?.width?e?.width:c.width)+2*a+g-g,y=d,{cssStyles:m}=e,C=[{x:f/2,y:-y/2},{x:-f/2,y:-y/2},...zp(-f/2,-y/2,-f/2,y/2,u,p,!1),{x:f/2,y:y/2},...zp(f/2,y/2,f/2,-y/2,u,p,!0)],x=op.svg(h),k=Qh(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const b=hp(C),w=x.path(b,k),S=h.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${u/2}, 0)`),np(e,S),e.intersect=function(t){return Dp.polygon(e,C,t)},h}function jp(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}Wt(Pp,"anchor"),Wt(zp,"generateArcPoints"),Wt(Rp,"calculateArcSagitta"),Wt(Wp,"bowTieRect"),Wt(jp,"insertPolygonShape");async function Np(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?28:o,s="neo"===e.look?24:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.width??l.width)+("neo"===e.look?2*a:a+12),c=(e?.height??l.height)+("neo"===e.look?2*s:s),d=-c,u=[{x:12,y:d},{x:h,y:d},{x:h,y:0},{x:0,y:0},{x:0,y:d+12},{x:12,y:d}];let p;const{cssStyles:g}=e;if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{}),i=hp(u),o=t.path(i,r);p=n.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&p.attr("style",g)}else p=jp(n,h,c,u);return i&&p.attr("style",i),np(e,p),e.intersect=function(t){return Dp.polygon(e,u,t)},n}function Hp(t,e){const{nodeStyles:r}=Zh(e);e.label="";const i=t.insert("g").attr("class",lp(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=op.svg(i),l=Qh(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=hp(s),c=n.path(h,l),d=i.insert(()=>c,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return Dp.polygon(e,s,t)},i}async function Yp(t,e,r){const{labelStyles:i,nodeStyles:o}=Zh(e);e.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:n}=await ap(t,e,lp(e)),l=r?.padding??n,h="neo"===e.look?s.width/2+32:s.width/2+l;let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=op.svg(a),r=Qh(e,{}),i=t.circle(0,0,2*h,r);c=a.insert(()=>i,":first-child"),c.attr("class","basic label-container").attr("style",jh(d))}else c=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",h).attr("cx",0).attr("cy",0);return np(e,c),e.calcIntersect=function(t,e){const r=t.width/2;return Dp.circle(t,r,e)},e.intersect=function(t){return Ht.info("Circle intersect",e,h,t),Dp.circle(e,h,t)},a}function Up(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function Vp(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r,e.label="";const o=t.insert("g").attr("class",lp(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,n=op.svg(o),l=Qh(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,2*a,l),c=Up(a),d=n.path(c,l),u=o.insert(()=>h,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),s&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),np(e,u),e.intersect=function(t){Ht.info("crossedCircle intersect",e,{radius:a,point:t});return Dp.circle(e,a,t)},o}function Xp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function Gp(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await ap(t,e,lp(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+n,c=a.height+l,d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...Xp(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...Xp(h/2+2*d,-d,d,20,-180,-270),...Xp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...Xp(h/2,c/2,d,20,0,90)],g=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...Xp(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...Xp(h/2+.1*h,-d,d,20,-180,-270),...Xp(h/2+.1*h,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...Xp(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2,y:c/2+d}],f=op.svg(o),y=Qh(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=hp(p).replace("Z",""),C=f.path(m,y),x=hp(g),k=f.path(x,{...y}),b=o.insert("g",":first-child");return b.insert(()=>k,":first-child").attr("stroke-opacity",0),b.insert(()=>C,":first-child"),b.attr("class","text"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),np(e,b),e.intersect=function(t){return Dp.polygon(e,g,t)},o}function Zp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:a,y:h})}return s}async function Qp(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await ap(t,e,lp(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*n:n),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...Zp(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Zp(h/2+2*d,-d,d,20,-180,-270),...Zp(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Zp(h/2,c/2,d,20,0,90)],g=[{x:-h/2,y:-c/2-d},{x:h/2,y:-c/2-d},...Zp(h/2,-c/2,d,20,-90,0),{x:h/2+d,y:-d},...Zp(h/2+2*d,-d,d,20,-180,-270),...Zp(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:c/2},...Zp(h/2,c/2,d,20,0,90),{x:h/2,y:c/2+d},{x:-h/2,y:c/2+d}],f=op.svg(o),y=Qh(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=hp(p).replace("Z",""),C=f.path(m,y),x=hp(g),k=f.path(x,{...y}),b=o.insert("g",":first-child");return b.insert(()=>k,":first-child").attr("stroke-opacity",0),b.insert(()=>C,":first-child"),b.attr("class","text"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),np(e,b),e.intersect=function(t){return Dp.polygon(e,g,t)},o}function Kp(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){const i=n+o*l,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function Jp(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await ap(t,e,lp(e)),n="neo"===e.look?18:e.padding??0,l="neo"===e.look?12:e.padding??0,h=a.width+("neo"===e.look?2*n:n),c=a.height+("neo"===e.look?2*l:l),d=Math.max(5,.1*c),{cssStyles:u}=e,p=[...Kp(h/2,-c/2,d,30,-90,0),{x:-h/2-d,y:d},...Kp(h/2+2*d,-d,d,20,-180,-270),...Kp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-c/2},...Kp(h/2,c/2,d,20,0,90)],g=[...Kp(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...Kp(-h/2-d/2,-d,d,20,0,90),...Kp(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...Kp(-h/2+d+d/2,c/2,d,30,-180,-270)],f=[{x:h/2,y:-c/2-d},{x:-h/2,y:-c/2-d},...Kp(h/2,-c/2,d,20,-90,0),{x:-h/2-d,y:-d},...Kp(h/2+2*d,-d,d,20,-180,-270),...Kp(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:c/2},...Kp(h/2,c/2,d,20,0,90),{x:-h/2,y:c/2+d},{x:h/2-d-d/2,y:c/2+d},...Kp(-h/2+d+d/2,-c/2,d,20,-90,-180),{x:h/2-d/2,y:d},...Kp(-h/2-d/2,-d,d,20,0,90),...Kp(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...Kp(-h/2+d+d/2,c/2,d,30,-180,-270)],y=op.svg(o),m=Qh(e,{fill:"none"});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=hp(p).replace("Z",""),x=y.path(C,m),k=hp(g).replace("Z",""),b=y.path(k,m),w=hp(f),S=y.path(w,{...m}),T=o.insert("g",":first-child");return T.insert(()=>S,":first-child").attr("stroke-opacity",0),T.insert(()=>x,":first-child"),T.insert(()=>b,":first-child"),T.attr("class","text"),u&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(a.x-(a.left??0))},${-c/2+(e.padding??0)/2-(a.y-(a.top??0))})`),np(e,T),e.intersect=function(t){return Dp.polygon(e,f,t)},o}async function tg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=Math.max(20,1.25*(l.width+2*a),e?.width??0),c=Math.max(5,l.height+2*s,e?.height??0),d=c/2,{cssStyles:u}=e,p=op.svg(n),g=Qh(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=h-d,y=c/4,m=[{x:f,y:0},{x:y,y:0},{x:0,y:c/2},{x:y,y:c},{x:f,y:c},...dp(-f,-c/2,d,50,270,90)],C=hp(m),x=p.path(C,g),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-h/2}, ${-c/2})`),np(e,k),e.intersect=function(t){return Dp.polygon(e,m,t)},n}Wt(Np,"card"),Wt(Hp,"choice"),Wt(Yp,"circle"),Wt(Up,"createLine"),Wt(Vp,"crossedCircle"),Wt(Xp,"generateCirclePoints"),Wt(Gp,"curlyBraceLeft"),Wt(Zp,"generateCirclePoints"),Wt(Qp,"curlyBraceRight"),Wt(Kp,"generateCirclePoints"),Wt(Jp,"curlyBraces"),Wt(tg,"curvedTrapezoid");var eg=Wt((t,e,r,i,o,a)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),rg=Wt((t,e,r,i,o,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ig=Wt((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function og(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?24:o,s="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-a-3*r,e.height<8&&(e.height=8)}const{shapeSvg:n,bbox:l,label:h}=await ap(t,e,lp(e)),c=(e.width?e.width:l.width)+s,d=c/2,u=d/(2.5+c/50),p=(e.height?e.height:l.height)+a+u;let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=op.svg(n),r=rg(0,0,c,p,d,u),i=ig(0,u,c,p,d,u),o=Qh(e,{}),a=t.path(r,o),s=t.path(i,Qh(e,{fill:"none"}));g=n.insert(()=>s,":first-child"),g=n.insert(()=>a,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const t=eg(0,0,c,p,d,u);g=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",jh(f)).attr("style",i)}return g.attr("label-offset-y",u),g.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),np(e,g),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+(e.padding??0)/1.5-(l.y-(l.top??0))})`),e.intersect=function(t){const r=Dp.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},n}async function ag(t,e,r){const{labelStyles:i,nodeStyles:o}=Zh(e);e.labelStyle=i;const{shapeSvg:a,bbox:s}=await ap(t,e,lp(e)),n=Math.max(s.width+2*r.labelPaddingX,e?.width||0),l=Math.max(s.height+2*r.labelPaddingY,e?.height||0),h=-n/2,c=-l/2;let d,{rx:u,ry:p}=e;const{cssStyles:g}=e;if(r?.rx&&r.ry&&(u=r.rx,p=r.ry),"handDrawn"===e.look){const t=op.svg(a),r=Qh(e,{}),i=u||p?t.path(mp(h,c,n,l,u||0),r):t.rectangle(h,c,n,l,r);d=a.insert(()=>i,":first-child"),d.attr("class","basic label-container").attr("style",jh(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",o).attr("rx",jh(u)).attr("ry",jh(p)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return np(e,d),e.calcIntersect=function(t,e){return Dp.rect(t,e)},e.intersect=function(t){return Dp.rect(e,t)},a}async function sg(t,e){const{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:a,width:s,height:n}=e,l={rx:0,ry:0,labelPaddingX:i??2*(a??0),labelPaddingY:o??a??0},h=await ag(t,e,l);if("handDrawn"===e.look){const t=op.svg(h),r=Qh(e,{}),i=h.select(".basic.label-container > path:nth-child(2)"),o=i.node();if(!o)return h;let a=null;return o instanceof SVGGraphicsElement?(a=o.getBBox(),h.insert(()=>t.line(a.x,a.y,a.x+a.width,a.y,r),".basic.label-container g.label"),h.insert(()=>t.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,r),".basic.label-container g.label"),i.remove(),h):h}const c=h.select(".basic.label-container"),d=(Number(c.attr("width"))||s)??0,u=(Number(c.attr("height"))||n)??0;return d>0&&u>0&&c.attr("stroke-dasharray",`${d} ${u}`),h}async function ng(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=n.width+o,c=n.height+a,d=.2*c,u=-h/2,p=-c/2-d/2,{cssStyles:g}=e,f=op.svg(s),y=Qh(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p+d},{x:-u,y:p+d},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+d}],C=f.polygon(m.map(t=>[t.x,t.y]),y),x=s.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),l.attr("transform",`translate(${u+(e.padding??0)/2-(n.x-(n.left??0))}, ${p+d+(e.padding??0)/2-(n.y-(n.top??0))})`),np(e,x),e.intersect=function(t){return Dp.rect(e,t)},s}async function lg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e),o="neo"===e.look?12:5;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.width?e?.width/2:l.width/2)+(s??0),c=h-o;let d;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{roughness:.2,strokeWidth:2.5}),i=Qh(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*h,r),a=t.circle(0,0,2*c,i);d=n.insert("g",":first-child"),d.attr("class",jh(e.cssClasses)).attr("style",jh(u)),d.node()?.appendChild(o),d.node()?.appendChild(a)}else{d=n.insert("g",":first-child");const t=d.insert("circle",":first-child"),e=d.insert("circle");d.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return np(e,d),e.intersect=function(t){return Ht.info("DoubleCircle intersect",e,h,t),Dp.circle(e,h,t)},n}function hg(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zh(e);e.label="",e.labelStyle=i;const a=t.insert("g").attr("class",lp(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,n=op.svg(a),{nodeBorder:l}=r,h=Qh(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=n.circle(0,0,14,h),d=a.insert(()=>c,":first-child");return d.selectAll("path").attr("style",`fill: ${l} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),np(e,d),e.intersect=function(t){Ht.info("filledCircle intersect",e,{radius:7,point:t});return Dp.circle(e,7,t)},a}Wt(og,"cylinder"),Wt(ag,"drawRect"),Wt(sg,"datastore"),Wt(ng,"dividedRectangle"),Wt(lg,"doublecircle"),Wt(hg,"filledCircle");async function cg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=(e?.width?e?.width:n.width)+(a??0),c=e?.height?e?.height:h+n.height,d=[{x:0,y:-c},{x:c,y:-c},{x:c/2,y:0}],{cssStyles:u}=e,p=op.svg(s),g=Qh(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=hp(d),y=p.path(f,g),m=s.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=h,e.height=c,np(e,m),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return Ht.info("Triangle intersect",e,d,t),Dp.polygon(e,d,t)},s}function dg(t,e,{dir:r,config:{state:i,themeVariables:o}}){const{nodeStyles:a}=Zh(e);e.label="";const s=t.insert("g").attr("class",lp(e)).attr("id",e.domId??e.id),{cssStyles:n}=e;let l=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));const c=-1*l/2,d=-1*h/2,u=op.svg(s),p=Qh(e,{stroke:o.lineColor,fill:o.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=u.rectangle(c,d,l,h,p),f=s.insert(()=>g,":first-child");n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),a&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",a),np(e,f);const y=i?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return Dp.rect(e,t)},s}async function ug(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*o,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:n}=await ap(t,e,lp(e)),l=(e?.width?e?.width:Math.max(15,n.width))+2*o,h=(e?.height?e?.height:Math.max(10,n.height))+2*a,c=h/2,{cssStyles:d}=e,u=op.svg(s),p=Qh(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-h/2},{x:l/2-c,y:-h/2},...dp(-l/2+c,0,c,50,90,270),{x:l/2-c,y:h/2},{x:-l/2,y:h/2}],f=hp(g),y=u.path(f,p),m=s.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),np(e,m),e.intersect=function(t){Ht.info("Pill intersect",e,{radius:c,point:t});return Dp.polygon(e,g,t)},s}Wt(cg,"flippedTriangle"),Wt(dg,"forkJoin"),Wt(ug,"halfRoundedRectangle");var pg=Wt((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function gg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e),o="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,n="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/o;e.width=(e?.width??0)-2*t-n,e.height=(e.height??0)-s}const{shapeSvg:l,bbox:h}=await ap(t,e,lp(e)),c=(e?.height?e?.height:h.height)+s,d=c/o,u=(e?.width?e?.width:h.width)+2*d+n,p=[{x:d,y:0},{x:u-d,y:0},{x:u,y:-c/2},{x:u-d,y:-c},{x:d,y:-c},{x:0,y:-c/2}];let g;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=op.svg(l),r=Qh(e,{}),i=pg(0,0,u,c,d),o=t.path(i,r);g=l.insert(()=>o,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),f&&g.attr("style",f)}else g=jp(l,u,c,p);return i&&g.attr("style",i),e.width=u,e.height=c,np(e,g),e.intersect=function(t){return Dp.polygon(e,p,t)},l}async function fg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.label="",e.labelStyle=r;const{shapeSvg:o}=await ap(t,e,lp(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:n}=e,l=op.svg(o),h=Qh(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],d=hp(c),u=l.path(d,h),p=o.insert(()=>u,":first-child");return p.attr("class","basic label-container outer-path"),n&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",n),i&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-s/2})`),np(e,p),e.intersect=function(t){Ht.info("Pill intersect",e,{points:c});return Dp.polygon(e,c,t)},o}async function yg(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await ap(t,e,"icon-shape default"),u="t"===e.pos,p=n,g=n,{nodeBorder:f}=r,{stylesMap:y}=Vh(e),m=-g/2,C=-p/2,x=e.label?8:0,k=op.svg(h),b=Qh(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const w=k.rectangle(m,C,g,p,b),S=Math.max(g,c.width),T=p+c.height+x,B=k.rectangle(-S/2,-T/2,S,T,{...b,fill:"transparent",stroke:"none"}),v=h.insert(()=>w,":first-child"),_=h.insert(()=>B);if(e.icon){const t=h.append("g");t.html(`<g>${await qd(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${u?c.height/2+x/2-o/2-s:-c.height/2-x/2-o/2-s})`),t.attr("style",`color: ${y.get("stroke")??f};`)}return d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-T/2:T/2-c.height})`),v.attr("transform",`translate(0,${u?c.height/2+x/2:-c.height/2-x/2})`),np(e,_),e.intersect=function(t){if(Ht.info("iconSquare intersect",e,t),!e.label)return Dp.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=u?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+x},{x:r+g/2,y:i-o/2+c.height+x},{x:r+g/2,y:i+o/2},{x:r-g/2,y:i+o/2},{x:r-g/2,y:i-o/2+c.height+x},{x:r-c.width/2,y:i-o/2+c.height+x}]:[{x:r-g/2,y:i-o/2},{x:r+g/2,y:i-o/2},{x:r+g/2,y:i-o/2+p},{x:r+c.width/2,y:i-o/2+p},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+p},{x:r-g/2,y:i-o/2+p}];return Dp.polygon(e,a,t)},h}async function mg(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:d}=await ap(t,e,"icon-shape default"),u=e.label?8:0,p="t"===e.pos,{nodeBorder:g,mainBkg:f}=r,{stylesMap:y}=Vh(e),m=op.svg(h),C=Qh(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const x=y.get("fill");C.stroke=x??f;const k=h.append("g");e.icon&&k.html(`<g>${await qd(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const b=k.node().getBBox(),w=b.width,S=b.height,T=b.x,B=b.y,v=Math.max(w,S)*Math.SQRT2+40,_=m.circle(0,0,v,C),F=Math.max(v,c.width),L=v+c.height+u,M=m.rectangle(-F/2,-L/2,F,L,{...C,fill:"transparent",stroke:"none"}),A=h.insert(()=>_,":first-child"),$=h.insert(()=>M);return k.attr("transform",`translate(${-w/2-T},${p?c.height/2+u/2-S/2-B:-c.height/2-u/2-S/2-B})`),k.attr("style",`color: ${y.get("stroke")??g};`),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),A.attr("transform",`translate(0,${p?c.height/2+u/2:-c.height/2-u/2})`),np(e,$),e.intersect=function(t){Ht.info("iconSquare intersect",e,t);return Dp.rect(e,t)},h}async function Cg(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await ap(t,e,"icon-shape default"),p="t"===e.pos,g=n+2*d,f=n+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=Vh(e),x=-f/2,k=-g/2,b=e.label?8:0,w=op.svg(h),S=Qh(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=C.get("fill");S.stroke=T??m;const B=w.path(mp(x,k,f,g,5),S),v=Math.max(f,c.width),_=g+c.height+b,F=w.rectangle(-v/2,-_/2,v,_,{...S,fill:"transparent",stroke:"none"}),L=h.insert(()=>B,":first-child").attr("class","icon-shape2"),M=h.insert(()=>F);if(e.icon){const t=h.append("g");t.html(`<g>${await qd(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${p?c.height/2+b/2-o/2-s:-c.height/2-b/2-o/2-s})`),t.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+b/2:-c.height/2-b/2})`),np(e,M),e.intersect=function(t){if(Ht.info("iconSquare intersect",e,t),!e.label)return Dp.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return Dp.polygon(e,a,t)},h}async function xg(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=Zh(e);e.labelStyle=o;const a=e.assetHeight??48,s=e.assetWidth??48,n=Math.max(a,s),l=i?.wrappingWidth;e.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:d,label:u}=await ap(t,e,"icon-shape default"),p="t"===e.pos,g=n+2*d,f=n+2*d,{nodeBorder:y,mainBkg:m}=r,{stylesMap:C}=Vh(e),x=-f/2,k=-g/2,b=e.label?8:0,w=op.svg(h),S=Qh(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=C.get("fill");S.stroke=T??m;const B=w.path(mp(x,k,f,g,.1),S),v=Math.max(f,c.width),_=g+c.height+b,F=w.rectangle(-v/2,-_/2,v,_,{...S,fill:"transparent",stroke:"none"}),L=h.insert(()=>B,":first-child"),M=h.insert(()=>F);if(e.icon){const t=h.append("g");t.html(`<g>${await qd(e.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${p?c.height/2+b/2-o/2-s:-c.height/2-b/2-o/2-s})`),t.attr("style",`color: ${C.get("stroke")??y};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-_/2:_/2-c.height})`),L.attr("transform",`translate(0,${p?c.height/2+b/2:-c.height/2-b/2})`),np(e,M),e.intersect=function(t){if(Ht.info("iconSquare intersect",e,t),!e.label)return Dp.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=p?[{x:r-c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2},{x:r+c.width/2,y:i-o/2+c.height+b},{x:r+f/2,y:i-o/2+c.height+b},{x:r+f/2,y:i+o/2},{x:r-f/2,y:i+o/2},{x:r-f/2,y:i-o/2+c.height+b},{x:r-c.width/2,y:i-o/2+c.height+b}]:[{x:r-f/2,y:i-o/2},{x:r+f/2,y:i-o/2},{x:r+f/2,y:i-o/2+g},{x:r+c.width/2,y:i-o/2+g},{x:r+c.width/2/2,y:i+o/2},{x:r-c.width/2,y:i+o/2},{x:r-c.width/2,y:i-o/2+g},{x:r-f/2,y:i-o/2+g}];return Dp.polygon(e,a,t)},h}async function kg(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const o=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;const{labelStyles:s}=Zh(e);e.labelStyle=s;const n=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const l=Math.max(e.label?n??0:0,e?.assetWidth??o),h="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:l,c="on"===e.constraint?h/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(h,n??0);const{shapeSvg:d,bbox:u,label:p}=await ap(t,e,"image-shape default"),g="t"===e.pos,f=-h/2,y=-c/2,m=e.label?8:0,C=op.svg(d),x=Qh(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=C.rectangle(f,y,h,c,x),b=Math.max(h,u.width),w=c+u.height+m,S=C.rectangle(-b/2,-w/2,b,w,{...x,fill:"none",stroke:"none"}),T=d.insert(()=>k,":first-child"),B=d.insert(()=>S);if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",h),t.attr("height",c),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-h/2},${g?w/2-c:-w/2})`)}return p.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${g?-c/2-u.height/2-m/2:c/2-u.height/2+m/2})`),T.attr("transform",`translate(0,${g?u.height/2+m/2:-u.height/2-m/2})`),np(e,B),e.intersect=function(t){if(Ht.info("iconSquare intersect",e,t),!e.label)return Dp.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=g?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+m},{x:r+h/2,y:i-o/2+u.height+m},{x:r+h/2,y:i+o/2},{x:r-h/2,y:i+o/2},{x:r-h/2,y:i-o/2+u.height+m},{x:r-u.width/2,y:i-o/2+u.height+m}]:[{x:r-h/2,y:i-o/2},{x:r+h/2,y:i-o/2},{x:r+h/2,y:i-o/2+c},{x:r+u.width/2,y:i-o/2+c},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+c},{x:r-h/2,y:i-o/2+c}];return Dp.polygon(e,a,t)},d}async function bg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=Math.max(l.width+2*(s??0),e?.width??0),c=Math.max(l.height+2*(a??0),e?.height??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{}),i=hp(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),p&&u.attr("style",p)}else u=jp(n,h,c,d);return i&&u.attr("style",i),e.width=h,e.height=c,np(e,u),e.intersect=function(t){return Dp.polygon(e,d,t)},n}async function wg(t,e){const{shapeSvg:r,bbox:i,label:o}=await ap(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),np(e,a),e.intersect=function(t){return Dp.rect(e,t)},r}async function Sg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-3*h/6,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{}),i=hp(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=jp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,np(e,u),e.intersect=function(t){return Dp.polygon(e,d,t)},n}async function Tg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{}),i=hp(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=jp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,np(e,u),e.intersect=function(t){return Dp.polygon(e,d,t)},n}function Bg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",lp(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),l=[{x:s,y:0},{x:0,y:n+3.5},{x:s-14,y:n+3.5},{x:0,y:2*n},{x:s,y:n-3.5},{x:14,y:n-3.5}],h=op.svg(o),c=Qh(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=hp(l),u=h.path(d,c),p=o.insert(()=>u,":first-child");return p.attr("class","outer-path"),a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-n})`),np(e,p),e.intersect=function(t){Ht.info("lightningBolt intersect",e,t);return Dp.polygon(e,l,t)},o}Wt(gg,"hexagon"),Wt(fg,"hourglass"),Wt(yg,"icon"),Wt(mg,"iconCircle"),Wt(Cg,"iconRounded"),Wt(xg,"iconSquare"),Wt(kg,"imageSquare"),Wt(bg,"inv_trapezoid"),Wt(wg,"labelRect"),Wt(Sg,"lean_left"),Wt(Tg,"lean_right"),Wt(Bg,"lightningBolt");var vg=Wt((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),_g=Wt((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Fg=Wt((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Lg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-a,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-s-3*r,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:l,label:h}=await ap(t,e,lp(e)),c=(e?.width?e?.width:l.width)+2*a,d=c/2,u=d/(2.5+c/50),p=(e?.height?e?.height:l.height)+u+2*s,g=.1*p;let f;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=op.svg(n),r=_g(0,0,c,p,d,u,g),i=Fg(0,u,c,p,d,u),o=Qh(e,{}),a=t.path(r,o),s=t.path(i,o);n.insert(()=>s,":first-child").attr("class","line"),f=n.insert(()=>a,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{const t=vg(0,0,c,p,d,u,g);f=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",jh(y)).attr("style",i)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-c/2}, ${-(p/2+u)})`),np(e,f),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2+u-(l.y-(l.top??0))})`),e.intersect=function(t){const r=Dp.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-u)){let o=u*u*(1-i*i/(d*d));o>0&&(o=Math.sqrt(o)),o=u-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},n}async function Mg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:l,label:h}=await ap(t,e,lp(e)),c=(e?.width?e?.width:l.width)+2*(a??0),d=(e?.height?e?.height:l.height)+2*(s??0),u="neo"===e.look?d/4:d/8,p=d+u,{cssStyles:g}=e,f=op.svg(n),y=Qh(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-c/2-c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:p/2},...cp(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2},{x:-c/2,y:-p/2},{x:-c/2,y:p/2*1.1},{x:-c/2,y:-p/2}],C=f.polygon(m.map(t=>[t.x,t.y]),y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-d/2+(e.padding??0)-u/2-(l.y-(l.top??0))})`),np(e,x),e.intersect=function(t){return Dp.polygon(e,m,t)},n}async function Ag(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,n="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*n,10),e.height=Math.max((e?.height??0)-2*s-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await ap(t,e,lp(e)),d=(e?.width?e?.width:h.width)+2*a+2*n-2*n,u=(e?.height?e?.height:h.height)+2*s+2*n-2*n,p=-d/2,g=-u/2,{cssStyles:f}=e,y=op.svg(l),m=Qh(e,{}),C=[{x:p-n,y:g+n},{x:p-n,y:g+u+n},{x:p+d-n,y:g+u+n},{x:p+d-n,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g+u-n},{x:p+d+n,y:g+u-n},{x:p+d+n,y:g-n},{x:p+n,y:g-n},{x:p+n,y:g},{x:p,y:g},{x:p,y:g+n}],x=[{x:p,y:g+n},{x:p+d-n,y:g+n},{x:p+d-n,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g},{x:p,y:g}];"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=hp(C);let b=y.path(k,m);const w=hp(x);let S=y.path(w,m);"handDrawn"!==e.look&&(b=up(b),S=up(S));const T=l.insert("g",":first-child");return T.insert(()=>b),T.insert(()=>S),T.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),c.attr("transform",`translate(${-h.width/2-n-(h.x-(h.left??0))}, ${-h.height/2+n-(h.y-(h.top??0))})`),np(e,T),e.intersect=function(t){return Dp.polygon(e,C,t)},l}async function $g(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await ap(t,e,lp(e)),n=e.padding??0,l="neo"===e.look?16:n,h="neo"===e.look?12:n;let c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*l,e.height=(e?.height??0)-3*h);const d=Math.max(a.width,e?.width??0)+2*l,u=Math.max(a.height,e?.height??0)+3*h,p="neo"===e.look?u/4:u/8,g=u+(c?p/2:-p/2),f=-d/2,y=-g/2,m=10,{cssStyles:C}=e,x=cp(f-m,y+g+m,f+d-m,y+g+m,p,.8),k=x?.[x.length-1],b=[{x:f-m,y:y+m},{x:f-m,y:y+g+m},...x,{x:f+d-m,y:k.y-m},{x:f+d,y:k.y-m},{x:f+d,y:k.y-20},{x:f+d+m,y:k.y-20},{x:f+d+m,y:y-m},{x:f+m,y:y-m},{x:f+m,y:y},{x:f,y:y},{x:f,y:y+m}],w=[{x:f,y:y+m},{x:f+d-m,y:y+m},{x:f+d-m,y:k.y-m},{x:f+d,y:k.y-m},{x:f+d,y:y},{x:f,y:y}],S=op.svg(o),T=Qh(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=hp(b),v=S.path(B,T),_=hp(w),F=S.path(_,T),L=o.insert(()=>v,":first-child");return L.insert(()=>F),L.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-a.width/2-m-(a.x-(a.left??0))}, ${-a.height/2+m-p/2-(a.y-(a.top??0))})`),np(e,L),e.intersect=function(t){return Dp.polygon(e,b,t)},o}async function Eg(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zh(e);e.labelStyle=i;e.useHtmlLabels||vr(mr())||(e.centerLabel=!0);const{shapeSvg:a,bbox:s,label:n}=await ap(t,e,lp(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),h=Math.max(s.height+2*(e.padding??0),e?.height??0),c=-l/2,d=-h/2,{cssStyles:u}=e,p=op.svg(a),g=Qh(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=p.rectangle(c,d,l,h,g),y=a.insert(()=>f,":first-child");return y.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),n.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),np(e,y),e.intersect=function(t){return Dp.rect(e,t)},a}Wt(Lg,"linedCylinder"),Wt(Mg,"linedWaveEdgedRect"),Wt(Ag,"multiRect"),Wt($g,"multiWaveEdgedRectangle"),Wt(Eg,"note");var Og=Wt((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ig(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await ap(t,e,lp(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=op.svg(o),r=Qh(e,{}),i=Og(0,0,s),a=t.path(i,r);l=o.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),h&&l.attr("style",h)}else l=jp(o,s,s,n),l.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&l.attr("style",i),np(e,l),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=Dp.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},o}async function qg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?21:o??0,s="neo"===e.look?12:o??0,{shapeSvg:n,bbox:l,label:h}=await ap(t,e,lp(e)),c=-((e?.width??l.width)+("neo"===e.look?2*a:a))/2,d=-((e?.height??l.height)+("neo"===e.look?2*s:s))/2,u=d/2,p=[{x:c+u,y:d},{x:c,y:0},{x:c+u,y:-d},{x:-c,y:-d},{x:-c,y:d}],{cssStyles:g}=e,f=op.svg(n),y=Qh(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=hp(p),C=f.path(m,y),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(${-u/2},0)`),h.attr("transform",`translate(${-u/2-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),np(e,x),e.intersect=function(t){return Dp.polygon(e,p,t)},n}async function Dg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);let o;e.labelStyle=r,o=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),s=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=e.description,h=e.label,c=await yp(n,h,e.labelStyle,!0,!0);let d={width:0,height:0};if(vr(wi())){const t=c.children[0],e=Zo(c);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}Ht.info("Text 2",l);const u=l||[],p=c.getBBox(),g=await yp(n,Array.isArray(u)?u.join("<br/>"):u,e.labelStyle,!0,!0),f=g.children[0],y=Zo(g);d=f.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const m=(e.padding||0)/2;Zo(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+m+5)+")"),Zo(c).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-m+3)+")");const C=d.width+(e.padding||0),x=d.height+(e.padding||0),k=-d.width/2-m,b=-d.height/2-m;let w,S;if("handDrawn"===e.look){const t=op.svg(a),r=Qh(e,{}),i=t.path(mp(k,b,C,x,e.rx||0),r),o=t.line(-d.width/2-m,-d.height/2-m+p.height+m,d.width/2+m,-d.height/2-m+p.height+m,r);S=a.insert(()=>(Ht.debug("Rough node insert CXC",i),o),":first-child"),w=a.insert(()=>(Ht.debug("Rough node insert CXC",i),i),":first-child")}else w=s.insert("rect",":first-child"),S=s.insert("line"),w.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-m).attr("y",-d.height/2-m).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),S.attr("class","divider").attr("x1",-d.width/2-m).attr("x2",d.width/2+m).attr("y1",-d.height/2-m+p.height+m).attr("y2",-d.height/2-m+p.height+m);return np(e,w),e.intersect=function(t){return Dp.rect(e,t)},a}async function Pg(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return ag(t,e,{rx:i,ry:i,labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}Wt(Ig,"question"),Wt(qg,"rect_left_inv_arrow"),Wt(Dg,"rectWithTitle"),Wt(Pg,"roundedRect");async function zg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0,{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=(e?.width??n.width)+2*o+("neo"===e.look?8:16),c=(e?.height??n.height)+2*a,d=h-8,u=c,p=8-h/2,g=-c/2,{cssStyles:f}=e,y=op.svg(s),m=Qh(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:g},{x:p+d,y:g},{x:p+d,y:g+u},{x:p-8,y:g+u},{x:p-8,y:g},{x:p,y:g},{x:p,y:g+u}],x=y.polygon(C.map(t=>[t.x,t.y]),m),k=s.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path").attr("style",jh(f)),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),f&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${4-n.width/2-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),np(e,k),e.intersect=function(t){return Dp.rect(e,t)},s}async function Rg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:n,bbox:l,label:h}=await ap(t,e,lp(e)),c=(e?.width?e?.width:l.width)+2*a,d=1.5*((e?.height?e?.height:l.height)+2*s)/1.5,u=-c/2,p=-d/2,{cssStyles:g}=e,f=op.svg(n),y=Qh(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:u,y:p},{x:u,y:p+d},{x:u+c,y:p+d},{x:u+c,y:p-d/2}],C=hp(m),x=f.path(C,y),k=n.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-c/2+(e.padding??0)-(l.x-(l.left??0))}, ${-d/4+(e.padding??0)-(l.y-(l.top??0))})`),np(e,k),e.intersect=function(t){return Dp.polygon(e,m,t)},n}async function Wg(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return ag(t,e,{rx:0,ry:0,labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function jg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?20:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=l.height+("neo"===e.look?2*s:s),c=l.width+h/4+("neo"===e.look?2*a:a),d=h/2,{cssStyles:u}=e,p=op.svg(n),g=Qh(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const f=[{x:-c/2+d,y:-h/2},{x:c/2-d,y:-h/2},...dp(-c/2+d,0,d,50,90,270),{x:c/2-d,y:h/2},...dp(c/2-d,0,d,50,270,450)],y=hp(f),m=p.path(y,g),C=n.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),np(e,C),e.intersect=function(t){return Dp.polygon(e,f,t)},n}async function Ng(t,e){return ag(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5})}function Hg(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:o}=Zh(e);e.labelStyle=i;const{cssStyles:a}=e,{lineColor:s,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const c=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),d=op.svg(c),u=Qh(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const p=d.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),g=n??l,f=5*(e.width??0)/14,y=d.circle(0,0,f,{...u,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>p,":first-child");if(m.insert(()=>y),"handDrawn"!==e.look&&m.attr("class","outer-path"),a&&m.selectAll("path").attr("style",a),o&&m.selectAll("path").attr("style",o),e.width<25&&h&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";m.attr("style",`filter:url(#${r})`)}return np(e,m),e.intersect=function(t){return Dp.circle(e,(e.width??0)/2,t)},c}function Yg(t,e,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:o}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=op.svg(a).circle(0,0,e.width,Uh(i));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return np(e,s),e.intersect=function(t){return Dp.circle(e,(e.width??7)/2,t)},a}Wt(zg,"shadedProcess"),Wt(Rg,"slopedRect"),Wt(Wg,"squareRect"),Wt(jg,"stadium"),Wt(Ng,"state"),Wt(Hg,"stateEnd"),Wt(Yg,"stateStart");async function Ug(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e?.padding??8,a="neo"===e.look?28:o,s="neo"===e.look?12:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.width??l.width)+16+a,c=(e?.height??l.height)+s,d=h-16,u=c,p=-h/2,g=-c/2,f=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{}),i=t.rectangle(p,g,d+16,u,r),o=t.line(p+8,g,p+8,g+u,r),a=t.line(p+8+d,g,p+8+d,g+u,r);n.insert(()=>o,":first-child"),n.insert(()=>a,":first-child");const s=n.insert(()=>i,":first-child"),{cssStyles:l}=e;s.attr("class","basic label-container").attr("style",jh(l)),np(e,s)}else{const t=jp(n,d,u,f);i&&t.attr("style",i),np(e,t)}return e.intersect=function(t){return Dp.polygon(e,f,t)},n}Wt(Ug,"subroutine");async function Vg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.height?e?.height:l.height)+2*s,c=.2*h,d=.2*h,u=(e?.width?e?.width:l.width)+2*a+c-c,p=h,g=-u/2,f=-p/2,{cssStyles:y}=e,m=op.svg(n),C=Qh(e,{}),x=[{x:g-c/2,y:f},{x:g+u+c/2,y:f},{x:g+u+c/2,y:f+p},{x:g-c/2,y:f+p}],k=[{x:g+u-c/2,y:f+p},{x:g+u+c/2,y:f+p},{x:g+u+c/2,y:f+p-d}];"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const b=hp(x),w=m.path(b,C),S=hp(k),T=m.path(S,{...C,fillStyle:"solid"}),B=n.insert(()=>T,":first-child");return B.insert(()=>w,":first-child"),B.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),np(e,B),e.intersect=function(t){return Dp.polygon(e,x,t)},n}async function Xg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await ap(t,e,lp(e)),n=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),h=l/8,c=.2*n,d=.2*l,u=l+h,{cssStyles:p}=e,g=op.svg(o),f=Qh(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:u/2},...cp(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,h,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],m=-n/2+n/2*.1,C=-u/2-.4*d,x=[{x:m+n-c,y:1.3*(C+l)},{x:m+n,y:C+l-d},{x:m+n,y:.9*(C+l)},...cp(m+n,1.25*(C+l),m+n-c,1.3*(C+l),.02*-l,.5)],k=hp(y),b=g.path(k,f),w=hp(x),S=g.path(w,{...f,fillStyle:"solid"}),T=o.insert(()=>S,":first-child");return T.insert(()=>b,":first-child"),T.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-n/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),np(e,T),e.intersect=function(t){return Dp.polygon(e,y,t)},o}async function Gg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await ap(t,e,lp(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),n=Math.max(a.height+(e.padding??0),e?.height||0),l=-s/2,h=-n/2,c=o.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",s).attr("height",n),np(e,c),e.intersect=function(t){return Dp.rect(e,t)},o}Wt(Vg,"taggedRect"),Wt(Xg,"taggedWaveEdgedRectangle"),Wt(Gg,"text");var Zg=Wt((t,e,r,i,o,a)=>`M${t},${e}\n a${o},${a} 0,0,1 0,${-i}\n l${r},0\n a${o},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Qg=Wt((t,e,r,i,o,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Kg=Wt((t,e,r,i,o,a)=>[`M${t+r/2},${-i/2}`,`a${o},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Jg(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?12:o/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-a,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-a-3*r,e.width<10&&(e.width=10)}const{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=(e.height?e.height:n.height)+a,c=h/2,d=c/(2.5+h/50),u=(e.width?e.width:n.width)+d+a,{cssStyles:p}=e;let g;if("handDrawn"===e.look){const t=op.svg(s),r=Qg(0,0,u,h,d,c),i=Kg(0,0,u,h,d,c),o=t.path(r,Qh(e,{})),a=t.path(i,Qh(e,{fill:"none"}));g=s.insert(()=>a,":first-child"),g=s.insert(()=>o,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const t=Zg(0,0,u,h,d,c);g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",jh(p)).attr("style",i),g.attr("class","basic label-container outer-path"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-u/2}, ${h/2} )`),l.attr("transform",`translate(${-n.width/2-d-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),np(e,g),e.intersect=function(t){const r=Dp.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-d)){let o=d*d*(1-i*i/(c*c));0!=o&&(o=Math.sqrt(Math.abs(o))),o=d-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},s}async function tf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a=(e.look,o),s="neo"===e.look?2*o:o,{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.height??l.height)+a,c=(e?.width??l.width)+s,d=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let u;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=op.svg(n),r=Qh(e,{}),i=hp(d),o=t.path(i,r);u=n.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),p&&u.attr("style",p)}else u=jp(n,c,h,d);return i&&u.attr("style",i),e.width=c,e.height=h,np(e,u),e.intersect=function(t){return Dp.polygon(e,d,t)},n}async function ef(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+2*s,{cssStyles:d}=e,u=op.svg(n),p=Qh(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-h/2*.8,y:-c/2},{x:h/2*.8,y:-c/2},{x:h/2,y:-c/2*.6},{x:h/2,y:c/2},{x:-h/2,y:c/2},{x:-h/2,y:-c/2*.6}],f=hp(g),y=u.path(f,p),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),np(e,m),e.intersect=function(t){return Dp.polygon(e,g,t)},n}Wt(Jg,"tiltedCylinder"),Wt(tf,"trapezoid"),Wt(ef,"trapezoidalPentagon");async function rf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=nr(wi().flowchart?.htmlLabels),c=(e?.width?e?.width:n.width)+a,d=e?.height?e?.height:c+n.height,u=[{x:0,y:0},{x:d,y:0},{x:d/2,y:-d}],{cssStyles:p}=e,g=op.svg(s),f=Qh(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=hp(u),m=g.path(y,f),C=s.insert(()=>m,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",p),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),e.width=c,e.height=d,np(e,C),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(e.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return Ht.info("Triangle intersect",e,u,t),Dp.polygon(e,u,t)},s}async function of(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;let n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:l,bbox:h,label:c}=await ap(t,e,lp(e)),d=(e?.width?e?.width:h.width)+2*(a??0),u=(e?.height?e?.height:h.height)+2*(s??0),p="neo"===e.look?u/4:u/8,g=u+(n?p:-p),{cssStyles:f}=e,y=14-d,m=y>0?y/2:0,C=op.svg(l),x=Qh(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const k=[{x:-d/2-m,y:g/2},...cp(-d/2-m,g/2,d/2+m,g/2,p,.8),{x:d/2+m,y:-g/2},{x:-d/2-m,y:-g/2}],b=hp(k),w=C.path(b,x),S=l.insert(()=>w,":first-child");return S.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))},${-u/2+(e.padding??0)-p-(h.y-(h.top??0))})`),np(e,S),e.intersect=function(t){return Dp.polygon(e,k,t)},l}async function af(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?20:o;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:n,bbox:l}=await ap(t,e,lp(e)),h=(e?.width?e?.width:l.width)+2*a,c=(e?.height?e?.height:l.height)+s,d=c/8,u=c+2*d,{cssStyles:p}=e,g=op.svg(n),f=Qh(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=[{x:-h/2,y:u/2},...cp(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...cp(h/2,-u/2,-h/2,-u/2,d,-1)],m=hp(y),C=g.path(m,f),x=n.insert(()=>C,":first-child");return x.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),np(e,x),e.intersect=function(t){return Dp.polygon(e,y,t)},n}Wt(rf,"triangle"),Wt(of,"waveEdgedRectangle"),Wt(af,"waveRectangle");var sf=10;async function nf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-sf,10),e.height=Math.max((e?.height??0)-2*a-sf,10));const{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=(e?.width?e?.width:n.width)+2*o+sf,c=(e?.height?e?.height:n.height)+2*a+sf,d=h-sf,u=c-sf,p=-d/2,g=-u/2,{cssStyles:f}=e,y=op.svg(s),m=Qh(e,{}),C=[{x:p-sf,y:g-sf},{x:p-sf,y:g+u},{x:p+d,y:g+u},{x:p+d,y:g-sf}],x=`M${p-sf},${g-sf} L${p+d},${g-sf} L${p+d},${g+u} L${p-sf},${g+u} L${p-sf},${g-sf}\n M${p-sf},${g} L${p+d},${g}\n M${p},${g-sf} L${p},${g+u}`;"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const k=y.path(x,m),b=s.insert(()=>k,":first-child");return b.attr("transform","translate(5, 5)"),b.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",f),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${-n.width/2+5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),np(e,b),e.intersect=function(t){return Dp.polygon(e,C,t)},s}Wt(nf,"windowPane");var lf=new Set(["redux-color","redux-dark-color"]),hf=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function cf(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:o}=mr(),{rowEven:a,rowOdd:s,nodeBorder:n,borderColorArray:l}=o;if("handDrawn"===e.look){const{themeVariables:r}=mr(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await cf(t,o)}const h=mr();e.useHtmlLabels=h.htmlLabels;let c=h.er?.diagramPadding??10,d=h.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:p,nodeStyles:g}=Zh(e);if(0===r.attributes.length&&e.label){const o={rx:0,ry:0,labelPaddingX:c,labelPaddingY:1.5*c};Lh(e.label,h)+2*o.labelPaddingX<h.er.minEntityWidth&&(e.width=h.er.minEntityWidth);const a=await ag(t,e,o);if(null!=i&&lf.has(i)){const t=r.colorIndex??0;a.attr("data-color-id","color-"+t%l.length)}if(!nr(h.htmlLabels)){const t=a.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return a}h.htmlLabels||(c*=1.25,d*=1.25);let f=lp(e);f||(f="node default");const y=t.insert("g").attr("class",f).attr("id",e.domId||e.id),m=await df(y,e.label??"",h,0,0,["name"],p);m.height+=d;let C=0;const x=[],k=[];let b=0,w=0,S=0,T=0,B=!0,v=!0;for(const t of r.attributes){const e=await df(y,t.type,h,0,C,["attribute-type"],p);b=Math.max(b,e.width+c);const r=await df(y,t.name,h,0,C,["attribute-name"],p);w=Math.max(w,r.width+c);const i=await df(y,t.keys.join(),h,0,C,["attribute-keys"],p);S=Math.max(S,i.width+c);const o=await df(y,t.comment,h,0,C,["attribute-comment"],p);T=Math.max(T,o.width+c);const a=Math.max(e.height,r.height,i.height,o.height)+d;k.push({yOffset:C,rowHeight:a}),C+=a}let _=4;S<=c&&(B=!1,S=0,_--),T<=c&&(v=!1,T=0,_--);const F=y.node().getBBox();if(m.width+2*c-(b+w+S+T)>0){const t=m.width+2*c-(b+w+S+T);b+=t/_,w+=t/_,S>0&&(S+=t/_),T>0&&(T+=t/_)}const L=b+w+S+T,M=op.svg(y),A=Qh(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let $=0;k.length>0&&($=k.reduce((t,e)=>t+(e?.rowHeight??0),0));const E=Math.max(F.width+2*c,e?.width||0,L),O=Math.max(($??0)+m.height,e?.height||0),I=-E/2,q=-O/2;if(y.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=Zo(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=b:i.attr("class").includes("attribute-keys")?a+=b+w:i.attr("class").includes("attribute-comment")&&(a+=b+w+S))}i.attr("transform",`translate(${I+c/2+a}, ${s+q+m.height+d/2})`)}),y.select(".name").attr("transform","translate("+-m.width/2+", "+(q+d/2)+")"),null!=i&&lf.has(i)){const t=r.colorIndex??0;y.attr("data-color-id","color-"+t%l.length)}const D=M.rectangle(I,q,E,O,A),P=y.insert(()=>D,":first-child").attr("class","outer-path").attr("style",u.join(""));x.push(0);for(const[t,e]of k.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=M.rectangle(I,m.height+q+e?.yOffset,E,e?.rowHeight,{...A,fill:r?a:s,stroke:n});y.insert(()=>i,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const z=1e-4;let R=uf(I,m.height+q,E+I,m.height+q,z),W=M.polygon(R.map(t=>[t.x,t.y]),A);if(y.insert(()=>W).attr("class","divider"),R=uf(b+I,m.height+q,b+I,O+q,z),W=M.polygon(R.map(t=>[t.x,t.y]),A),y.insert(()=>W).attr("class","divider"),B){const t=b+w+I;R=uf(t,m.height+q,t,O+q,z),W=M.polygon(R.map(t=>[t.x,t.y]),A),y.insert(()=>W).attr("class","divider")}if(v){const t=b+w+S+I;R=uf(t,m.height+q,t,O+q,z),W=M.polygon(R.map(t=>[t.x,t.y]),A),y.insert(()=>W).attr("class","divider")}for(const t of x){const e=m.height+q+t;R=uf(I,e,E+I,e,z),W=M.polygon(R.map(t=>[t.x,t.y]),A),y.insert(()=>W).attr("class","divider")}if(np(e,P),g&&"handDrawn"!==e.look)if(null!=i&&hf.has(i))y.selectAll("path").attr("style",g);else{const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");y.selectAll("path").attr("style",e??""),y.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return Dp.rect(e,t)},y}async function df(t,e,r,i=0,o=0,a=[],s=""){const n=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",s);e!==jr(e)&&(e=(e=jr(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await ru(n,e,{width:Lh(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let t=l.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let h=l.getBBox();if(nr(r.htmlLabels)){const t=l.children[0];t.style.textAlign="start";const e=Zo(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return h}function uf(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function pf(t,e,r,i,o=r.class.padding??12){const a=i?0:3,s=t.insert("g").attr("class",lp(e)).attr("id",e.domId||e.id);let n=null,l=null,h=null,c=null,d=0,u=0,p=0;if(n=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await gf(n,{text:`«${t}»`},0);d=n.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await gf(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();u=g.height,h=s.insert("g").attr("class","members-group text");let f=0;for(const t of e.members){f+=await gf(h,t,f,[t.parseClassifier()])+a}p=h.node().getBBox().height,p<=0&&(p=o/2),c=s.insert("g").attr("class","methods-group text");let y=0;for(const t of e.methods){y+=await gf(c,t,y,[t.parseClassifier()])+a}let m=s.node().getBBox();if(null!==n){const t=n.node().getBBox();n.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${d})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}async function gf(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),a=mr();let s="useHtmlLabels"in e?e.useHtmlLabels:nr(a.htmlLabels)??!0,n="";n="text"in e?e.text:e.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),Xr(n)&&(s=!0);const l=await ru(o,Bi(Rh(n)),{width:Lh(n,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let h,c=1;if(s){const t=l.children[0],e=Zo(l);c=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(c+=t.innerHTML.split("<mrow>").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===n.replace(/<img[^>]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}Wt(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{i.includes("font-weight: bolder")&&Zo(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const t=l.children[0];if(""===l.textContent||l.textContent.includes("&gt")){t.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim();" "===n[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),h=l.getBBox()}return o.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}async function ff(t,e){const r=wi(),{themeVariables:i}=r,{useGradient:o}=i,a=r.class.padding??12,s=a,n=e.useHtmlLabels??nr(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await pf(t,e,r,n,s),{labelStyles:d,nodeStyles:u}=Zh(e);e.labelStyle=d,e.cssStyles=l.styles||"";const p=l.styles?.join(";")||u||"";e.cssStyles||(e.cssStyles=p.replaceAll("!important","").split(";"));const g=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,f=op.svg(h),y=Qh(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=Math.max(e.width??0,c.width);let C=Math.max(e.height??0,c.height);const x=(e.height??0)>c.height;0===l.members.length&&0===l.methods.length?C+=s:l.members.length>0&&0===l.methods.length&&(C+=2*s);const k=-m/2,b=-C/2;let w=g?2*a:0===l.members.length&&0===l.methods.length?-a:0;x&&(w=2*a);const S=f.rectangle(k-a,b-a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0),m+2*a,C+2*a+w,y),T=h.insert(()=>S,":first-child");T.attr("class","basic label-container outer-path");const B=T.node().getBBox(),v=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,_=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,F=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,L=(v+_+b+a-(b-a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0)))/2;if(h.selectAll(".text").each((t,e,i)=>{const o=Zo(i[e]),c=o.attr("transform");let d=0;if(c){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);t&&(d=parseFloat(t[2]))}let u=d+b+a-(g?a:0===l.members.length&&0===l.methods.length?-a/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max(F,s/2);u=x?Math.max(L,v+_+t+b+2*s+a)+2*s:v+_+t+b+4*s+a}0===l.members.length&&0===l.methods.length&&r.class?.hideEmptyMembersBox&&(u=l.annotations.length>0?d-s:d),n||(u-=4);let p=k;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(p=-o.node()?.getBBox().width/2||0,h.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),o.attr("transform",`translate(${p}, ${u})`)}),l.members.length>0||l.methods.length>0||g){const t=v+_+b+a,r=f.line(B.x,t,B.x+B.width,t+.001,y);h.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",p)}if(g||l.members.length>0||l.methods.length>0){const t=v+_+F+b+2*s+a,r=f.line(B.x,x?Math.max(L,t):t,B.x+B.width,(x?Math.max(L,t):t)+.001,y);h.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",p)}if("handDrawn"!==l.look&&h.selectAll("path").attr("style",p),T.select(":nth-child(2)").attr("style",p),h.selectAll(".divider").select("path").attr("style",p),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",p),!n){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(p);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}else if(d){const e=t.exec(d);if(e){const t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}}}return np(e,T),e.intersect=function(t){return Dp.rect(e,t)},h}async function yf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const o=e,a=e,s="verifyMethod"in e,n=lp(e),{themeVariables:l}=wi(),{borderColorArray:h,requirementEdgeLabelBackground:c}=l,d=t.insert("g").attr("class",n).attr("id",e.domId??e.id);let u;u=s?await mf(d,`&lt;&lt;${o.type}&gt;&gt;`,0,e.labelStyle):await mf(d,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let p=u;const g=await mf(d,o.name,p,e.labelStyle+"; font-weight: bold;");if(p+=g+20,s){p+=await mf(d,""+(o.requirementId?`ID: ${o.requirementId}`:""),p,e.labelStyle);p+=await mf(d,""+(o.text?`Text: ${o.text}`:""),p,e.labelStyle);p+=await mf(d,""+(o.risk?`Risk: ${o.risk}`:""),p,e.labelStyle),await mf(d,""+(o.verifyMethod?`Verification: ${o.verifyMethod}`:""),p,e.labelStyle)}else{p+=await mf(d,""+(a.type?`Type: ${a.type}`:""),p,e.labelStyle),await mf(d,""+(a.docRef?`Doc Ref: ${a.docRef}`:""),p,e.labelStyle)}const f=(d.node()?.getBBox().width??200)+20,y=(d.node()?.getBBox().height??200)+20,m=-f/2,C=-y/2,x=op.svg(d),k=Qh(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const b=x.rectangle(m,C,f,y,k),w=d.insert(()=>b,":first-child");if(w.attr("class","basic label-container outer-path").attr("style",i),h?.length){const t=e.colorIndex??0;d.attr("data-color-id","color-"+t%h.length)}if(d.selectAll(".label").each((t,e,r)=>{const i=Zo(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const n=s-y/2;let l=m+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${n+20})`)}),p>u+g+20){const t=C+u+g+20;let r;if("neo"===e.look){const e=.001,i=[[m,t],[m+f,t],[m+f,t+e],[m,t+e]];r=x.polygon(i,k)}else r=x.line(m,t,m+f,t,k);d.insert(()=>r).attr("class","divider")}return np(e,w),e.intersect=function(t){return Dp.rect(e,t)},i&&"handDrawn"!==e.look&&(c||h?.length)&&d.selectAll("path").attr("style",i),d}async function mf(t,e,r,i=""){if(""===e)return 0;const o=t.insert("g").attr("class","label").attr("style",i),a=wi(),s=a.htmlLabels??!0,n=await ru(o,Bi(Rh(e)),{width:Lh(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const t=n.children[0],e=Zo(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}else{const t=n.children[0];for(const e of t.children)i&&e.setAttribute("style",i);l=n.getBBox(),l.height+=6}return o.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}Wt(cf,"erBox"),Wt(df,"addText"),Wt(uf,"lineToPolygon"),Wt(pf,"textHelper"),Wt(gf,"addText"),Wt(ff,"classBox"),Wt(yf,"requirementBox"),Wt(mf,"addText");var Cf=Wt(t=>{switch(t){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 xf(t,e,{config:r}){const{labelStyles:i,nodeStyles:o}=Zh(e);e.labelStyle=i||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:n,label:l}=await ap(t,e,lp(e)),h=e.padding||10;let c,d="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),c=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,g;({label:p,bbox:g}=c?await sp(c,"ticket"in e&&e.ticket||"",u):await sp(s,"ticket"in e&&e.ticket||"",u));const{label:f,bbox:y}=await sp(s,"assigned"in e&&e.assigned||"",u);e.width=a;const m=e?.width||0,C=Math.max(g.height,y.height)/2,x=Math.max(n.height+20,e?.height||0)+C,k=-m/2,b=-x/2;let w;l.attr("transform","translate("+(h-m/2)+", "+(-C-n.height/2)+")"),p.attr("transform","translate("+(h-m/2)+", "+(-C+n.height/2)+")"),f.attr("transform","translate("+(h+m/2-y.width-20)+", "+(-C+n.height/2)+")");const{rx:S,ry:T}=e,{cssStyles:B}=e;if("handDrawn"===e.look){const t=op.svg(s),r=Qh(e,{}),i=S||T?t.path(mp(k,b,m,x,S||0),r):t.rectangle(k,b,m,x,r);w=s.insert(()=>i,":first-child"),w.attr("class","basic label-container").attr("style",B||null)}else{w=s.insert("rect",":first-child"),w.attr("class","basic label-container __APA__").attr("style",o).attr("rx",S??5).attr("ry",T??5).attr("x",k).attr("y",b).attr("width",m).attr("height",x);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=k+2,i=b+Math.floor((S??0)/2),o=b+x-Math.floor((S??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",Cf(t))}}return np(e,w),e.height=x,e.intersect=function(t){return Dp.rect(e,t)},s}async function kf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await ap(t,e,lp(e)),l=a.width+10*s,h=a.height+8*s,c=.15*l,{cssStyles:d}=e,u=a.width+20,p=a.height+20,g=Math.max(l,u),f=Math.max(h,p);let y;n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);const m=`M0 0 \n a${c},${c} 1 0,0 ${.25*g},${-1*f*.1}\n a${c},${c} 1 0,0 ${.25*g},0\n a${c},${c} 1 0,0 ${.25*g},0\n a${c},${c} 1 0,0 ${.25*g},${.1*f}\n\n a${c},${c} 1 0,0 ${.15*g},${.33*f}\n a${.8*c},${.8*c} 1 0,0 0,${.34*f}\n a${c},${c} 1 0,0 ${-1*g*.15},${.33*f}\n\n a${c},${c} 1 0,0 ${-1*g*.25},${.15*f}\n a${c},${c} 1 0,0 ${-1*g*.25},0\n a${c},${c} 1 0,0 ${-1*g*.25},0\n a${c},${c} 1 0,0 ${-1*g*.25},${-1*f*.15}\n\n a${c},${c} 1 0,0 ${-1*g*.1},${-1*f*.33}\n a${.8*c},${.8*c} 1 0,0 0,${-1*f*.34}\n a${c},${c} 1 0,0 ${.1*g},${-1*f*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=op.svg(o),r=Qh(e,{}),i=t.path(m,r);y=o.insert(()=>i,":first-child"),y.attr("class","basic label-container").attr("style",jh(d))}else y=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return y.attr("transform",`translate(${-g/2}, ${-f/2})`),np(e,y),e.calcIntersect=function(t,e){return Dp.rect(t,e)},e.intersect=function(t){return Ht.info("Bang intersect",e,t),Dp.rect(e,t)},o}async function bf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await ap(t,e,lp(e)),l=a.width+2*s,h=a.height+2*s,c=.15*l,d=.25*l,u=.35*l,p=.2*l,{cssStyles:g}=e;let f;const y=`M0 0 \n a${c},${c} 0 0,1 ${.25*l},${-1*l*.1}\n a${u},${u} 1 0,1 ${.4*l},${-1*l*.1}\n a${d},${d} 1 0,1 ${.35*l},${.2*l}\n\n a${c},${c} 1 0,1 ${.15*l},${.35*h}\n a${p},${p} 1 0,1 ${-1*l*.15},${.65*h}\n\n a${d},${c} 1 0,1 ${-1*l*.25},${.15*l}\n a${u},${u} 1 0,1 ${-1*l*.5},0\n a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}\n\n a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}\n a${p},${p} 1 0,1 ${.1*l},${-1*h*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=op.svg(o),r=Qh(e,{}),i=t.path(y,r);f=o.insert(()=>i,":first-child"),f.attr("class","basic label-container").attr("style",jh(g))}else f=o.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-h/2})`),np(e,f),e.calcIntersect=function(t,e){return Dp.rect(t,e)},e.intersect=function(t){return Ht.info("Cloud intersect",e,t),Dp.rect(e,t)},o}async function wf(t,e){const{labelStyles:r,nodeStyles:i}=Zh(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await ap(t,e,lp(e)),l=a.width+8*s,h=a.height+2*s,c="neo"===e.look?`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-5}\n H${-l/2}\n Z\n `:`\n M${-l/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${l-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${-(l-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",c);return o.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>n.node()),np(e,d),e.calcIntersect=function(t,e){return Dp.rect(t,e)},e.intersect=function(t){return Dp.rect(e,t)},o}async function Sf(t,e){return Yp(t,e,{padding:e.padding??0})}Wt(xf,"kanbanItem"),Wt(kf,"bang"),Wt(bf,"cloud"),Wt(wf,"defaultMindmapNode"),Wt(Sf,"mindmapCircle");var Tf=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:jg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Ug},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:og},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:sg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Yp},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:kf},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:bf},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ig},{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:Tg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Sg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tf},{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:bg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:lg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Gg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Np},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Yg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Hg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:dg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:fg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Gp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Qp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Jp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Bg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:of},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ug},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Jg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ng},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:rf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:nf},{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:ef},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:cg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Rg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:$g},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ag},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Wp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Vp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Xg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Vg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:af},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:qg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Mg}],Bf=Wt(()=>{const t={state:Ng,choice:Hp,note:Eg,rectWithTitle:Dg,labelRect:wg,iconSquare:xg,iconCircle:mg,icon:yg,iconRounded:Cg,imageSquare:kg,anchor:Pp,kanbanItem:xf,mindmapCircle:Sf,defaultMindmapNode:wf,classBox:ff,erBox:cf,requirementBox:yf},e=[...Object.entries(t),...Tf.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function vf(t){return t in Bf}Wt(vf,"isValidShape");var _f=new Map;async function Ff(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Bf[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),o=await a(i,e,r)}else o=await a(t,e,r),i=o;return i.attr("data-look",jh(e.look)),e.tooltip&&o.attr("title",e.tooltip),_f.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}Wt(Ff,"insertNode");var Lf=Wt((t,e)=>{_f.set(e.id,t)},"setNodeElem"),Mf=Wt(()=>{_f.clear()},"clear"),Af=Wt(t=>{const e=_f.get(t.id);Ht.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode"),$f=Wt((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&If(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&If(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"addEdgeMarkers"),Ef={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}},Of=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],If=Wt((t,e,r,i,o,a,s=!1,n)=>{const l=Ef[r],h=l&&Of.includes(l.type);if(!l)return void Ht.warn(`Unknown arrow type: ${r}`);const c=`${o}_${a}-${l.type}${"start"===e?"Start":"End"}${s&&h?"-margin":""}`;if(n&&""!==n.trim()){const r=`${c}_${n.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(c);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",n),l.fill&&t.setAttribute("fill",n)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${c})`)},"addEdgeMarker"),qf=Wt(t=>"string"==typeof t?t:wi()?.flowchart?.curve,"resolveEdgeCurveType"),Df=new Map,Pf=new Map,zf=Wt(()=>{Df.clear(),Pf.clear()},"clear"),Rf=Wt(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),Wf=Wt(async(t,e)=>{const r=wi();let i=vr(r);const{labelStyles:o}=Zh(e);e.labelStyle=o;const a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",e.id),n="markdown"===e.labelType,l=await ru(t,e.label,{style:Rf(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:void 0},r);s.node().appendChild(l),Ht.info("abc82",e,e.labelType);let h,c=l.getBBox(),d=c;if(i){const t=l.children[0],e=Zo(l);c=t.getBoundingClientRect(),d=c,e.attr("width",c.width),e.attr("height",c.height)}else{const t=Zo(l).select("text").node();t&&"function"==typeof t.getBBox&&(d=t.getBBox())}if(s.attr("transform",Yl(d,i)),Df.set(e.id,a),e.width=c.width,e.height=c.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await yp(o,e.startLabelLeft,Rf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=Zo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",Yl(s,i)),Pf.get(e.id)||Pf.set(e.id,{}),Pf.get(e.id).startLeft=r,jf(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await yp(o,e.startLabelRight,Rf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=Zo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",Yl(s,i)),Pf.get(e.id)||Pf.set(e.id,{}),Pf.get(e.id).startRight=r,jf(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await yp(r,e.endLabelLeft,Rf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=Zo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",Yl(s,i)),Pf.get(e.id)||Pf.set(e.id,{}),Pf.get(e.id).endLeft=r,jf(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await yp(r,e.endLabelRight,Rf(e.labelStyle)||"",!1,!1);h=a;let s=a.getBBox();if(i){const t=a.children[0],e=Zo(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",Yl(s,i)),Pf.get(e.id)||Pf.set(e.id,{}),Pf.get(e.id).endRight=r,jf(h,e.endLabelRight)}return l},"insertEdgeLabel");function jf(t,e){vr(wi())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}Wt(jf,"setTerminalWidth");var Nf=Wt((t,e)=>{Ht.debug("Moving label abc88 ",t.id,t.label,Df.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=wi(),{subGraphTitleTotalMargin:o}=Hh(i);if(t.label){const i=Df.get(t.id);let a=t.x,s=t.y;if(r){const i=Ph.calcLabelPosition(r);Ht.debug("Moving label "+t.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,s=i.y)}i.attr("transform",`translate(${a}, ${s+o/2})`)}if(t.startLabelLeft){const e=Pf.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=Ph.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=Pf.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=Ph.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=Pf.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=Ph.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=Pf.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=Ph.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),Hf=Wt((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,n=t.height/2;return o>=s||a>=n},"outsideNode"),Yf=Wt((t,e,r)=>{Ht.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2;let n=r.x<e.x?s-a:s+a;const l=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-o:o-l-e.y;n=c*t/h;const i={x:r.x<e.x?r.x+n:r.x-c+n,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===n&&(i.x=e.x,i.y=e.y),0===c&&(i.x=e.x),0===h&&(i.y=e.y),Ht.debug(`abc89 top/bottom calc, Q ${h}, q ${t}, R ${c}, r ${n}`,i),i}{n=r.x<e.x?e.x-s-i:i-s-e.x;let t=h*n/c,o=r.x<e.x?r.x+c-n:r.x-c+n,a=r.y<e.y?r.y+t:r.y-t;return Ht.debug(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${n}`,{_x:o,_y:a}),0===n&&(o=e.x,a=e.y),0===c&&(o=e.x),0===h&&(a=e.y),{x:o,y:a}}},"intersection"),Uf=Wt((t,e)=>{Ht.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(Ht.info("abc88 checking point",t,e),Hf(e,t)||o)Ht.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=Yf(e,i,t);Ht.debug("abc88 inside",t,i,a),Ht.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?Ht.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),Ht.debug("returning points",r),r},"cutPathAtIntersect");function Vf(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],a=t[i],s=t[i+1];(o.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5||o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}Wt(Vf,"extractCornerPoints");var Xf=Wt(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),Gf=Wt(function(t){const{cornerPointPositions:e}=Vf(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],a=t[i],s=Xf(e,a,5),n=Xf(o,a,5),l=n.x-s.x,h=n.y-s.y;r.push(s);const c=2*Math.sqrt(2);let d={x:a.x,y:a.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){Ht.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;d=a.x===s.x?{x:l<0?s.x-t+c:s.x+t-c,y:h<0?s.y-c:s.y+c}:{x:l<0?s.x-c:s.x+c,y:h<0?s.y-t+c:s.y+t-c}}else Ht.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(d,n)}else r.push(t[i]);return r},"fixCorners"),Zf=Wt((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4);return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),Qf=Wt(function(t,e,r,i,o,a,s,n=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=wi();let f=e.points,x=!1;const k=o;var S=a;const T=[];for(const t in e.cssCompiledStyles)Gh(t)||T.push(e.cssCompiledStyles[t]);Ht.debug("UIO intersect check",e.points,S.x,k.x),S.intersect&&k.intersect&&!n&&(f=f.slice(1,e.points.length-1),f.unshift(k.intersect(f[0])),Ht.debug("Last point UIO",e.start,"--\x3e",e.end,f[f.length-1],S,S.intersect(f[f.length-1])),f.push(S.intersect(f[f.length-1])));const B=btoa(JSON.stringify(f));e.toCluster&&(Ht.info("to cluster abc88",r.get(e.toCluster)),f=Uf(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(Ht.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(f,null,2)),f=Uf(f.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let v=f.filter(t=>!Number.isNaN(t.y));const _=qf(e.curve);"rounded"!==_&&(v=Gf(v));let F=y;switch(_){case"linear":case"rounded":F=y;break;case"basis":default:F=b;break;case"cardinal":F=mt;break;case"bumpX":F=C;break;case"bumpY":F=m;break;case"catmullRom":F=Tt;break;case"monotoneX":F=g;break;case"monotoneY":F=p;break;case"natural":F=u;break;case"step":F=d;break;case"stepAfter":F=c;break;case"stepBefore":F=h}const{x:L,y:M}=Kl(e),A=w().x(L).y(M).curve(F);let $,E;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let O="rounded"===_?Kf(ty(v,e),5):A(v);const I=Array.isArray(e.style)?e.style:[e.style];let q=I.find(t=>t?.startsWith("stroke:")),D="";e.animate&&(D="edge-animation-fast"),e.animation&&(D="edge-animation-"+e.animation);let P=!1;if("handDrawn"===e.look){const r=op.svg(t);Object.assign([],v);$+=" transition",E=Zo(r.path(O,{roughness:.3,seed:l})).select("path").attr("id",`${s}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",I?I.reduce((t,e)=>t+";"+e,""):"");let i=E.attr("d");E.attr("d",i),t.node().appendChild(E.node())}else{const r=T.join(";"),i=I?I.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(I?I.reduce((t,e)=>t+";"+e,""):"");E=t.append("path").attr("d",O).attr("id",`${s}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(D?" "+D:"")).attr("style",o),q=o.match(/stroke:([^;]+)/)?.[1],P=!0===e.animate||!!e.animation||r.includes("animation");const a=E.node(),n="function"==typeof a.getTotalLength?a.getTotalLength():0,l=Vl[e.arrowTypeStart]||0,h=Vl[e.arrowTypeEnd]||0;if("neo"===e.look&&!P){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?Zf(n,l,h):`0 ${l} ${n-l-h} ${h}`}; stroke-dashoffset: 0;`;E.attr("style",t+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",e.id),E.attr("data-points",B),E.attr("data-look",jh(e.look)),e.showPoints&&v.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let z="";(wi().flowchart.arrowMarkerAbsolute||wi().state.arrowMarkerAbsolute)&&(z=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,z=z.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Ht.info("arrowTypeStart",e.arrowTypeStart),Ht.info("arrowTypeEnd",e.arrowTypeEnd);$f(E,e,z,s,i,!P&&"neo"===e?.look,q);const R=f[Math.floor(f.length/2)];Ph.isLabelCoordinateInPath(R,E.attr("d"))||(x=!0);let W={};return x&&(W.updatedPath=f),W.originalPath=e.points,W},"insertEdge");function Kf(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let a=0;a<i;a++){const s=t[a],n=t[a-1],l=t[a+1];if(0===a)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const t=s.x-n.x,i=s.y-n.y,a=l.x-s.x,h=l.y-s.y,c=Math.hypot(t,i),d=Math.hypot(a,h);if(c<o||d<o){r+=`L${s.x},${s.y}`;continue}const u=t/c,p=i/c,g=a/d,f=h/d,y=u*g+p*f,m=Math.max(-1,Math.min(1,y)),C=Math.acos(m);if(C<o||Math.abs(Math.PI-C)<o){r+=`L${s.x},${s.y}`;continue}const x=Math.min(e/Math.sin(C/2),c/2,d/2),k=s.x-u*x,b=s.y-p*x,w=s.x+g*x,S=s.y+f*x;r+=`L${k},${b}`,r+=`Q${s.x},${s.y} ${w},${S}`}}return r}function Jf(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function ty(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&Ul[e.arrowTypeStart]){const i=Ul[e.arrowTypeStart],o=t[0],a=t[1],{angle:s}=Jf(o,a),n=i*Math.cos(s),l=i*Math.sin(s);r[0].x=o.x+n,r[0].y=o.y+l}const i=t.length;if(i>=2&&Ul[e.arrowTypeEnd]){const o=Ul[e.arrowTypeEnd],a=t[i-1],s=t[i-2],{angle:n}=Jf(s,a),l=o*Math.cos(n),h=o*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-h}return r}Wt(Kf,"generateRoundedPath"),Wt(Jf,"calculateDeltaAndAngle"),Wt(ty,"applyMarkerOffsetsToPoints");var ey=Wt((t,e,r,i)=>{e.forEach(e=>{Ty[e](t,r,i)})},"insertMarkers"),ry=Wt((t,e,r)=>{Ht.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),iy=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),oy=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),ay=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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"),sy=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),ny=Wt((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).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"),ly=Wt((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),hy=Wt((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),cy=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),dy=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{transitionColor:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),uy=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),py=Wt((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),gy=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),fy=Wt((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),yy=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),my=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Cy=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),xy=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),ky=Wt((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),by=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),wy=Wt((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),Sy=Wt((t,e,r)=>{const i=mr(),{themeVariables:o}=i,{strokeWidth:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Ty={extension:ry,composition:iy,aggregation:oy,dependency:ay,lollipop:sy,point:ny,circle:ly,cross:hy,barb:cy,barbNeo:dy,only_one:uy,zero_or_one:py,one_or_more:gy,zero_or_more:fy,only_one_neo:yy,zero_or_one_neo:my,one_or_more_neo:Cy,zero_or_more_neo:xy,requirement_arrow:ky,requirement_contains:wy,requirement_arrow_neo:by,requirement_contains_neo:Sy},By=ey,vy={common:Kr,getConfig:mr,insertCluster:Bp,insertEdge:Qf,insertEdgeLabel:Wf,insertMarkers:By,insertNode:Ff,interpolateToCurve:hh,labelHelper:ap,log:Ht,positionEdgeLabel:Nf},_y={},Fy=Wt(t=>{for(const e of t)_y[e.name]=e},"registerLayoutLoaders");Wt(()=>{Fy([{name:"dagre",loader:Wt(async()=>await import("./dagre-BM42HDAG-CAK4m8n4.js"),"loader")},{name:"cose-bilkent",loader:Wt(async()=>await import("./cose-bilkent-S5V4N54A-DvdEsdgg.js"),"loader")}])},"registerDefaultLayoutLoaders")();var Ly=Wt(async(t,e)=>{if(!(t.layoutAlgorithm in _y))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const r=_y[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:a}=t.config,{useGradient:s,gradientStart:n,gradientStop:l}=a,h=e.attr("id");if(e.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")),e.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")),s){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(t,e,vy,{algorithm:r.algorithm})},"render"),My=Wt((t="",{fallback:e="dagre"}={})=>{if(t in _y)return t;if(e in _y)return Ht.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),Ay="comm",$y="rule",Ey="decl",Oy="@keyframes",Iy="@layer",qy=Math.abs,Dy=String.fromCharCode;function Py(t){return t.trim()}function zy(t,e,r){return t.replace(e,r)}function Ry(t,e){return 0|t.charCodeAt(e)}function Wy(t,e,r){return t.slice(e,r)}function jy(t){return t.length}function Ny(t){return t.length}function Hy(t,e){return e.push(t),t}var Yy=1,Uy=1,Vy=0,Xy=0,Gy=0,Zy="";function Qy(t,e,r,i,o,a,s,n){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:Yy,column:Uy,length:s,return:"",siblings:n}}function Ky(){return Gy=Xy>0?Ry(Zy,--Xy):0,Uy--,10===Gy&&(Uy=1,Yy--),Gy}function Jy(){return Gy=Xy<Vy?Ry(Zy,Xy++):0,Uy++,10===Gy&&(Uy=1,Yy++),Gy}function tm(){return Ry(Zy,Xy)}function em(){return Xy}function rm(t,e){return Wy(Zy,t,e)}function im(t){switch(t){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 om(t){return Py(rm(Xy-1,nm(91===t?t+2:40===t?t+1:t)))}function am(t){for(;(Gy=tm())&&Gy<33;)Jy();return im(t)>2||im(Gy)>3?"":" "}function sm(t,e){for(;--e&&Jy()&&!(Gy<48||Gy>102||Gy>57&&Gy<65||Gy>70&&Gy<97););return rm(t,em()+(e<6&&32==tm()&&32==Jy()))}function nm(t){for(;Jy();)switch(Gy){case t:return Xy;case 34:case 39:34!==t&&39!==t&&nm(Gy);break;case 40:41===t&&nm(t);break;case 92:Jy()}return Xy}function lm(t,e){for(;Jy()&&t+Gy!==57&&(t+Gy!==84||47!==tm()););return"/*"+rm(e,Xy-1)+"*"+Dy(47===t?t:Jy())}function hm(t){for(;!im(tm());)Jy();return rm(t,Xy)}function cm(t){return function(t){return Zy="",t}(dm("",null,null,null,[""],t=function(t){return Yy=Uy=1,Vy=jy(Zy=t),Xy=0,[]}(t),0,[0],t))}function dm(t,e,r,i,o,a,s,n,l){for(var h=0,c=0,d=s,u=0,p=0,g=0,f=1,y=1,m=1,C=0,x=0,k="",b=o,w=a,S=i,T=k;y;)switch(g=x,x=Jy()){case 40:108!=g&&58==Ry(T,d-1)?(C++,T+="("):T+=om(x);break;case 41:C--,T+=")";break;case 34:case 39:case 91:T+=om(x);break;case 9:case 10:case 13:case 32:if(C>0){T+=Dy(x);break}T+=am(g);break;case 92:T+=sm(em()-1,7);continue;case 47:switch(tm()){case 42:case 47:Hy(pm(lm(Jy(),em()),e,r,l),l),5!=im(g||1)&&5!=im(tm()||1)||!jy(T)||" "===Wy(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*f:n[h++]=jy(T)*m;case 125*f:case 59:case 0:if(C>0&&x){T+=Dy(x);break}switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(T=zy(T,/\f/g,"")),p>0&&(jy(T)-d||0===f)&&Hy(p>32?gm(T+";",i,r,d-1,l):gm(zy(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(Hy(S=um(T,e,r,h,c,o,n,k,b=[],w=[],d,a),a),123===x)if(0===c)dm(T,e,S,S,b,a,d,n,w);else{switch(u){case 99:if(110===Ry(T,3))break;case 108:if(97===Ry(T,2))break;default:c=0;case 100:case 109:case 115:}c?dm(t,S,S,i&&Hy(um(t,S,S,0,0,o,n,k,o,b=[],d,w),w),o,w,d,n,i?b:w):dm(T,S,S,S,[""],w,0,n,w)}}h=c=p=0,f=m=1,k=T="",d=s;break;case 58:d=1+jy(T),p=g;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==Ky())continue;switch(T+=Dy(x),x*f){case 38:m=c>0?1:(T+="\f",-1);break;case 44:if(C>0)break;n[h++]=(jy(T)-1)*m,m=1;break;case 64:45===tm()&&(T+=om(Jy())),u=tm(),c=d=jy(k=T+=hm(em())),x++;break;case 45:45===g&&2==jy(T)&&(f=0)}}return a}function um(t,e,r,i,o,a,s,n,l,h,c,d){for(var u=o-1,p=0===o?a:[""],g=Ny(p),f=0,y=0,m=0;f<i;++f)for(var C=0,x=Wy(t,u+1,u=qy(y=s[f])),k=t;C<g;++C)(k=Py(y>0?p[C]+" "+x:zy(x,/&\f/g,p[C])))&&(l[m++]=k);return Qy(t,e,r,0===o?$y:n,l,h,c,d)}function pm(t,e,r,i){return Qy(t,e,r,Ay,Dy(Gy),Wy(t,2,-2),0,i)}function gm(t,e,r,i,o){return Qy(t,e,r,Ey,Wy(t,0,i),Wy(t,i+1,-1),i,o)}function fm(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function ym(t,e,r,i){switch(t.type){case Iy:if(t.children.length)break;case"@import":case"@namespace":case Ey:return t.return=t.return||t.value;case Ay:return"";case Oy:return t.return=t.value+"{"+fm(t.children,i)+"}";case $y:if(!jy(t.value=t.props.join(",")))return""}return jy(r=fm(t.children,i))?t.return=t.value+"{"+r+"}":""}var mm={id:"c4",detector:Wt(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./c4Diagram-AAUBKEIU-6qLMKLHQ.js");return{id:"c4",diagram:t}},"loader")},Cm="flowchart",xm=Wt((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),km={id:Cm,detector:xm,loader:Wt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-Dy8OXjRp.js");return{id:Cm,diagram:t}},"loader")},bm="flowchart-v2",wm=Wt((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),Sm={id:bm,detector:wm,loader:Wt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-Dy8OXjRp.js");return{id:bm,diagram:t}},"loader")},Tm={id:"er",detector:Wt(t=>/^\s*erDiagram/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./erDiagram-TEJ5UH35-WtYIPbRt.js");return{id:"er",diagram:t}},"loader")},Bm="gitGraph",vm={id:Bm,detector:Wt(t=>/^\s*gitGraph/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-PVQCEYII-B46XqY2u.js");return{id:Bm,diagram:t}},"loader")},_m="gantt",Fm={id:_m,detector:Wt(t=>/^\s*gantt/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./ganttDiagram-6RSMTGT7-EDpgQ3lf.js");return{id:_m,diagram:t}},"loader")},Lm="info",Mm={id:Lm,detector:Wt(t=>/^\s*info/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./infoDiagram-5YYISTIA-CY7j_JnA.js");return{id:Lm,diagram:t}},"loader")},Am={id:"pie",detector:Wt(t=>/^\s*pie/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./pieDiagram-4H26LBE5-Kk7ovyMv.js");return{id:"pie",diagram:t}},"loader")},$m="quadrantChart",Em={id:$m,detector:Wt(t=>/^\s*quadrantChart/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./quadrantDiagram-W4KKPZXB-DiMCYk-T.js");return{id:$m,diagram:t}},"loader")},Om="xychart",Im={id:Om,detector:Wt(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./xychartDiagram-2RQKCTM6-BYf7oiMn.js");return{id:Om,diagram:t}},"loader")},qm="requirement",Dm={id:qm,detector:Wt(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./requirementDiagram-4Y6WPE33-DZBXo7zD.js");return{id:qm,diagram:t}},"loader")},Pm="sequence",zm={id:Pm,detector:Wt(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./sequenceDiagram-3UESZ5HK-D76l6Rd4.js");return{id:Pm,diagram:t}},"loader")},Rm="class",Wm=Wt((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),jm={id:Rm,detector:Wm,loader:Wt(async()=>{const{diagram:t}=await import("./classDiagram-4FO5ZUOK-D95DEj2F.js");return{id:Rm,diagram:t}},"loader")},Nm="classDiagram",Hm=Wt((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),Ym={id:Nm,detector:Hm,loader:Wt(async()=>{const{diagram:t}=await import("./classDiagram-v2-Q7XG4LA2-D95DEj2F.js");return{id:Nm,diagram:t}},"loader")},Um="state",Vm=Wt((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),Xm={id:Um,detector:Vm,loader:Wt(async()=>{const{diagram:t}=await import("./stateDiagram-AJRCARHV-CesXVS_W.js");return{id:Um,diagram:t}},"loader")},Gm="stateDiagram",Zm=Wt((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),Qm={id:Gm,detector:Zm,loader:Wt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-BHNVJYJU-DqWSoWM6.js");return{id:Gm,diagram:t}},"loader")},Km="journey",Jm={id:Km,detector:Wt(t=>/^\s*journey/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./journeyDiagram-JHISSGLW-DdFME4_e.js");return{id:Km,diagram:t}},"loader")},tC=Wt((t,e,r)=>{Ht.debug("rendering svg for syntax error\n");const i=Ua(e),o=i.append("g");i.attr("viewBox","0 0 2412 512"),ei(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),eC={draw:tC},rC=eC,iC={db:{},renderer:eC,parser:{parse:Wt(()=>{},"parse")}},oC="flowchart-elk",aC=Wt((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),sC={id:oC,detector:aC,loader:Wt(async()=>{const{diagram:t}=await import("./flowDiagram-I6XJVG4X-Dy8OXjRp.js");return{id:oC,diagram:t}},"loader")},nC="timeline",lC={id:nC,detector:Wt(t=>/^\s*timeline/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./timeline-definition-PNZ67QCA-CDn8cvlq.js");return{id:nC,diagram:t}},"loader")},hC="mindmap",cC={id:hC,detector:Wt(t=>/^\s*mindmap/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./mindmap-definition-RKZ34NQL-jgbgERyG.js");return{id:hC,diagram:t}},"loader")},dC="kanban",uC={id:dC,detector:Wt(t=>/^\s*kanban/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./kanban-definition-UN3LZRKU-DVq4JZWr.js");return{id:dC,diagram:t}},"loader")},pC="sankey",gC={id:pC,detector:Wt(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./sankeyDiagram-5OEKKPKP-CJp9Tkkm.js");return{id:pC,diagram:t}},"loader")},fC="packet",yC={id:fC,detector:Wt(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./diagram-LMA3HP47-DS2R1tWs.js");return{id:fC,diagram:t}},"loader")},mC="radar",CC={id:mC,detector:Wt(t=>/^\s*radar-beta/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./diagram-2AECGRRQ-CSqNVFb4.js");return{id:mC,diagram:t}},"loader")},xC="block",kC={id:xC,detector:Wt(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./blockDiagram-GPEHLZMM-YEwStt0q.js");return{id:xC,diagram:t}},"loader")},bC="treeView",wC={id:bC,detector:Wt(t=>/^\s*treeView-beta/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./diagram-5GNKFQAL-BWzWwjF5.js");return{id:bC,diagram:t}},"loader")},SC="architecture",TC={id:SC,detector:Wt(t=>/^\s*architecture/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./architectureDiagram-3BPJPVTR-EGo92Js8.js");return{id:SC,diagram:t}},"loader")},BC="eventmodeling",vC={id:BC,detector:Wt(t=>/^\s*eventmodeling/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./diagram-KO2AKTUF-D2-JeanM.js");return{id:BC,diagram:t}},"loader")},_C="ishikawa",FC={id:_C,detector:Wt(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-YF4QCWOH-D6o2nQHa.js");return{id:_C,diagram:t}},"loader")},LC="venn",MC={id:LC,detector:Wt(t=>/^\s*venn-beta/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./vennDiagram-CIIHVFJN-DlZtAp7y.js");return{id:LC,diagram:t}},"loader")},AC="treemap",$C={id:AC,detector:Wt(t=>/^\s*treemap/.test(t),"detector"),loader:Wt(async()=>{const{diagram:t}=await import("./diagram-OG6HWLK6-DTxKf0Qv.js");return{id:AC,diagram:t}},"loader")},EC="wardley-beta",OC=Wt(t=>/^\s*wardley-beta/i.test(t),"detector"),IC={id:EC,detector:OC,loader:Wt(async()=>{const{diagram:t}=await import("./wardleyDiagram-YWT4CUSO-DG4_85tj.js");return{id:EC,diagram:t}},"loader")},qC=!1,DC=Wt(()=>{qC||(qC=!0,Li("error",iC,t=>"error"===t.toLowerCase().trim()),Li("---",{db:{clear:Wt(()=>{},"clear")},styles:{},renderer:{draw:Wt(()=>{},"draw")},parser:{parse:Wt(()=>{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:Wt(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Se(sC,cC,TC),Se(mm,uC,Ym,jm,Tm,Fm,Mm,Am,Dm,zm,Sm,km,lC,vm,Qm,Xm,Jm,Em,gC,yC,Im,kC,vC,wC,CC,FC,$C,MC,IC))},"addDiagrams"),PC=Wt(async()=>{Ht.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(be).map(async([t,{detector:e,loader:r}])=>{if(r)try{Mi(t)}catch{try{const{diagram:t,id:i}=await r();Li(i,t,e)}catch(e){throw Ht.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete be[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){Ht.error(`Failed to load ${t.length} external diagrams`);for(const e of t)Ht.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function zC(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function RC(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}Wt(zC,"setA11yDiagramInfo"),Wt(RC,"addSVGa11yTitleDescription");var WC=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{Wt(this,"Diagram")}static async fromText(e,r={}){const i=mr(),o=we(e,i);e=zh(e)+"\n";try{Mi(o)}catch{const t=Be(o);if(!t)throw new ke(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();Li(e,r)}const{db:a,parser:s,renderer:n,init:l}=Mi(o);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(o,e,a,s,n)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},jC=[],NC=Wt(()=>{jC.forEach(t=>{t()}),jC=[]},"attachFunctions"),HC=Wt(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function YC(t){const e=t.match(me);if(!e)return{text:t,metadata:{}};let r=Hl(e[1],{schema:Nl})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}Wt(YC,"extractFrontMatter");var UC=Wt(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),VC=Wt(t=>{const{text:e,metadata:r}=YC(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),XC=Wt(t=>{const e=Ph.detectInit(t)??{},r=Ph.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:nh(t),directive:e}},"processDirectives");function GC(t){const e=UC(t),r=VC(e),i=XC(r.text),o=Dh(r.config,i.directive);return{code:t=HC(i.text),title:r.title,config:o}}function ZC(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}Wt(GC,"preprocessDiagram"),Wt(ZC,"toBase64");var QC=["foreignobject"],KC=["dominant-baseline"];function JC(t){const e=GC(t);return kr(),xr(e.config??{}),e}async function tx(t,e){DC();try{const{code:e,config:r}=JC(t);return{diagramType:(await ux(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}Wt(JC,"processAndSetConfigs"),Wt(tx,"parse");var ex=Wt((t,e,r=[])=>`.${t} ${e} ${ar(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),rx=Wt((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=vr(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{ut(t.styles)||i.forEach(e=>{r.insertRule(ex(t.id,e,t.styles),r.cssRules.length)}),ut(t.textStyles)||r.insertRule(ex(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=oi(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+oi(r)},"createCssStyles"),ix=Wt((t,e)=>fm(cm(`${t}{${e}}`),function(t){var e=Ny(t);return function(r,i,o,a){for(var s="",n=0;n<e;n++)s+=t[n](r,i,o,a)||"";return s}}([Wt(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===Oy)return;e.props=e.props.map(e=>e.startsWith(t)?e:`${t} ${e}`)}else if(e.type.startsWith("@")){[...["@media","@supports",Iy,"@scope","@container","@starting-style"],Oy].includes(e.type)||(Ht.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=Ay)}},"addNamespace"),ym])),"compileCSS"),ox=Wt((t,e,r,i)=>{const o=rx(t,r),a=ni(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return ix(i,a)},"createUserStyles"),ax=Wt((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Rh(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),sx=Wt((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${ZC(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),nx=Wt((t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function lx(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Wt(lx,"sandboxedIframe");var hx=Wt((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),cx=Wt(async function(t,r,i){DC();const o=JC(r);r=o.code;const a=mr();Ht.debug(a),r.length>(a?.maxTextSize??5e4)&&(r="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const s=`#${t}`,n="i"+t,l="#"+n,h="d"+t,c="#"+h,d=Wt(()=>{const t=Zo(p?l:c).node();t&&"remove"in t&&t.remove()},"removeTempElements");let u=Zo(document.body);const p="sandbox"===a.securityLevel,g="loose"===a.securityLevel,f=a.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),p){const t=lx(Zo(i),n);u=Zo(t.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Zo(i);nx(u,t,h,`font-family: ${f}`,"http://www.w3.org/1999/xlink")}else{if(hx(document,t,h,n),p){const t=lx(Zo(document.body),n);u=Zo(t.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Zo("body");nx(u,t,h)}let y,m;try{y=await WC.fromText(r,{title:o.title})}catch(t){if(a.suppressErrorRendering)throw d(),t;y=await WC.fromText("error"),m=t}const C=u.select(c).node(),x=y.type,k=C.firstChild,b=k.firstChild,w=y.renderer.getClasses?.(r,y),S=ox(a,x,w,s),T=document.createElement("style");T.innerHTML=S,k.insertBefore(T,b);try{await y.renderer.draw(r,t,"11.15.0",y)}catch(e){throw a.suppressErrorRendering?d():rC.draw(r,t,"11.15.0"),e}const B=u.select(`${c} svg`),v=y.db.getAccTitle?.(),_=y.db.getAccDescription?.();px(x,B,v,_),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=u.select(c).node().innerHTML;if(Ht.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=ax(F,p,nr(a.arrowMarkerAbsolute)),p){const t=u.select(c+" svg").node();F=sx(F,t)}else g||(F=e.sanitize(F,{ADD_TAGS:QC,ADD_ATTR:KC,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(NC(),m)throw m;return d(),{diagramType:x,svg:F,bindFunctions:y.db.bindFunctions}},"render");function dx(t={}){const e=_e({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),pr(e),e?.theme&&e.theme in Ke?e.themeVariables=Ke[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ke.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?ur(e):fr();Yt(r.logLevel),DC()}Wt(dx,"initialize");var ux=Wt((t,e={})=>{const{code:r}=GC(t);return WC.fromText(r,e)},"getDiagramFromText");function px(t,e,r,i){zC(e,t),RC(e,r,i,e.attr("id"))}Wt(px,"addA11yInfo");var gx=Object.freeze({render:cx,parse:tx,getDiagramFromText:ux,initialize:dx,getConfig:mr,setConfig:yr,getSiteConfig:fr,updateSiteConfig:gr,reset:Wt(()=>{kr()},"reset"),globalReset:Wt(()=>{kr(sr)},"globalReset"),defaultConfig:sr});Yt(mr().logLevel),kr(mr());var fx=Wt((t,e,r)=>{Ht.warn(t),Oh(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),yx=Wt(async function(t={querySelector:".mermaid"}){try{await mx(t)}catch(e){if(Oh(e)&&Ht.error(e.str),Fx.parseError&&Fx.parseError(e),!t.suppressErrors)throw Ht.error("Use the suppressErrors option to suppress these errors"),e}},"run"),mx=Wt(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=gx.getConfig();let o;if(Ht.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}Ht.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(Ht.debug("Start On Load: "+i?.startOnLoad),gx.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new Ph.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const n=[];for(const e of Array.from(o)){if(Ht.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${a.next()}`;s=e.innerHTML,s=Ld(Ph.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=Ph.detectInit(s);i&&Ht.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:o}=await _x(r,s,e);e.innerHTML=i,t&&await t(r),o&&o(e)}catch(t){fx(t,n,Fx.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),Cx=Wt(function(t){gx.initialize(t)},"initialize"),xx=Wt(async function(t,e,r){Ht.warn("mermaid.init is deprecated. Please use run instead."),t&&Cx(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await yx(i)},"init"),kx=Wt(async(t,{lazyLoad:e=!0}={})=>{DC(),Se(...t),!1===e&&await PC()},"registerExternalDiagrams"),bx=Wt(function(){if(Fx.startOnLoad){const{startOnLoad:t}=gx.getConfig();t&&Fx.run().catch(t=>Ht.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",bx,!1);var wx=Wt(function(t){Fx.parseError=t},"setParseErrorHandler"),Sx=[],Tx=!1,Bx=Wt(async()=>{if(!Tx){for(Tx=!0;Sx.length>0;){const t=Sx.shift();if(t)try{await t()}catch(t){Ht.error("Error executing queue",t)}}Tx=!1}},"executeQueue"),vx=Wt(async(t,e)=>new Promise((r,i)=>{const o=Wt(()=>new Promise((o,a)=>{gx.parse(t,e).then(t=>{o(t),r(t)},t=>{Ht.error("Error parsing",t),Fx.parseError?.(t),a(t),i(t)})}),"performCall");Sx.push(o),Bx().catch(i)}),"parse"),_x=Wt((t,e,r)=>new Promise((i,o)=>{const a=Wt(()=>new Promise((a,s)=>{gx.render(t,e,r).then(t=>{a(t),i(t)},t=>{Ht.error("Error parsing",t),Fx.parseError?.(t),s(t),o(t)})}),"performCall");Sx.push(a),Bx().catch(o)}),"render"),Fx={startOnLoad:!0,mermaidAPI:gx,parse:vx,render:_x,init:xx,run:yx,registerExternalDiagrams:kx,registerLayoutLoaders:Fy,initialize:Cx,parseError:void 0,contentLoaded:bx,setParseErrorHandler:wx,detectType:we,registerIconPacks:Ed,getRegisteredDiagramsMetadata:Wt(()=>Object.keys(be).map(t=>({id:t})),"getRegisteredDiagramsMetadata")},Lx=Fx,Mx=Object.freeze({__proto__:null,default:Lx});export{qe as $,O as A,zt as B,se as C,Rh as D,Ti as E,ir as F,eh as G,X as H,G as I,Nl as J,bh as K,mi as L,fi as M,mr as N,wi as O,xi as P,Wh as Q,vr as R,qd as S,Kl as T,Gt as U,My as V,xh as W,Hh as X,_ as Y,rh as Z,jt as _,Wt as a,zr as a0,Br as a1,Xr as a2,Bp as a3,Qf as a4,Wf as a5,Ff as a6,U as a7,V as a8,Y as a9,Zo as aA,Ua as aB,yi as aC,gi as aD,Si as aE,Ci as aF,Lf as aG,q as aH,ri as aI,vi as aJ,L as aK,Zh as aL,E as aM,N as aN,H as aO,W as aP,j as aQ,Md as aR,np as aS,Ph as aT,vh as aU,ce as aa,Gh as ab,B as ac,lt as ad,vf as ae,ue as af,_r as ag,Hl as ah,Ht as ai,I as aj,By as ak,Mx as al,Lx as am,M as an,z as ao,qh as ap,jr as aq,Nf as ar,Af as as,Sh as at,F as au,Ed as av,Ly as aw,Qr as ax,le as ay,Er as az,de as b,$ as c,P as d,D as e,_e as f,op as g,A as h,Gr as i,Ah as j,Fh as k,Lh as l,Dh as m,pi as n,zf as o,vp as p,Mf as q,li as r,Kr as s,Qd as t,Yl as u,Yh as v,ei as w,ru as x,pe as y,R as z};