@cagent/chat-embedding-core 0.0.13 → 0.0.17

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 (322) hide show
  1. package/.env +6 -0
  2. package/README.md +213 -213
  3. package/bun.lock +1548 -1548
  4. package/dist/abnfDiagram-VRR7QNED-3cfb3856.js +1 -0
  5. package/dist/abnfDiagram-VRR7QNED-686410b0.js +1 -0
  6. package/dist/abnfDiagram-VRR7QNED-fb22812d.js +1 -0
  7. package/dist/api/chatRoom.d.ts.map +1 -0
  8. package/dist/arc-24dd4755.js +1 -0
  9. package/dist/arc-5d6257cf.js +1 -0
  10. package/dist/arc-90e71e7e.js +1 -0
  11. package/dist/architecture-TIHT7OUA-a997f441.js +1 -0
  12. package/dist/architecture-TIHT7OUA-faa1f9b3.js +1 -0
  13. package/dist/architectureDiagram-ZJ3FMSHR-87443299.js +1 -0
  14. package/dist/architectureDiagram-ZJ3FMSHR-93988e41.js +1 -0
  15. package/dist/architectureDiagram-ZJ3FMSHR-bde2dd21.js +1 -0
  16. package/dist/blockDiagram-677ZJIJ3-25a94a47.js +1 -0
  17. package/dist/blockDiagram-677ZJIJ3-88bd543c.js +1 -0
  18. package/dist/blockDiagram-677ZJIJ3-c769a3c8.js +1 -0
  19. package/dist/c4Diagram-LMCZKHZV-763880d7.js +1 -0
  20. package/dist/c4Diagram-LMCZKHZV-d7fc839e.js +1 -0
  21. package/dist/c4Diagram-LMCZKHZV-da04a76e.js +1 -0
  22. package/dist/channel-11d3f4bc.js +1 -0
  23. package/dist/channel-534c2e17.js +1 -0
  24. package/dist/channel-c3cf6060.js +1 -0
  25. package/dist/chunk-2Q5K7J3B-2892df89.js +1 -0
  26. package/dist/chunk-2Q5K7J3B-7960ff8e.js +1 -0
  27. package/dist/chunk-2Q5K7J3B-9497bf31.js +1 -0
  28. package/dist/chunk-32BRIVSS-10123eba.js +1 -0
  29. package/dist/chunk-32BRIVSS-10ac68f7.js +1 -0
  30. package/dist/chunk-32BRIVSS-8a8507a2.js +1 -0
  31. package/dist/chunk-5VM5RSS4-36b32f6e.js +1 -0
  32. package/dist/chunk-5VM5RSS4-4b2efd20.js +1 -0
  33. package/dist/chunk-5VM5RSS4-5fc85a49.js +1 -0
  34. package/dist/chunk-EX3LRPZG-36494b87.js +1 -0
  35. package/dist/chunk-EX3LRPZG-6cd1f2fa.js +1 -0
  36. package/dist/chunk-EX3LRPZG-7ac6d0d7.js +1 -0
  37. package/dist/chunk-JWPE2WC7-15a55950.js +1 -0
  38. package/dist/chunk-JWPE2WC7-84faee3d.js +1 -0
  39. package/dist/chunk-JWPE2WC7-e2521b1e.js +1 -0
  40. package/dist/chunk-MOJQB5TN-47f0392f.js +1 -0
  41. package/dist/chunk-MOJQB5TN-5cc2e61b.js +1 -0
  42. package/dist/chunk-MOJQB5TN-ea88675c.js +1 -0
  43. package/dist/chunk-PUDLZKDR-057ec46a.js +1 -0
  44. package/dist/chunk-PUDLZKDR-53309be9.js +1 -0
  45. package/dist/chunk-PUDLZKDR-6de50ada.js +1 -0
  46. package/dist/chunk-RYQCIY6F-06b096c5.js +1 -0
  47. package/dist/chunk-RYQCIY6F-453400cd.js +1 -0
  48. package/dist/chunk-RYQCIY6F-8de649c8.js +1 -0
  49. package/dist/chunk-V7JOEXUC-4083766f.js +1 -0
  50. package/dist/chunk-V7JOEXUC-4e8d7729.js +1 -0
  51. package/dist/chunk-V7JOEXUC-bb2df9b0.js +1 -0
  52. package/dist/chunk-VR4S4FIN-5feb7571.js +1 -0
  53. package/dist/chunk-VR4S4FIN-9df47127.js +1 -0
  54. package/dist/chunk-VR4S4FIN-c4f2681d.js +1 -0
  55. package/dist/chunk-XXDRQBXY-3c9d8bf9.js +1 -0
  56. package/dist/chunk-XXDRQBXY-de00e988.js +1 -0
  57. package/dist/chunk-XXDRQBXY-f923ffed.js +1 -0
  58. package/dist/classDiagram-OUVF2IWQ-5cdf5fe6.js +1 -0
  59. package/dist/classDiagram-OUVF2IWQ-d51bd736.js +1 -0
  60. package/dist/classDiagram-OUVF2IWQ-fc2b54d6.js +1 -0
  61. package/dist/classDiagram-v2-EOCWNBFH-5cdf5fe6.js +1 -0
  62. package/dist/classDiagram-v2-EOCWNBFH-d51bd736.js +1 -0
  63. package/dist/classDiagram-v2-EOCWNBFH-fc2b54d6.js +1 -0
  64. package/dist/components/Badge.d.ts.map +1 -0
  65. package/dist/components/Bot.d.ts.map +1 -0
  66. package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
  67. package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
  68. package/dist/components/Toast.d.ts.map +1 -0
  69. package/dist/components/TypingBubble.d.ts.map +1 -0
  70. package/dist/components/avatars/Avatar.d.ts.map +1 -0
  71. package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
  72. package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
  73. package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
  74. package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
  75. package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
  76. package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
  77. package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
  78. package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
  79. package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
  80. package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
  81. package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
  82. package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
  83. package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
  84. package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
  85. package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
  86. package/dist/components/buttons/CancelButton.d.ts.map +1 -0
  87. package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
  88. package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
  89. package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
  90. package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
  91. package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
  92. package/dist/components/buttons/PopupToast.d.ts.map +1 -0
  93. package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
  94. package/dist/components/buttons/SendButton.d.ts.map +1 -0
  95. package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
  96. package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
  97. package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
  98. package/dist/components/icons/CheckIcon.d.ts.map +1 -0
  99. package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
  100. package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
  101. package/dist/components/icons/CopyIcon.d.ts.map +1 -0
  102. package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
  103. package/dist/components/icons/EditIcon.d.ts.map +1 -0
  104. package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
  105. package/dist/components/icons/RecordIcon.d.ts.map +1 -0
  106. package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
  107. package/dist/components/icons/SendIcon.d.ts.map +1 -0
  108. package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
  109. package/dist/components/icons/StopIcon.d.ts.map +1 -0
  110. package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
  111. package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
  112. package/dist/components/icons/TickIcon.d.ts.map +1 -0
  113. package/dist/components/icons/TrashIcon.d.ts.map +1 -0
  114. package/dist/components/icons/XIcon.d.ts.map +1 -0
  115. package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
  116. package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
  117. package/dist/components/icons/index.d.ts.map +1 -0
  118. package/dist/components/image/PreviewImage.d.ts.map +1 -0
  119. package/dist/components/index.d.ts.map +1 -0
  120. package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
  121. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
  122. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
  123. package/dist/components/inputs/textInput/index.d.ts.map +1 -0
  124. package/dist/constants.d.ts.map +1 -0
  125. package/dist/cose-bilkent-JH36ORCC-ac4d2e28.js +1 -0
  126. package/dist/cose-bilkent-JH36ORCC-c3560feb.js +1 -0
  127. package/dist/cose-bilkent-JH36ORCC-f0ddc3e7.js +1 -0
  128. package/dist/cynefin-VYW2F7L2-2458ad91.js +1 -0
  129. package/dist/cynefin-VYW2F7L2-a8648cf6.js +1 -0
  130. package/dist/cynefinDiagram-TSTJHNR4-62a29383.js +1 -0
  131. package/dist/cynefinDiagram-TSTJHNR4-910b3dfd.js +1 -0
  132. package/dist/cynefinDiagram-TSTJHNR4-deb0bb2c.js +1 -0
  133. package/dist/cytoscape.esm-56d2239f.js +1 -0
  134. package/dist/cytoscape.esm-c9352dc8.js +1 -0
  135. package/dist/dagre-VKFMJZFB-1467d0af.js +1 -0
  136. package/dist/dagre-VKFMJZFB-35daad97.js +1 -0
  137. package/dist/dagre-VKFMJZFB-c5b9a4a0.js +1 -0
  138. package/dist/defaultLocale-b4977250.js +1 -0
  139. package/dist/defaultLocale-e35a4def.js +1 -0
  140. package/dist/diagram-FQU43EPY-41eed431.js +1 -0
  141. package/dist/diagram-FQU43EPY-613e9e4e.js +1 -0
  142. package/dist/diagram-FQU43EPY-d256050e.js +1 -0
  143. package/dist/diagram-G47NLZAW-813bbb70.js +1 -0
  144. package/dist/diagram-G47NLZAW-8ef917d1.js +1 -0
  145. package/dist/diagram-G47NLZAW-aa02607c.js +1 -0
  146. package/dist/diagram-NH7WQ7WH-0af7a921.js +1 -0
  147. package/dist/diagram-NH7WQ7WH-0e4f7f17.js +1 -0
  148. package/dist/diagram-NH7WQ7WH-6f91f6aa.js +1 -0
  149. package/dist/diagram-OA4YK3LP-0fba2475.js +1 -0
  150. package/dist/diagram-OA4YK3LP-587273f4.js +1 -0
  151. package/dist/diagram-OA4YK3LP-6cbfc7a5.js +1 -0
  152. package/dist/diagram-WEI45ONY-0241463f.js +1 -0
  153. package/dist/diagram-WEI45ONY-dd634033.js +1 -0
  154. package/dist/diagram-WEI45ONY-e002e844.js +1 -0
  155. package/dist/ebnfDiagram-CCIWWBDH-20ac4ba3.js +1 -0
  156. package/dist/ebnfDiagram-CCIWWBDH-e9974165.js +1 -0
  157. package/dist/ebnfDiagram-CCIWWBDH-ead44055.js +1 -0
  158. package/dist/erDiagram-Q63AITRT-1febb8fc.js +1 -0
  159. package/dist/erDiagram-Q63AITRT-4ea4b93d.js +1 -0
  160. package/dist/erDiagram-Q63AITRT-bcb00855.js +1 -0
  161. package/dist/eventmodeling-45OFAUF4-a82f1f18.js +1 -0
  162. package/dist/eventmodeling-45OFAUF4-dcf667fc.js +1 -0
  163. package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
  164. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
  165. package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
  166. package/dist/features/bubble/components/index.d.ts.map +1 -0
  167. package/dist/features/bubble/index.d.ts.map +1 -0
  168. package/dist/features/bubble/types.d.ts.map +1 -0
  169. package/dist/features/full/components/Full.d.ts.map +1 -0
  170. package/dist/features/full/components/index.d.ts.map +1 -0
  171. package/dist/features/full/index.d.ts.map +1 -0
  172. package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
  173. package/dist/features/popup/components/Popup.d.ts.map +1 -0
  174. package/dist/features/popup/components/index.d.ts.map +1 -0
  175. package/dist/features/popup/index.d.ts.map +1 -0
  176. package/dist/features/popup/types.d.ts.map +1 -0
  177. package/dist/flowDiagram-23GEKE2U-14ee2b3c.js +1 -0
  178. package/dist/flowDiagram-23GEKE2U-7ab9c2e4.js +1 -0
  179. package/dist/flowDiagram-23GEKE2U-f7309569.js +1 -0
  180. package/dist/ganttDiagram-NO4QXBWP-249a167d.js +1 -0
  181. package/dist/ganttDiagram-NO4QXBWP-bd530d12.js +1 -0
  182. package/dist/ganttDiagram-NO4QXBWP-e5e495d6.js +1 -0
  183. package/dist/gitGraph-TEB2WS4Q-72ba3362.js +1 -0
  184. package/dist/gitGraph-TEB2WS4Q-d07b15b3.js +1 -0
  185. package/dist/gitGraphDiagram-IHSO6WYX-2964ff91.js +1 -0
  186. package/dist/gitGraphDiagram-IHSO6WYX-4d9324ad.js +1 -0
  187. package/dist/gitGraphDiagram-IHSO6WYX-97bf868b.js +1 -0
  188. package/dist/graph-0df36b9d.js +1 -0
  189. package/dist/graph-c6801890.js +1 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/info-DKCQHKI2-d8e8a901.js +1 -0
  192. package/dist/info-DKCQHKI2-dd69502c.js +1 -0
  193. package/dist/infoDiagram-FWYZ7A6U-1267309e.js +1 -0
  194. package/dist/infoDiagram-FWYZ7A6U-5b9d28af.js +1 -0
  195. package/dist/infoDiagram-FWYZ7A6U-cc33afe4.js +1 -0
  196. package/dist/init-b029a625.js +1 -0
  197. package/dist/init-cf76ae07.js +1 -0
  198. package/dist/ishikawaDiagram-FXEZZL3T-3f0977e8.js +1 -0
  199. package/dist/ishikawaDiagram-FXEZZL3T-89c1b2f4.js +1 -0
  200. package/dist/ishikawaDiagram-FXEZZL3T-9fef4653.js +1 -0
  201. package/dist/journeyDiagram-5HDEW3XC-563a68ff.js +1 -0
  202. package/dist/journeyDiagram-5HDEW3XC-c8c8d701.js +1 -0
  203. package/dist/journeyDiagram-5HDEW3XC-e6c5e84b.js +1 -0
  204. package/dist/kanban-definition-HUTT4EX6-3719e367.js +1 -0
  205. package/dist/kanban-definition-HUTT4EX6-7bc0cd1e.js +1 -0
  206. package/dist/kanban-definition-HUTT4EX6-d8b002e3.js +1 -0
  207. package/dist/katex-67456a45.js +1 -0
  208. package/dist/katex-b134d23c.js +1 -0
  209. package/dist/layout-e44354bf.js +1 -0
  210. package/dist/layout-ff5d33a1.js +1 -0
  211. package/dist/linear-7b1a23f3.js +1 -0
  212. package/dist/linear-d7ad6d25.js +1 -0
  213. package/dist/linear-e5c99c88.js +1 -0
  214. package/dist/map-05f0ff95.js +1 -0
  215. package/dist/map-d3292a5b.js +1 -0
  216. package/dist/mermaid-parser.core-6df0beec.js +1 -0
  217. package/dist/mermaid-parser.core-d8d1c2b9.js +1 -0
  218. package/dist/mermaid.core-2d237a1e.js +1 -0
  219. package/dist/mermaid.core-70d5aead.js +1 -0
  220. package/dist/mermaid.core-8797d6a9.js +1 -0
  221. package/dist/mindmap-definition-LN4V7U3C-04a12a88.js +1 -0
  222. package/dist/mindmap-definition-LN4V7U3C-86a890ce.js +1 -0
  223. package/dist/mindmap-definition-LN4V7U3C-f495948c.js +1 -0
  224. package/dist/ordinal-221e41d7.js +1 -0
  225. package/dist/ordinal-4a51e46c.js +1 -0
  226. package/dist/packet-7NZHBO7P-b4586e10.js +1 -0
  227. package/dist/packet-7NZHBO7P-f62750ff.js +1 -0
  228. package/dist/pegDiagram-2B236MQR-234fe6d1.js +1 -0
  229. package/dist/pegDiagram-2B236MQR-2826e278.js +1 -0
  230. package/dist/pegDiagram-2B236MQR-64eeb662.js +1 -0
  231. package/dist/pie-RZYD4A2V-106ba3d7.js +1 -0
  232. package/dist/pie-RZYD4A2V-752eda00.js +1 -0
  233. package/dist/pieDiagram-ENE6RG2P-0c3b09b8.js +1 -0
  234. package/dist/pieDiagram-ENE6RG2P-3fb5f734.js +1 -0
  235. package/dist/pieDiagram-ENE6RG2P-af928526.js +1 -0
  236. package/dist/quadrantDiagram-ABIIQ3AL-1a55c0f5.js +1 -0
  237. package/dist/quadrantDiagram-ABIIQ3AL-3d15c26d.js +1 -0
  238. package/dist/quadrantDiagram-ABIIQ3AL-9110fa9c.js +1 -0
  239. package/dist/queries/sendMessageQuery.d.ts.map +1 -0
  240. package/dist/radar-I7S5WNFK-53bde9ff.js +1 -0
  241. package/dist/radar-I7S5WNFK-87e8c5ba.js +1 -0
  242. package/dist/railroad-3IZDKUUU-99427b9f.js +1 -0
  243. package/dist/railroad-3IZDKUUU-9e29587d.js +1 -0
  244. package/dist/railroad-abnf-AHOZXSZD-1d11cb5b.js +1 -0
  245. package/dist/railroad-abnf-AHOZXSZD-c27db0bc.js +1 -0
  246. package/dist/railroad-ebnf-EBAXGLYW-38dff87c.js +1 -0
  247. package/dist/railroad-ebnf-EBAXGLYW-6bb5de0c.js +1 -0
  248. package/dist/railroad-peg-LSFZ7HO6-c9f0aa71.js +1 -0
  249. package/dist/railroad-peg-LSFZ7HO6-efcb0a43.js +1 -0
  250. package/dist/railroadDiagram-RFXS5EU6-14373a87.js +1 -0
  251. package/dist/railroadDiagram-RFXS5EU6-ec9e696e.js +1 -0
  252. package/dist/railroadDiagram-RFXS5EU6-effa5611.js +1 -0
  253. package/dist/register.d.ts.map +1 -0
  254. package/dist/requirementDiagram-TGXJPOKE-3d199581.js +1 -0
  255. package/dist/requirementDiagram-TGXJPOKE-5a337f1a.js +1 -0
  256. package/dist/requirementDiagram-TGXJPOKE-a7960859.js +1 -0
  257. package/dist/sankeyDiagram-HTMAVEWB-209eac30.js +1 -0
  258. package/dist/sankeyDiagram-HTMAVEWB-3c852fda.js +1 -0
  259. package/dist/sankeyDiagram-HTMAVEWB-46aa1eb1.js +1 -0
  260. package/dist/sequenceDiagram-DBY2YBRQ-4121f7c2.js +1 -0
  261. package/dist/sequenceDiagram-DBY2YBRQ-7bad18e4.js +1 -0
  262. package/dist/sequenceDiagram-DBY2YBRQ-af96f48e.js +1 -0
  263. package/dist/sizeCapture-X5ZJPWSS-13826306.js +1 -0
  264. package/dist/sizeCapture-X5ZJPWSS-32e2eec7.js +1 -0
  265. package/dist/sizeCapture-X5ZJPWSS-a078176f.js +1 -0
  266. package/dist/stateDiagram-2N3HPSRC-527374a2.js +1 -0
  267. package/dist/stateDiagram-2N3HPSRC-8047e124.js +1 -0
  268. package/dist/stateDiagram-2N3HPSRC-ba344b5d.js +1 -0
  269. package/dist/stateDiagram-v2-6OUMAXLB-7580bf69.js +1 -0
  270. package/dist/stateDiagram-v2-6OUMAXLB-d4c58fd3.js +1 -0
  271. package/dist/stateDiagram-v2-6OUMAXLB-e5921044.js +1 -0
  272. package/dist/store/constant.d.ts.map +1 -0
  273. package/dist/swimlanes-5IMT3BWC-5834b232.js +1 -0
  274. package/dist/swimlanes-5IMT3BWC-791a3547.js +1 -0
  275. package/dist/swimlanes-5IMT3BWC-db2c593a.js +1 -0
  276. package/dist/swimlanesDiagram-G3AALYLV-36c30eec.js +1 -0
  277. package/dist/swimlanesDiagram-G3AALYLV-89220ddd.js +1 -0
  278. package/dist/swimlanesDiagram-G3AALYLV-b621330d.js +1 -0
  279. package/dist/timeline-definition-FHXFAJF6-0482a67a.js +1 -0
  280. package/dist/timeline-definition-FHXFAJF6-1d165a67.js +1 -0
  281. package/dist/timeline-definition-FHXFAJF6-f9600b97.js +1 -0
  282. package/dist/treeView-QDETBFTQ-0ecf20cd.js +1 -0
  283. package/dist/treeView-QDETBFTQ-96ed8e2f.js +1 -0
  284. package/dist/treemap-6X3UGDF4-0a7f19ca.js +1 -0
  285. package/dist/treemap-6X3UGDF4-9f498e0c.js +1 -0
  286. package/dist/types/chart.d.ts.map +1 -0
  287. package/dist/types.d.ts +1 -0
  288. package/dist/types.d.ts.map +1 -0
  289. package/dist/utils/audioRecording.d.ts.map +1 -0
  290. package/dist/utils/chartInstanceManager.d.ts.map +1 -0
  291. package/dist/utils/chartTagParser.d.ts.map +1 -0
  292. package/dist/utils/chatInputHistory.d.ts.map +1 -0
  293. package/dist/utils/chatStreamHelper.d.ts.map +1 -0
  294. package/dist/utils/index.d.ts.map +1 -0
  295. package/dist/utils/isMobileSignal.d.ts.map +1 -0
  296. package/dist/utils/transcriptApi.d.ts.map +1 -0
  297. package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
  298. package/dist/vennDiagram-L72KCM5P-05176193.js +1 -0
  299. package/dist/vennDiagram-L72KCM5P-25a48393.js +1 -0
  300. package/dist/vennDiagram-L72KCM5P-28cffef7.js +1 -0
  301. package/dist/wardley-OPB4EBWU-08c5f013.js +1 -0
  302. package/dist/wardley-OPB4EBWU-9803a1d9.js +1 -0
  303. package/dist/wardleyDiagram-EHGQE667-052e6de9.js +1 -0
  304. package/dist/wardleyDiagram-EHGQE667-6a614fd9.js +1 -0
  305. package/dist/wardleyDiagram-EHGQE667-d11fe904.js +1 -0
  306. package/dist/web-25bb78b9.js +1 -0
  307. package/dist/web-753300e1.js +1 -0
  308. package/dist/web-c3ed22c4.js +1 -0
  309. package/dist/web.d.ts.map +1 -0
  310. package/dist/web.js +1 -1
  311. package/dist/window.d.ts.map +1 -0
  312. package/dist/xychartDiagram-FW5EYKEG-43118b83.js +1 -0
  313. package/dist/xychartDiagram-FW5EYKEG-d77187fe.js +1 -0
  314. package/dist/xychartDiagram-FW5EYKEG-f2fac492.js +1 -0
  315. package/package.json +86 -86
  316. package/public/index.html +4 -1
  317. package/public/popup.html +20 -0
  318. package/server.js +477 -477
  319. package/.idea/flowise-chatbox.iml +0 -10
  320. package/.idea/modules.xml +0 -8
  321. package/.idea/workspace.xml +0 -4
  322. package/docs/embedding-style-guide.md +0 -417
@@ -0,0 +1 @@
1
+ import{c as t,g as e}from"./web-c3ed22c4.js";var r=Object.defineProperty,i=(t,e)=>r(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var i in e)r(t,i,{get:e[i],enumerable:!0})},a={exports:{}},s=(function(){var t,e,r,i,o,s,n,l,h,c,d,u,p,g,f,y,m,C,x,b,k,w,T,S,v;a.exports=(t="millisecond",e="second",r="minute",i="hour",o="day",s="week",n="month",l="quarter",h="year",c="date",d="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={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])+"]"}},y={s:f=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},z:function(t){t=-t.utcOffset();var e=Math.abs(t),r=Math.floor(e/60);e%=60;return(t<=0?"+":"-")+f(r,2,"0")+":"+f(e,2,"0")},m:function t(e,r){var i,o,a;return e.date()<r.date()?-t(r,e):(i=12*(r.year()-e.year())+(r.month()-e.month()),a=r-(o=e.clone().add(i,n))<0,e=e.clone().add(i+(a?-1:1),n),+(-(i+(r-o)/(a?o-e:e-o))||0))},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(a){return{M:n,y:h,w:s,d:o,D:c,h:i,m:r,s:e,ms:t,Q:l}[a]||String(a||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},(C={})[m="en"]=g,x="$isDayjsObject",b=function(t){return t instanceof S||!(!t||!t[x])},w=function(t,e){var r;return b(t)?t.clone():((r="object"==typeof e?e:{}).date=t,r.args=arguments,new S(r))},(T=y).l=k=function t(e,r,i){var o;if(!e)return m;if("string"==typeof e){var a=e.toLowerCase();r=(C[a]&&(o=a),r&&(C[a]=r,o=a),e.split("-"));if(!o&&1<r.length)return t(r[0])}else a=e.name,C[a]=e,o=a;return!i&&o&&(m=o),o||!i&&m},T.i=b,T.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})},S=function(){function a(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[x]=!0}var g=a.prototype;return g.parse=function(t){this.$d=function(){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var i,o,a=e.match(u);if(a)return i=a[2]-1||0,o=(a[7]||"0").substring(0,3),r?new Date(Date.UTC(a[1],i,a[3]||1,a[4]||0,a[5]||0,a[6]||0,o)):new Date(a[1],i,a[3]||1,a[4]||0,a[5]||0,a[6]||0,o)}return new Date(e)}(),this.init()},g.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()},g.$utils=function(){return T},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(t,e){return t=w(t),this.startOf(e)<=t&&t<=this.endOf(e)},g.isAfter=function(t,e){return w(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<w(t)},g.$g=function(t,e,r){return T.u(t)?this[e]:this.set(r,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,a){function l(t,e){return e=T.w(u.$u?Date.UTC(u.$y,e,t):new Date(u.$y,e,t),u),p?e:e.endOf(o)}function d(t,e){return T.w(u.toDate()[t].apply(u.toDate("s"),(p?[0,0,0,0]:[23,59,59,999]).slice(e)),u)}var u=this,p=!!T.u(a)||a,g=(a=T.p(t),this.$W),f=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(a){case h:return p?l(1,0):l(31,11);case n:return p?l(1,f):l(0,f+1);case s:var C=(g<(C=this.$locale().weekStart||0)?g+7:g)-C;return l(p?y-C:y+(6-C),f);case o:case c:return d(m+"Hours",0);case i:return d(m+"Minutes",1);case r:return d(m+"Seconds",2);case e:return d(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(a,s){a=T.p(a);var l="set"+(this.$u?"UTC":""),d=(l=((d={}).day=l+"Date",d[c]=l+"Date",d[n]=l+"Month",d[h]=l+"FullYear",d[i]=l+"Hours",d[r]=l+"Minutes",d[e]=l+"Seconds",d[t]=l+"Milliseconds",d[a]),a===o?this.$D+(s-this.$W):s);return a===n||a===h?((s=this.clone().set(c,1)).$d[l](d),s.init(),this.$d=s.set(c,Math.min(this.$D,s.daysInMonth())).$d):l&&this.$d[l](d),this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[T.p(t)]()},g.add=function(t,e){function r(e){var r=w(i);return T.w(r.date(r.date()+Math.round(e*t)),i)}var i=this;return(e=(t=Number(t),T.p(e)))===n?this.set(n,this.$M+t):e===h?this.set(h,this.$y+t):e===o?r(1):e===s?r(7):(e={minute:6e4,hour:36e5,second:1e3}[e]||1,e=this.$d.getTime()+t*e,T.w(e,this))},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e,r,i,o,a,s,n,l,h,c,u=this,g=this.$locale();return this.isValid()?(e=t||"YYYY-MM-DDTHH:mm:ssZ",r=T.z(this),i=this.$H,o=this.$m,a=this.$M,s=g.weekdays,n=g.months,t=g.meridiem,l=function(t,r,i,o){return t&&(t[r]||t(u,e))||i[r].slice(0,o)},h=function(t){return T.s(i%12||12,t,"0")},c=t||function(t,e,r){return t=t<12?"AM":"PM",r?t.toLowerCase():t},e.replace(p,(function(t,e){return e||function(){switch(t){case"YY":return String(u.$y).slice(-2);case"YYYY":return T.s(u.$y,4,"0");case"M":return a+1;case"MM":return T.s(a+1,2,"0");case"MMM":return l(g.monthsShort,a,n,3);case"MMMM":return l(n,a);case"D":return u.$D;case"DD":return T.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return l(g.weekdaysMin,u.$W,s,2);case"ddd":return l(g.weekdaysShort,u.$W,s,3);case"dddd":return s[u.$W];case"H":return String(i);case"HH":return T.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return c(i,o,!0);case"A":return c(i,o,!1);case"m":return String(o);case"mm":return T.s(o,2,"0");case"s":return String(u.$s);case"ss":return T.s(u.$s,2,"0");case"SSS":return T.s(u.$ms,3,"0");case"Z":return r}return null}()||r.replace(":","")}))):g.invalidDate||d},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(t,a,c){function d(){return T.m(p,g)}var u,p=this,g=(a=T.p(a),w(t)),f=6e4*(g.utcOffset()-this.utcOffset()),y=this-g;switch(a){case h:u=d()/12;break;case n:u=d();break;case l:u=d()/3;break;case s:u=(y-f)/6048e5;break;case o:u=(y-f)/864e5;break;case i:u=y/36e5;break;case r:u=y/6e4;break;case e:u=y/1e3;break;default:u=y}return c?u:T.a(u)},g.daysInMonth=function(){return this.endOf(n).$D},g.$locale=function(){return C[this.$L]},g.locale=function(t,e){var r;return t?(r=this.clone(),(t=k(t,e,!0))&&(r.$L=t),r):this.$L},g.clone=function(){return T.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},a}(),v=S.prototype,w.prototype=v,[["$ms",t],["$s",e],["$m",r],["$H",i],["$W",o],["$M",n],["$y",h],["$D",c]].forEach((function(t){v[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,S,w),t.$i=!0),w},w.locale=k,w.isDayjs=b,w.unix=function(t){return w(1e3*t)},w.en=C[m],w.Ls=C,w.p={},w)}(),a.exports),n=e(s),l={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},h={trace:i((()=>{}),"trace"),debug:i((()=>{}),"debug"),info:i((()=>{}),"info"),warn:i((()=>{}),"warn"),error:i((()=>{}),"error"),fatal:i((()=>{}),"fatal")},c=i((function(t="fatal"){let e=l.fatal;"string"==typeof t?t.toLowerCase()in l&&(e=l[t]):"number"==typeof t&&(e=t),h.trace=()=>{},h.debug=()=>{},h.info=()=>{},h.warn=()=>{},h.error=()=>{},h.fatal=()=>{},e<=l.fatal&&(h.fatal=console.error?console.error.bind(console,d("FATAL"),"color: orange"):console.log.bind(console,"",d("FATAL"))),e<=l.error&&(h.error=console.error?console.error.bind(console,d("ERROR"),"color: orange"):console.log.bind(console,"",d("ERROR"))),e<=l.warn&&(h.warn=console.warn?console.warn.bind(console,d("WARN"),"color: orange"):console.log.bind(console,"",d("WARN"))),e<=l.info&&(h.info=console.info?console.info.bind(console,d("INFO"),"color: lightblue"):console.log.bind(console,"",d("INFO"))),e<=l.debug&&(h.debug=console.debug?console.debug.bind(console,d("DEBUG"),"color: lightgreen"):console.log.bind(console,"",d("DEBUG"))),e<=l.trace&&(h.trace=console.debug?console.debug.bind(console,d("TRACE"),"color: lightgreen"):console.log.bind(console,"",d("TRACE")))}),"setLogLevel"),d=i((t=>`%c${n().format("ss.SSS")} : ${t} : `),"format");const u={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=>255<=t?255:t<0?0:t,g:t=>255<=t?255:t<0?0:t,b:t=>255<=t?255:t<0?0:t,h:t=>t%360,s:t=>100<=t?100:t<0?0:t,l:t=>100<=t?100:t<0?0:t,a:t=>1<=t?1:t<0?0:t},toLinear:t=>{var e=t/255;return.03928<t?Math.pow((.055+e)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),1<r&&--r,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;var o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(i){case"r":return 255*u.hue2rgb(a,o,t+1/3);case"g":return 255*u.hue2rgb(a,o,t);case"b":return 255*u.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;var 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;var n=o-a;if("s"===i)return 100*(.5<s?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}}};const p={clamp:(t,e,r)=>r<e?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10};const g={dec2hex:t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t};var f={channel:u,lang:p,unit:g};const y={};for(let t=0;t<=255;t++)y[t]=f.unit.dec2hex(t);const m=0,C=1,x=2;var b=class{constructor(){this.type=m}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=m}is(t){return this.type===t}};class k{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new b}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=m,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:i}=t;void 0===e&&(t.h=f.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=f.channel.rgb2hsl(t,"s")),void 0===i&&(t.l=f.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:i}=t;void 0===e&&(t.r=f.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=f.channel.hsl2rgb(t,"g")),void 0===i&&(t.b=f.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(x)||void 0===e?(this._ensureHSL(),f.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(x)||void 0===e?(this._ensureHSL(),f.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(x)||void 0===e?(this._ensureHSL(),f.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(C)||void 0===e?(this._ensureRGB(),f.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(C)||void 0===e?(this._ensureRGB(),f.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(C)||void 0===e?(this._ensureRGB(),f.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(C),this.changed=!0,this.data.r=t}set g(t){this.type.set(C),this.changed=!0,this.data.g=t}set b(t){this.type.set(C),this.changed=!0,this.data.b=t}set h(t){this.type.set(x),this.changed=!0,this.data.h=t}set s(t){this.type.set(x),this.changed=!0,this.data.s=t}set l(t){this.type.set(x),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}var w=new k({r:0,g:0,b:0,a:0},"transparent");const T={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35===t.charCodeAt(0)){var e,r,i,o,a,s=t.match(T.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,w.set({r:(e>>(i=(r=4<s)?8:4)*(3+(o=(s=s%4==0)?0:-1))&(a=r?255:15))*(r=r?1:17),g:(e>>i*(2+o)&a)*r,b:(e>>i*(1+o)&a)*r,a:s?(e&a)*r/255:1},t)}},stringify:t=>{var{r:t,g:e,b:r,a:i}=t;return i<1?"#"+y[Math.round(t)]+y[Math.round(e)]+y[Math.round(r)]+y[Math.round(255*i)]:"#"+y[Math.round(t)]+y[Math.round(e)]+y[Math.round(r)]}};var S=T;const v={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=>{var e;if(e=t.match(v.hueRe)){var[,r,e]=e;switch(e){case"grad":return f.channel.clamp.h(.9*parseFloat(r));case"rad":return f.channel.clamp.h(180*parseFloat(r)/Math.PI);case"turn":return f.channel.clamp.h(360*parseFloat(r))}}return f.channel.clamp.h(parseFloat(t))},parse:t=>{var e,r,i,o,a;if((104===(a=t.charCodeAt(0))||72===a)&&(a=t.match(v.re)))return[,a,e,r,i,o]=a,w.set({h:v._hue2deg(a),s:f.channel.clamp.s(parseFloat(e)),l:f.channel.clamp.l(parseFloat(r)),a:i?f.channel.clamp.a(o?parseFloat(i)/100:parseFloat(i)):1},t)},stringify:t=>{var{h:t,s:e,l:r,a:i}=t;return i<1?`hsla(${f.lang.round(t)}, ${f.lang.round(e)}%, ${f.lang.round(r)}%, ${i})`:`hsl(${f.lang.round(t)}, ${f.lang.round(e)}%, ${f.lang.round(r)}%)`}};var B=v;const _={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=>{if(t=t.toLowerCase(),t=_.colors[t])return S.parse(t)},stringify:t=>{var e=S.stringify(t);for(const t in _.colors)if(_.colors[t]===e)return t}};var F=_;const L={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=>{var e,r,i,o,a,s,n,l;if((114===(l=t.charCodeAt(0))||82===l)&&(l=t.match(L.re)))return[,l,e,r,i,o,a,s,n]=l,w.set({r:f.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:f.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:f.channel.clamp.b(a?2.55*parseFloat(o):parseFloat(o)),a:s?f.channel.clamp.a(n?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{var{r:t,g:e,b:r,a:i}=t;return i<1?`rgba(${f.lang.round(t)}, ${f.lang.round(e)}, ${f.lang.round(r)}, ${f.lang.round(i)})`:`rgb(${f.lang.round(t)}, ${f.lang.round(e)}, ${f.lang.round(r)})`}};var M=L;const A={format:{keyword:F,hex:S,rgb:M,rgba:M,hsl:B,hsla:B},parse:t=>{if("string"!=typeof t)return t;var e=S.parse(t)||M.parse(t)||B.parse(t)||F.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:(t.type.is(x)||void 0===t.data.r?B:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?M:S).stringify(t)};var E=A;var O=(t,e)=>{var r=E.parse(t);for(const t in e)r[t]=f.channel.clamp[t](e[t]);return E.stringify(r)};var $=(t,e,r=0,i=1)=>"number"!=typeof t?O(t,{a:e}):(t=w.set({r:f.channel.clamp.r(t),g:f.channel.clamp.g(e),b:f.channel.clamp.b(r),a:f.channel.clamp.a(i)}),E.stringify(t));var I=t=>{var{r:t,g:e,b:r}=E.parse(t);t=.2126*f.channel.toLinear(t)+.7152*f.channel.toLinear(e)+.0722*f.channel.toLinear(r);return f.lang.round(t)};var D=t=>.5<=I(t);var q=t=>!D(t);var P=(t,e,r)=>{var i=(t=E.parse(t))[e];return i!==(r=f.channel.clamp[e](i+r))&&(t[e]=r),E.stringify(t)};var z=(t,e)=>P(t,"l",e);var R=(t,e)=>P(t,"l",-e);var N=(t,e)=>{var r=E.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return O(t,i)};var W=(t,e,r=50)=>{var i,o,{r:t,g:a,b:s,a:n}=E.parse(t),{r:e,g:l,b:h,a:c}=E.parse(e);return $(t*(i=(1+((i=2*(r=r/100)-1)*(o=n-c)==-1?i:(i+o)/(1+i*o)))/2)+e*(o=1-i),a*i+l*o,s*i+h*o,n*r+c*(1-r))};var j=(t,e=100)=>{var r=E.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,W(r,t,e)};function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function U(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,o,a,s,n=[],l=!0,h=!1;try{if(a=(r=r.call(t)).next,0!==e)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw o}}return n}}(t,e)||function(t,e){var r;if(t)return"string"==typeof t?H(t,e):"Map"===(r="Object"===(r={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(t,e):void 0}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Y=Object.entries,G=Object.setPrototypeOf,X=Object.isFrozen,V=Object.getPrototypeOf,Z=Object.getOwnPropertyDescriptor;let Q=Object.freeze,K=Object.seal,J=Object.create,tt="undefined"!=typeof Reflect&&Reflect,et=tt.apply,rt=tt.construct;Q=Q||function(t){return t},K=K||function(t){return t},et=et||function(t,e){for(var r=arguments.length,i=new Array(2<r?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(e,i)},rt=rt||function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)};const it=Tt(Array.prototype.forEach),ot=Tt(Array.prototype.lastIndexOf),at=Tt(Array.prototype.pop),st=Tt(Array.prototype.push),nt=Tt(Array.prototype.splice),lt=Array.isArray,ht=Tt(String.prototype.toLowerCase),ct=Tt(String.prototype.toString),dt=Tt(String.prototype.match),ut=Tt(String.prototype.replace),pt=Tt(String.prototype.indexOf),gt=Tt(String.prototype.trim),ft=Tt(Number.prototype.toString),yt=Tt(Boolean.prototype.toString),mt="undefined"==typeof BigInt?null:Tt(BigInt.prototype.toString),Ct="undefined"==typeof Symbol?null:Tt(Symbol.prototype.toString),xt=Tt(Object.prototype.hasOwnProperty),bt=Tt(Object.prototype.toString),kt=Tt(RegExp.prototype.test),wt=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return rt(t,r)}}(TypeError);function Tt(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(1<r?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return et(t,e,i)}}function St(t,e){var r,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:ht;if(G&&G(t,null),lt(e)){let o=e.length;for(;o--;){let a=e[o];"string"==typeof a&&(r=i(a))!==a&&(X(e)||(e[o]=r),a=r),t[a]=!0}}return t}function vt(t){for(let e=0;e<t.length;e++)xt(t,e)||(t[e]=null);return t}function Bt(t){var e=J(null);for(const o of Y(t)){var r=(i=U(o,2))[0],i=i[1];xt(t,r)&&(lt(i)?e[r]=vt(i):i&&"object"==typeof i&&i.constructor===Object?e[r]=Bt(i):e[r]=i)}return e}function _t(t,e){for(;null!==t;){var r=Z(t,e);if(r){if(r.get)return Tt(r.get);if("function"==typeof r.value)return Tt(r.value)}t=V(t)}return function(){return null}}const Ft=Q(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Lt=Q(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Mt=Q(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),At=Q(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Et=Q(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ot=Q(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$t=Q(["#text"]),It=Q(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Dt=Q(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qt=Q(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pt=Q(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),zt=K(/{{[\w\W]*|^[\w\W]*}}/g),Rt=K(/<%[\w\W]*|^[\w\W]*%>/g),Nt=K(/\${[\w\W]*/g),Wt=K(/^data-[\-\w.\u00B7-\uFFFF]+$/),jt=K(/^aria-[\-\w]+$/),Ht=K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ut=K(/^(?:\w+script|data):/i),Yt=K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Gt=K(/^html$/i),Xt=K(/^[a-z][.\w]*(-[.\w]+)+$/i),Vt=K(/<[/\w!]/g),Zt=K(/<[/\w]/g),Qt=K(/<\/no(script|embed|frames)/i),Kt=K(/\/>/i),Jt=1,te=3,ee=7,re=8,ie=9,oe=11,ae=function(t,e,r,i){return xt(t,e)&&lt(t[e])?St(i.base?Bt(i.base):{},t[e],i.transform):r};var se,ne=function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const r=e=>t(e);if(r.version="3.4.11",r.removed=[],!e||!e.document||e.document.nodeType!==ie||!e.Element)return r.isSupported=!1,r;let i=e.document;const o=i,a=o.currentScript,s=(e.DocumentFragment,e.HTMLTemplateElement),n=e.Node,l=e.Element,h=e.NodeFilter,c=(void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement,e.DOMParser),d=e.trustedTypes,u=_t(e=l.prototype,"cloneNode"),p=_t(e,"remove"),g=_t(e,"nextSibling"),f=_t(e,"childNodes"),y=_t(e,"parentNode"),m=_t(e,"shadowRoot"),C=_t(e,"attributes"),x=n&&n.prototype?_t(n.prototype,"nodeType"):null,b=n&&n.prototype?_t(n.prototype,"nodeName"):null;"function"==typeof s&&(e=i.createElement("template")).content&&e.content.ownerDocument&&(i=e.content.ownerDocument);let k,w,T="",S=!1,v=0;const B=function(){if(0<v)throw wt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},_=function(t){B(),v++;try{return k.createHTML(t)}finally{v--}},F=function(t){B(),v++;try{return k.createScriptURL(t)}finally{v--}},L=i,M=L.implementation,A=L.createNodeIterator,E=L.createDocumentFragment,O=L.getElementsByTagName,$=o.importNode;let I={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof Y&&"function"==typeof y&&M&&void 0!==M.createHTMLDocument;const D=zt,q=Rt,P=Nt,z=Wt,R=jt,N=Ut,W=Yt,j=Xt;let H=Ht,U=null;const G=St({},[...Ft,...Lt,...Mt,...Et,...$t]);let X=null;const V=St({},[...It,...Dt,...qt,...Pt]);let Z=Object.seal(J(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),tt=null,et=null;const rt=Object.seal(J(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Tt=!0,vt=!0,se=!1,ne=!0,le=!1,he=!0,ce=!1,de=!1,ue=null,pe=null,ge=!1,fe=!1,ye=!1,me=!1,Ce=!0,xe=!1;const be="user-content-";let ke=!0,we=!1,Te={},Se=null;const ve=St({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Be=null;const _e=St({},["audio","video","img","source","image","track"]);let Fe=null;const Le=St({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Me="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",Ee="http://www.w3.org/1999/xhtml";let Oe,$e=Ee,Ie=null;const De=St({},[Me,Ae,Ee],ct),qe=Q(["mi","mo","mn","ms","mtext"]);let Pe=St({},qe);const ze=Q(["annotation-xml"]);let Re=St({},ze);const Ne=St({},["title","style","font","a","script"]);let We=null;const je=["application/xhtml+xml","text/html"];let He=null,Ue=null;function Ye(t){return t instanceof RegExp||t instanceof Function}function Ge(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!Ue||Ue!==t){t=Bt(t=t&&"object"==typeof t?t:{}),We=-1===je.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,He="application/xhtml+xml"===We?ct:ht,U=ae(t,"ALLOWED_TAGS",G,{transform:He}),X=ae(t,"ALLOWED_ATTR",V,{transform:He}),Ie=ae(t,"ALLOWED_NAMESPACES",De,{transform:ct}),Fe=ae(t,"ADD_URI_SAFE_ATTR",Le,{transform:He,base:Le}),Be=ae(t,"ADD_DATA_URI_TAGS",_e,{transform:He,base:_e}),Se=ae(t,"FORBID_CONTENTS",ve,{transform:He}),tt=ae(t,"FORBID_TAGS",Bt({}),{transform:He}),et=ae(t,"FORBID_ATTR",Bt({}),{transform:He}),Te=!!xt(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?Bt(t.USE_PROFILES):t.USE_PROFILES),Tt=!1!==t.ALLOW_ARIA_ATTR,vt=!1!==t.ALLOW_DATA_ATTR,se=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,le=t.SAFE_FOR_TEMPLATES||!1,he=!1!==t.SAFE_FOR_XML,ce=t.WHOLE_DOCUMENT||!1,fe=t.RETURN_DOM||!1,ye=t.RETURN_DOM_FRAGMENT||!1,me=t.RETURN_TRUSTED_TYPE||!1,ge=t.FORCE_BODY||!1,Ce=!1!==t.SANITIZE_DOM,xe=t.SANITIZE_NAMED_PROPS||!1,ke=!1!==t.KEEP_CONTENT,we=t.IN_PLACE||!1,H=function(t){try{return kt(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:Ht,$e="string"==typeof t.NAMESPACE?t.NAMESPACE:Ee,Pe=xt(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?Bt(t.MATHML_TEXT_INTEGRATION_POINTS):St({},qe),Re=xt(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?Bt(t.HTML_INTEGRATION_POINTS):St({},ze);var e=xt(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?Bt(t.CUSTOM_ELEMENT_HANDLING):J(null);if(Z=J(null),xt(e,"tagNameCheck")&&Ye(e.tagNameCheck)&&(Z.tagNameCheck=e.tagNameCheck),xt(e,"attributeNameCheck")&&Ye(e.attributeNameCheck)&&(Z.attributeNameCheck=e.attributeNameCheck),xt(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(Z.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),K(Z),le&&(vt=!1),ye&&(fe=!0),Te&&(U=St({},$t),X=J(null),!0===Te.html&&(St(U,Ft),St(X,It)),!0===Te.svg&&(St(U,Lt),St(X,Dt),St(X,Pt)),!0===Te.svgFilters&&(St(U,Mt),St(X,Dt),St(X,Pt)),!0===Te.mathMl)&&(St(U,Et),St(X,qt),St(X,Pt)),rt.tagCheck=null,rt.attributeCheck=null,xt(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?rt.tagCheck=t.ADD_TAGS:lt(t.ADD_TAGS)&&St(U=U===G?Bt(U):U,t.ADD_TAGS,He)),xt(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?rt.attributeCheck=t.ADD_ATTR:lt(t.ADD_ATTR)&&St(X=X===V?Bt(X):X,t.ADD_ATTR,He)),xt(t,"ADD_URI_SAFE_ATTR")&&lt(t.ADD_URI_SAFE_ATTR)&&St(Fe,t.ADD_URI_SAFE_ATTR,He),xt(t,"FORBID_CONTENTS")&&lt(t.FORBID_CONTENTS)&&St(Se=Se===ve?Bt(Se):Se,t.FORBID_CONTENTS,He),xt(t,"ADD_FORBID_CONTENTS")&&lt(t.ADD_FORBID_CONTENTS)&&St(Se=Se===ve?Bt(Se):Se,t.ADD_FORBID_CONTENTS,He),ke&&(U["#text"]=!0),ce&&St(U,["html","head","body"]),U.table&&(St(U,["tbody"]),delete tt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw wt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw wt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');e=k,k=t.TRUSTED_TYPES_POLICY;try{T=_("")}catch(t){throw k=e,t}}else null===t.TRUSTED_TYPES_POLICY?(k=void 0,T=""):(k=void 0===k?(S||(w=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;var i="data-tt-policy-suffix";e="dompurify"+((r=e&&e.hasAttribute(i)?e.getAttribute(i):r)?"#"+r:"");try{return t.createPolicy(e,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+e+" could not be created."),null}}(d,a),S=!0),w):k)&&"string"==typeof T&&(T=_(""));Q&&Q(t),Ue=t}}function Xe(t){var e=f(t);if(e){const t=[];it(e,(e=>{st(t,e)})),it(t,(t=>{try{p(t)}catch(t){}}))}var r=C(t);if(r)for(let o=r.length-1;0<=o;--o){var i;if("string"==typeof(i=(i=r[o])&&i.name))try{t.removeAttribute(i)}catch(e){}}}function Ve(t){let e=null,r=null;ge?t="<remove></remove>"+t:r=(o=dt(t,/^[\r\n\t ]+/))&&o[0],"application/xhtml+xml"===We&&$e===Ee&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var o=k?_(t):t;if($e===Ee)try{e=(new c).parseFromString(o,We)}catch(t){}if(!e||!e.documentElement){e=M.createDocument($e,"template",null);try{e.documentElement.innerHTML=Oe?T:o}catch(t){}}return o=e.body||e.documentElement,t&&r&&o.insertBefore(i.createTextNode(r),o.childNodes[0]||null),$e===Ee?O.call(e,ce?"html":"body")[0]:ce?e.documentElement:o}function Ze(t){return t=ut(t,D," "),t=ut(t,q," "),ut(t,P," ")}function Qe(t){t.normalize();var e=A.call(t.ownerDocument||t,t,h.SHOW_TEXT|h.SHOW_COMMENT|h.SHOW_CDATA_SECTION|h.SHOW_PROCESSING_INSTRUCTION,null);let r=e.nextNode();for(;r;)r.data=Ze(r.data),r=e.nextNode();var i=null==(i=t.querySelectorAll)?void 0:i.call(t,"template");i&&it(i,(t=>{ar(t.content)&&Qe(t.content)}))}const Ke=i.createElement("form"),Je=St({},[...Lt,...Mt,...At]),tr=St({},[...Et,...Ot]),er=function(t){st(r.removed,{element:t});try{y(t).removeChild(t)}catch(e){if(p(t),!y(t))throw wt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},rr=function(t,e){try{st(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){st(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(fe||ye)try{er(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ir=function(t){return A.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},or=function(t){var e=b?b(t):null;return"string"==typeof e&&"form"===He(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==C(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==x(t)||t.childNodes!==f(t))},ar=function(t){if(!x||"object"!=typeof t||null===t)return!1;try{return x(t)===oe}catch(t){return!1}},sr=function(t){if(!x||"object"!=typeof t||null===t)return!1;try{return"number"==typeof x(t)}catch(t){return!1}};function nr(t,e,i){0!==t.length&&it(t,(t=>{t.call(r,e,i,Ue)}))}function lr(t,e,r){if(et[e])return!1;if(Ce&&("id"===e||"name"===e)&&(r in i||r in Ke))return!1;var o=X[e]||rt.attributeCheck instanceof Function&&rt.attributeCheck(e,t);if(!(vt&&kt(z,e)||Tt&&kt(R,e)))if(o){if(!Fe[e]&&!kt(H,ut(r,W,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==pt(r,"data:")||!Be[t])&&(!se||kt(N,ut(r,W,"")))&&r)return!1}else if(!(dr(t)&&(Z.tagNameCheck instanceof RegExp&&kt(Z.tagNameCheck,t)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(t))&&(Z.attributeNameCheck instanceof RegExp&&kt(Z.attributeNameCheck,e)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(e,t))||"is"===e&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&kt(Z.tagNameCheck,r)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(r))))return!1;return!0}const hr=function(t){if(nr(I.beforeSanitizeElements,t,null),or(t))er(t);else{var e,i=He(b?b(t):t.nodeName);if(nr(I.uponSanitizeElement,t,{tagName:i,allowedTags:U}),a=t,e=i,he&&a.hasChildNodes()&&!sr(a.firstElementChild)&&kt(Vt,a.textContent)&&kt(Vt,a.innerHTML)||he&&a.namespaceURI===Ee&&"style"===e&&sr(a.firstElementChild)||a.nodeType===ee||he&&a.nodeType===re&&kt(Zt,a.data))er(t);else{if(!tt[i]&&(rt.tagCheck instanceof Function&&rt.tagCheck(i)||U[i]))return(x?x(t):t.nodeType)===Jt&&!function(t){let e=y(t);e&&e.tagName||(e={namespaceURI:$e,tagName:"template"});var r=ht(t.tagName),i=ht(e.tagName);return!!Ie[t.namespaceURI]&&(t.namespaceURI===Ae?function(t,e,r){return e.namespaceURI===Ee?"svg"===t:e.namespaceURI===Me?"svg"===t&&("annotation-xml"===r||Pe[r]):Boolean(Je[t])}(r,e,i):t.namespaceURI===Me?function(t,e,r){return e.namespaceURI===Ee?"math"===t:e.namespaceURI===Ae?"math"===t&&Re[r]:Boolean(tr[t])}(r,e,i):t.namespaceURI===Ee?function(t,e,r){return!(e.namespaceURI===Ae&&!Re[r]||e.namespaceURI===Me&&!Pe[r]||tr[t])&&(Ne[t]||!Je[t])}(r,e,i):!("application/xhtml+xml"!==We||!Ie[t.namespaceURI]))}(t)||("noscript"===i||"noembed"===i||"noframes"===i)&&kt(Qt,t.innerHTML)?(er(t),!0):(le&&t.nodeType===te&&(e=Ze(t.textContent),t.textContent!==e)&&(st(r.removed,{element:t.cloneNode()}),t.textContent=e),nr(I.afterSanitizeElements,t,null),!1);var o=t,a=i;if(!tt[a]&&dr(a)){if(Z.tagNameCheck instanceof RegExp&&kt(Z.tagNameCheck,a))return!1;if(Z.tagNameCheck instanceof Function&&Z.tagNameCheck(a))return!1}if(ke&&!Se[a]){var s=y(o),n=f(o);if(n&&s)for(let t=n.length-1;0<=t;--t){var l=we?n[t]:u(n[t],!0);s.insertBefore(l,g(o))}}er(o)}}return!0},cr=St({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),dr=function(t){return!cr[ht(t)]&&kt(j,t)},ur=function(t){nr(I.beforeSanitizeAttributes,t,null);var e=t.attributes;if(e&&!or(t)){var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0};let c=e.length;for(var o=He(t.nodeName);c--;){var a=(n=e[c]).name,s=n.namespaceURI,n=n.value,l=He(a);let u="value"===a?n:gt(n);if(i.attrName=l,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,nr(I.uponSanitizeAttribute,t,i),u=i.attrValue,!xe||"id"!==l&&"name"!==l||0===pt(u,be)||(rr(a,t),u=be+u),he&&kt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u))rr(a,t);else if("attributename"===l&&dt(u,"href"))rr(a,t);else if(!i.forceKeepAttr)if(i.keepAttr)if(!ne&&kt(Kt,u))rr(a,t);else if(le&&(u=Ze(u)),lr(o,l,u)){if((u=function(t,e,r,i){if(k&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(t,e)){case"TrustedHTML":return _(i);case"TrustedScriptURL":return F(i)}return i}(o,l,s,u))!==n){l=t,n=a;var h=u;try{s?l.setAttributeNS(s,n,h):l.setAttribute(n,h),or(l)?er(l):at(r.removed)}catch(t){rr(n,l)}}}else rr(a,t);else rr(a,t)}nr(I.afterSanitizeAttributes,t,null)}},pr=function(t){var e,r=ir(t);for(nr(I.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)nr(I.uponSanitizeShadowNode,e,null),hr(e),ur(e),ar(e.content)&&pr(e.content),(x?x(e):e.nodeType)===Jt&&(e=m(e),ar(e))&&(gr(e),pr(e));nr(I.afterSanitizeShadowDOM,t,null)},gr=function(t){for(var e=[{node:t,shadow:null}];0<e.length;){if((i=e.pop()).shadow)pr(i.shadow);else{var r,i=i.node,o=(x?x(i):i.nodeType)===Jt,a=f(i);if(a)for(let t=a.length-1;0<=t;--t)e.push({node:a[t],shadow:null});o&&"string"==typeof(r=b?b(i):null)&&"template"===He(r)&&(r=i.content,ar(r))&&e.push({node:r,shadow:null}),o&&(r=m(i),ar(r))&&e.push({node:null,shadow:r},{node:r,shadow:null})}}};return r.sanitize=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};let i=null;var a;let s=null;if("string"!=typeof(t=(Oe=!t)?"\x3c!--\x3e":t)&&!sr(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return ft(t);case"boolean":return yt(t);case"bigint":return mt?mt(t):"0";case"symbol":return Ct?Ct(t):"Symbol()";case"undefined":default:return bt(t);case"function":case"object":var e,r;return null===t?bt(t):"function"==typeof(r=_t(e=t,"toString"))?"string"==typeof(r=r(e))?r:bt(r):bt(t)}}(t)))throw wt("dirty is not a string, aborting");if(!r.isSupported)return t;if(de?(U=ue,X=pe):Ge(e),(0<I.uponSanitizeElement.length||0<I.uponSanitizeAttribute.length)&&(U=Bt(U)),0<I.uponSanitizeAttribute.length&&(X=Bt(X)),r.removed=[],e=we&&"string"!=typeof t&&sr(t)){if("string"==typeof(n=b?b(t):t.nodeName)){var n=He(n);if(!U[n]||tt[n])throw wt("root node is forbidden and cannot be sanitized in-place")}if(or(t))throw wt("root node is clobbered and cannot be sanitized in-place");try{gr(t)}catch(i){throw Xe(t),i}}else if(sr(t))(n=(i=Ve("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType===Jt&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n),gr(n);else{if(!fe&&!le&&!ce&&-1===t.indexOf("<"))return k&&me?_(t):t;if(!(i=Ve(t)))return fe?null:me?T:""}i&&ge&&er(i.firstChild);var l=ir(e?t:i);try{for(;a=l.nextNode();)hr(a),ur(a),ar(a.content)&&pr(a.content)}catch(i){throw e&&Xe(t),i}if(e)return it(r.removed,(t=>{t.element&&function(t){for(var e=[t];0<e.length;){var r=e.pop();if((x?x(r):r.nodeType)===Jt){a=void 0;var i=r,o=C(i);if(o)for(let e=o.length-1;0<=e;--e){var a;if("string"==typeof(a=(a=o[e])&&a.name)&&!X[He(a)])try{i.removeAttribute(a)}catch(t){}}}var s=f(r);if(s)for(let t=s.length-1;0<=t;--t)e.push(s[t])}}(t.element)})),le&&Qe(t),t;if(fe){if(le&&Qe(i),ye)for(s=E.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return X.shadowroot||X.shadowrootmode?$.call(o,s,!0):s}let h=ce?i.outerHTML:i.innerHTML;return ce&&U["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&kt(Gt,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),le&&(h=Ze(h)),k&&me?_(h):h},r.setConfig=function(){Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}),de=!0,ue=U,pe=X},r.clearConfig=function(){Ue=null,de=!1,ue=null,pe=null,k=w,T=""},r.isValidAttribute=function(t,e,r){return Ue||Ge({}),lr(t=He(t),e=He(e),r)},r.addHook=function(t,e){"function"==typeof e&&xt(I,t)&&st(I[t],e)},r.removeHook=function(t,e){if(xt(I,t))return void 0!==e?-1===(e=ot(I[t],e))?void 0:nt(I[t],e,1)[0]:at(I[t])},r.removeHooks=function(t){xt(I,t)&&(I[t]=[])},r.removeAllHooks=function(){I={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),le=i(((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};if(Array.isArray(e)&&!Array.isArray(t))e.forEach((e=>le(t,e,o)));else if(Array.isArray(e)&&Array.isArray(t))e.forEach((e=>{t.includes(e)||t.push(e)}));else{if(void 0===t||r<=0)return 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]=le(t[o],e[o],{depth:r-1,clobber:i}))}))}return t}),"assignWithDepth"),he=le,ce="#ffffff",de="#f2f2f2",ue=i(((t,e)=>N(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),pe=class{static{i(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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10)):(this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||N(this.primaryColor,{h:30}),this.cScale4=this.cScale4||N(this.primaryColor,{h:60}),this.cScale5=this.cScale5||N(this.primaryColor,{h:90}),this.cScale6=this.cScale6||N(this.primaryColor,{h:120}),this.cScale7=this.cScale7||N(this.primaryColor,{h:150}),this.cScale8=this.cScale8||N(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||N(this.primaryColor,{h:270}),this.cScale10=this.cScale10||N(this.primaryColor,{h:300}),this.cScale11=this.cScale11||N(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||N(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||N(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||N(this.primaryColor,{h:64}),this.fillType3=this.fillType3||N(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||N(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||N(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||N(this.primaryColor,{h:128}),this.fillType7=this.fillType7||N(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||N(this.primaryColor,{l:-10}),this.pie5=this.pie5||N(this.secondaryColor,{l:-10}),this.pie6=this.pie6||N(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||N(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||N(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||N(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||N(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||N(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||N(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??N(this.primaryColor,{l:-30}),this.venn2=this.venn2??N(this.secondaryColor,{l:-30}),this.venn3=this.venn3??N(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??N(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??N(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??N(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??N(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??N(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(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||N(this.primaryColor,{h:-30}),this.git4=this.git4||N(this.primaryColor,{h:-60}),this.git5=this.git5||N(this.primaryColor,{h:-90}),this.git6=this.git6||N(this.primaryColor,{h:60}),this.git7=this.git7||N(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},ge=i((t=>{var e=new pe;return e.calculate(t),e}),"getThemeVariables"),fe=class{static{i(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=N(this.primaryColor,{h:-160}),this.primaryBorderColor=j(this.background),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(j("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=$(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=R("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=R(this.sectionBkgColor,10),this.taskBorderColor=$(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=$(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=z(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=z(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=z(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=j(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=N(this.primaryColor,{h:64}),this.fillType3=N(this.secondaryColor,{h:64}),this.fillType4=N(this.primaryColor,{h:-64}),this.fillType5=N(this.secondaryColor,{h:-64}),this.fillType6=N(this.primaryColor,{h:128}),this.fillType7=N(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||N(this.primaryColor,{h:30}),this.cScale4=this.cScale4||N(this.primaryColor,{h:60}),this.cScale5=this.cScale5||N(this.primaryColor,{h:90}),this.cScale6=this.cScale6||N(this.primaryColor,{h:120}),this.cScale7=this.cScale7||N(this.primaryColor,{h:150}),this.cScale8=this.cScale8||N(this.primaryColor,{h:210}),this.cScale9=this.cScale9||N(this.primaryColor,{h:270}),this.cScale10=this.cScale10||N(this.primaryColor,{h:300}),this.cScale11=this.cScale11||N(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||N(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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)]??z(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=z(this.secondaryColor,20),this.git1=z(this.pie2||this.secondaryColor,20),this.git2=z(this.pie3||this.tertiaryColor,20),this.git3=z(this.pie4||N(this.primaryColor,{h:-30}),20),this.git4=z(this.pie5||N(this.primaryColor,{h:-60}),20),this.git5=z(this.pie6||N(this.primaryColor,{h:-90}),10),this.git6=z(this.pie7||N(this.primaryColor,{h:60}),10),this.git7=z(this.pie8||N(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||j(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||j(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||z("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||z("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||z("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||z("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||z(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||z(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||z(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||z(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},ye=i((t=>{var e=new fe;return e.calculate(t),e}),"getThemeVariables"),me=class{static{i(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=N(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=N(this.primaryColor,{h:-160}),this.primaryBorderColor=ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=ue(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=$(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||N(this.primaryColor,{h:30}),this.cScale4=this.cScale4||N(this.primaryColor,{h:60}),this.cScale5=this.cScale5||N(this.primaryColor,{h:90}),this.cScale6=this.cScale6||N(this.primaryColor,{h:120}),this.cScale7=this.cScale7||N(this.primaryColor,{h:150}),this.cScale8=this.cScale8||N(this.primaryColor,{h:210}),this.cScale9=this.cScale9||N(this.primaryColor,{h:270}),this.cScale10=this.cScale10||N(this.primaryColor,{h:300}),this.cScale11=this.cScale11||N(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||N(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||N(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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||j(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||j(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||z(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||z(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=N(this.primaryColor,{h:64}),this.fillType3=N(this.secondaryColor,{h:64}),this.fillType4=N(this.primaryColor,{h:-64}),this.fillType5=N(this.secondaryColor,{h:-64}),this.fillType6=N(this.primaryColor,{h:128}),this.fillType7=N(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||N(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||N(this.primaryColor,{l:-10}),this.pie5=this.pie5||N(this.secondaryColor,{l:-30}),this.pie6=this.pie6||N(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||N(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||N(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||N(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||N(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||N(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||N(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??N(this.primaryColor,{l:-30}),this.venn2=this.venn2??N(this.secondaryColor,{l:-30}),this.venn3=this.venn3??N(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??N(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??N(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??N(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??N(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??N(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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||N(this.primaryColor,{h:-30}),this.git4=this.git4||N(this.primaryColor,{h:-60}),this.git5=this.git5||N(this.primaryColor,{h:-90}),this.git6=this.git6||N(this.primaryColor,{h:60}),this.git7=this.git7||N(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||R(j(this.git0),25),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||j(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;Object.keys(this).forEach((t=>{"calculated"===this[t]&&(this[t]=void 0)})),"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},Ce=i((t=>{var e=new me;return e.calculate(t),e}),"getThemeVariables"),xe=class{static{i(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=z("#cde498",10),this.primaryBorderColor=ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.primaryColor),this.lineColor=j(this.background),this.textColor=j(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=R(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||N(this.primaryColor,{h:30}),this.cScale4=this.cScale4||N(this.primaryColor,{h:60}),this.cScale5=this.cScale5||N(this.primaryColor,{h:90}),this.cScale6=this.cScale6||N(this.primaryColor,{h:120}),this.cScale7=this.cScale7||N(this.primaryColor,{h:150}),this.cScale8=this.cScale8||N(this.primaryColor,{h:210}),this.cScale9=this.cScale9||N(this.primaryColor,{h:270}),this.cScale10=this.cScale10||N(this.primaryColor,{h:300}),this.cScale11=this.cScale11||N(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||R(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||R(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||N(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]||N(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=N(this.primaryColor,{h:64}),this.fillType3=N(this.secondaryColor,{h:64}),this.fillType4=N(this.primaryColor,{h:-64}),this.fillType5=N(this.secondaryColor,{h:-64}),this.fillType6=N(this.primaryColor,{h:128}),this.fillType7=N(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||N(this.primaryColor,{l:-30}),this.pie5=this.pie5||N(this.secondaryColor,{l:-30}),this.pie6=this.pie6||N(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||N(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||N(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||N(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||N(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||N(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||N(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??N(this.primaryColor,{l:-30}),this.venn2=this.venn2??N(this.secondaryColor,{l:-30}),this.venn3=this.venn3??N(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??N(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??N(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??N(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??N(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??N(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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||N(this.primaryColor,{h:-30}),this.git4=this.git4||N(this.primaryColor,{h:-60}),this.git5=this.git5||N(this.primaryColor,{h:-90}),this.git6=this.git6||N(this.primaryColor,{h:60}),this.git7=this.git7||N(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||j(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},be=i((t=>{var e=new xe;return e.calculate(t),e}),"getThemeVariables"),ke=class{static{i(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=z(this.contrast,55),this.background="#ffffff",this.tertiaryColor=N(this.primaryColor,{h:-160}),this.primaryBorderColor=ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.lineColor=j(this.background),this.textColor=j(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||z(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=z(this.contrast,55),this.border2=this.contrast,this.actorBorder=z(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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]||N(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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=z(this.contrast,30),this.sectionBkgColor2=z(this.contrast,30),this.taskBorderColor=R(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=z(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=R(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=N(this.primaryColor,{h:64}),this.fillType3=N(this.secondaryColor,{h:64}),this.fillType4=N(this.primaryColor,{h:-64}),this.fillType5=N(this.secondaryColor,{h:-64}),this.fillType6=N(this.primaryColor,{h:128}),this.fillType7=N(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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=R(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||N(this.primaryColor,{h:-30}),this.git4=this.pie5||N(this.primaryColor,{h:-60}),this.git5=this.pie6||N(this.primaryColor,{h:-90}),this.git6=this.pie7||N(this.primaryColor,{h:60}),this.git7=this.pie8||N(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},we=i((t=>{var e=new ke;return e.calculate(t),e}),"getThemeVariables"),Te=class{static{i(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=ue(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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;var t="#ECECFE",e="#E9E9F1",r=N(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||z(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||N(t,{h:30}),this.cScale4=this.cScale4||N(t,{h:60}),this.cScale5=this.cScale5||N(t,{h:90}),this.cScale6=this.cScale6||N(t,{h:120}),this.cScale7=this.cScale7||N(t,{h:150}),this.cScale8=this.cScale8||N(t,{h:210,l:150}),this.cScale9=this.cScale9||N(t,{h:270}),this.cScale10=this.cScale10||N(t,{h:300}),this.cScale11=this.cScale11||N(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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;var i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||N(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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||N(t,{h:64}),this.fillType3=this.fillType3||N(e,{h:64}),this.fillType4=this.fillType4||N(t,{h:-64}),this.fillType5=this.fillType5||N(e,{h:-64}),this.fillType6=this.fillType6||N(t,{h:128}),this.fillType7=this.fillType7||N(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||N(t,{l:-10}),this.pie5=this.pie5||N(e,{l:-10}),this.pie6=this.pie6||N(r,{l:-10}),this.pie7=this.pie7||N(t,{h:60,l:-10}),this.pie8=this.pie8||N(t,{h:-60,l:-10}),this.pie9=this.pie9||N(t,{h:120,l:0}),this.pie10=this.pie10||N(t,{h:60,l:-20}),this.pie11=this.pie11||N(t,{h:-60,l:-20}),this.pie12=this.pie12||N(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||N(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(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||N(t,{h:-30}),this.git4=this.git4||N(t,{h:-60}),this.git5=this.git5||N(t,{h:-90}),this.git6=this.git6||N(t,{h:60}),this.git7=this.git7||N(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},Se=i((t=>{var e=new Te;return e.calculate(t),e}),"getThemeVariables"),ve=class{static{i(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=N(this.primaryColor,{h:-160}),this.primaryBorderColor=j(this.background),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(j("#323D47"),10),this.border1="#ccc",this.border2=$(255,255,255,.25),this.arrowheadColor=j(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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||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||N(this.primaryColor,{h:30}),this.cScale4=this.cScale4||N(this.primaryColor,{h:60}),this.cScale5=this.cScale5||N(this.primaryColor,{h:90}),this.cScale6=this.cScale6||N(this.primaryColor,{h:120}),this.cScale7=this.cScale7||N(this.primaryColor,{h:150}),this.cScale8=this.cScale8||N(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||N(this.primaryColor,{h:270}),this.cScale10=this.cScale10||N(this.primaryColor,{h:300}),this.cScale11=this.cScale11||N(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||N(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||N(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||N(this.primaryColor,{h:64}),this.fillType3=this.fillType3||N(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||N(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||N(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||N(this.primaryColor,{h:128}),this.fillType7=this.fillType7||N(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||N(this.primaryColor,{l:-10}),this.pie5=this.pie5||N(this.secondaryColor,{l:-10}),this.pie6=this.pie6||N(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||N(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||N(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||N(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||N(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||N(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||N(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||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},Be=i((t=>{var e=new ve;return e.calculate(t),e}),"getThemeVariables"),_e=class{static{i(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=ue("#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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;var t="#ECECFE",e="#E9E9F1",r=N(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||z(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]=R(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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;var i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||N(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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||N(t,{h:64}),this.fillType3=this.fillType3||N(e,{h:64}),this.fillType4=this.fillType4||N(t,{h:-64}),this.fillType5=this.fillType5||N(e,{h:-64}),this.fillType6=this.fillType6||N(t,{h:128}),this.fillType7=this.fillType7||N(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||N(t,{l:-10}),this.pie5=this.pie5||N(e,{l:-10}),this.pie6=this.pie6||N(r,{l:-10}),this.pie7=this.pie7||N(t,{h:60,l:-10}),this.pie8=this.pie8||N(t,{h:-60,l:-10}),this.pie9=this.pie9||N(t,{h:120,l:0}),this.pie10=this.pie10||N(t,{h:60,l:-20}),this.pie11=this.pie11||N(t,{h:-60,l:-20}),this.pie12=this.pie12||N(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||N(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(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||N(t,{h:-30}),this.git4=this.git4||N(t,{h:-60}),this.git5=this.git5||N(t,{h:-90}),this.git6=this.git6||N(t,{h:60}),this.git7=this.git7||N(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},Fe=i((t=>{var e=new _e;return e.calculate(t),e}),"getThemeVariables"),Le=class{static{i(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=N(this.primaryColor,{h:-160}),this.primaryBorderColor=j(this.background),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(j("#323D47"),10),this.border1="#ccc",this.border2=$(255,255,255,.25),this.arrowheadColor=j(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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.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||N(this.primaryColor,{h:30}),this.cScale4=this.cScale4||N(this.primaryColor,{h:60}),this.cScale5=this.cScale5||N(this.primaryColor,{h:90}),this.cScale6=this.cScale6||N(this.primaryColor,{h:120}),this.cScale7=this.cScale7||N(this.primaryColor,{h:150}),this.cScale8=this.cScale8||N(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||N(this.primaryColor,{h:270}),this.cScale10=this.cScale10||N(this.primaryColor,{h:300}),this.cScale11=this.cScale11||N(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=R(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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;var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||N(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||N(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||N(this.primaryColor,{h:64}),this.fillType3=this.fillType3||N(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||N(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||N(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||N(this.primaryColor,{h:128}),this.fillType7=this.fillType7||N(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||N(this.primaryColor,{l:-10}),this.pie5=this.pie5||N(this.secondaryColor,{l:-10}),this.pie6=this.pie6||N(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||N(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||N(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||N(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||N(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||N(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||N(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||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(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||N(this.primaryColor,{h:-30}),this.git4=this.git4||N(this.primaryColor,{h:-60}),this.git5=this.git5||N(this.primaryColor,{h:-90}),this.git6=this.git6||N(this.primaryColor,{h:60}),this.git7=this.git7||N(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},Me=i((t=>{var e=new Le;return e.calculate(t),e}),"getThemeVariables"),Ae=class{static{i(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=ue(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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;var t="#ECECFE",e="#E9E9F1",r=N(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||z(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]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(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;var i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||N(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||N(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||N(t,{h:64}),this.fillType3=this.fillType3||N(e,{h:64}),this.fillType4=this.fillType4||N(t,{h:-64}),this.fillType5=this.fillType5||N(e,{h:-64}),this.fillType6=this.fillType6||N(t,{h:128}),this.fillType7=this.fillType7||N(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||N(t,{l:-10}),this.pie5=this.pie5||N(e,{l:-10}),this.pie6=this.pie6||N(r,{l:-10}),this.pie7=this.pie7||N(t,{h:60,l:-10}),this.pie8=this.pie8||N(t,{h:-60,l:-10}),this.pie9=this.pie9||N(t,{h:120,l:0}),this.pie10=this.pie10||N(t,{h:60,l:-20}),this.pie11=this.pie11||N(t,{h:-60,l:-20}),this.pie12=this.pie12||N(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||N(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(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||N(t,{h:-30}),this.git4=this.git4||N(t,{h:-60}),this.git5=this.git5||N(t,{h:-90}),this.git6=this.git6||N(t,{h:60}),this.git7=this.git7||N(t,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},Ee=i((t=>{var e=new Ae;return e.calculate(t),e}),"getThemeVariables"),Oe=class{static{i(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=z(this.primaryColor,16),this.tertiaryColor=N(this.primaryColor,{h:-160}),this.primaryBorderColor=j(this.background),this.secondaryBorderColor=ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ue(this.tertiaryColor,this.darkMode),this.primaryTextColor=j(this.primaryColor),this.secondaryTextColor=j(this.secondaryColor),this.tertiaryTextColor=j(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=z(j("#323D47"),10),this.border1="#ccc",this.border2=$(255,255,255,.25),this.arrowheadColor=j(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||N(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||N(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ue(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ue(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ue(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ue(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||j(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||j(this.tertiaryColor),this.lineColor=this.lineColor||j(this.background),this.arrowheadColor=this.arrowheadColor||j(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?R(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||R(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||j(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||z(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.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]||j(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||z(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||R(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=R(this["cScale"+t],75);var t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||N(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||N(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||N(this.primaryColor,{h:64}),this.fillType3=this.fillType3||N(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||N(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||N(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||N(this.primaryColor,{h:128}),this.fillType7=this.fillType7||N(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||N(this.primaryColor,{l:-10}),this.pie5=this.pie5||N(this.secondaryColor,{l:-10}),this.pie6=this.pie6||N(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||N(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||N(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||N(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||N(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||N(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||N(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||N(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||N(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||N(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||N(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||N(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||N(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=(this.quadrantPointFill||q(this.quadrant1Fill)?z:R)(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?R(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||N(this.primaryColor,{h:-30}),this.git4=this.git4||N(this.primaryColor,{h:-60}),this.git5=this.git5||N(this.primaryColor,{h:-90}),this.git6=this.git6||N(this.primaryColor,{h:60}),this.git7=this.git7||N(this.primaryColor,{h:120}),this.darkMode?(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)):(this.git0=R(this.git0,25),this.git1=R(this.git1,25),this.git2=R(this.git2,25),this.git3=R(this.git3,25),this.git4=R(this.git4,25),this.git5=R(this.git5,25),this.git6=R(this.git6,25),this.git7=R(this.git7,25)),this.gitInv0=this.gitInv0||j(this.git0),this.gitInv1=this.gitInv1||j(this.git1),this.gitInv2=this.gitInv2||j(this.git2),this.gitInv3=this.gitInv3||j(this.git3),this.gitInv4=this.gitInv4||j(this.git4),this.gitInv5=this.gitInv5||j(this.git5),this.gitInv6=this.gitInv6||j(this.git6),this.gitInv7=this.gitInv7||j(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||ce,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||de}calculate(t){var e;"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach((e=>{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]})))}},$e=i((t=>{var e=new Oe;return e.calculate(t),e}),"getThemeVariables"),Ie={base:{getThemeVariables:ge},dark:{getThemeVariables:ye},default:{getThemeVariables:Ce},forest:{getThemeVariables:be},neutral:{getThemeVariables:we},neo:{getThemeVariables:Se},"neo-dark":{getThemeVariables:Be},redux:{getThemeVariables:Fe},"redux-dark":{getThemeVariables:Me},"redux-color":{getThemeVariables:Ee},"redux-dark-color":{getThemeVariables:$e}},De={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},qe={...De,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ie.default.getThemeVariables(),sequence:{...De.sequence,messageFont:i((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:i((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:i((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...De.gantt,tickInterval:void 0,useWidth:void 0},c4:{...De.c4,useWidth:void 0,personFont:i((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),flowchart:{...De.flowchart,inheritDir:!1},external_personFont:i((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:i((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:i((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:i((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:i((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:i((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:i((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:i((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:i((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:i((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:i((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:i((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:i((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:i((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:i((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:i((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:i((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:i((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:i((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:i((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:i((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...De.pie,useWidth:984},xyChart:{...De.xyChart,useWidth:void 0},requirement:{...De.requirement,useWidth:void 0},packet:{...De.packet},eventmodeling:{...De.eventmodeling},treeView:{...De.treeView,useWidth:void 0},radar:{...De.radar},railroad:{...De.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...De.ishikawa},sankey:{...De.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...De.venn},cynefin:{...De.cynefin}},Pe=i(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Pe(t[i],"")]:[...r,e+i]),[])),"keyify"),ze=new Set(Pe(qe,"")),Re=qe,Ne={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},We=i(((t,e)=>{for(const i of Object.keys(t)){var r=t[i];(i.startsWith("__")||i.includes("proto")||i.includes("constr")||"string"!=typeof r||!e.test(r))&&(h.debug("sanitize deleting dictionary entry:",i,r),delete t[i])}}),"sanitizeDictionaryConfig"),je=i((t=>{if(h.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>je(t)));else{for(const r of Object.keys(t))if(h.debug("Checking key",r),r.startsWith("__")||r.includes("proto")||r.includes("constr")||!ze.has(r)||null==t[r])h.debug("sanitize deleting key: ",r),delete t[r];else if("object"==typeof t[r]){var e=Ne[r];e?We(t[r],e):(h.debug("sanitizing object",r),je(t[r]))}else for(const e of["themeCSS","fontFamily","altFontFamily"])r.includes(e)&&(h.debug("sanitizing css option",r),t[r]=He(t[r]));if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){var r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}h.debug("After sanitization",t)}}),"sanitizeDirective"),He=i((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"),Ue=Object.freeze(Re),Ye=i((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Ge=he({},Ue),Xe=[],Ve=he({},Ue),Ze=i(((t,e)=>{t=he({},t);let r={};for(const t of e)ir(t),r=he(r,t);return t=he(t,r),r.theme&&r.theme in Ie&&(e=he({},se),e=he(e.themeVariables||{},r.themeVariables),t.theme)&&t.theme in Ie&&(t.themeVariables=Ie[t.theme].getThemeVariables(e)),hr(Ve=t),Ve}),"updateCurrentConfig"),Qe=i((t=>(Ge=he({},Ue),Ge=he(Ge,t),t.theme&&Ie[t.theme]&&(Ge.themeVariables=Ie[t.theme].getThemeVariables(t.themeVariables)),Ze(Ge,Xe),Ge)),"setSiteConfig"),Ke=i((t=>{se=he({},t)}),"saveConfigFromInitialize"),Je=i((t=>(Ge=he(Ge,t),Ze(Ge,Xe),Ge)),"updateSiteConfig"),tr=i((()=>he({},Ge)),"getSiteConfig"),er=i((t=>(hr(t),he(Ve,t),rr())),"setConfig"),rr=i((()=>he({},Ve)),"getConfig"),ir=i((t=>{t&&(["secure",...Ge.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(h.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]&&ir(t[e])})))}),"sanitize"),or=i((t=>{je(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Xe.push(t),Ze(Ge,Xe)}),"addDirective"),ar=i(((t=Ge)=>{Ze(t,Xe=[])}),"reset"),sr={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."},nr={},lr=i((t=>{nr[t]||(h.warn(sr[t]),nr[t]=!0)}),"issueWarning"),hr=i((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&lr("LAZY_LOAD_DEPRECATED")}),"checkConfig"),cr=i((()=>{let t={};se&&(t=he(t,se));for(const e of Xe)t=he(t,e);return t}),"getUserDefinedConfig"),dr=i((t=>(null!=t.flowchart?.htmlLabels&&lr("FLOWCHART_HTML_LABELS_DEPRECATED"),Ye(t.htmlLabels??t.flowchart?.htmlLabels??!0))),"getEffectiveHtmlLabels"),ur=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,pr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,gr=/\s*%%.*\n/gm,fr=class extends Error{static{i(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},yr={},mr=i((function(t,e){for(var[r,{detector:i}]of(t=t.replace(ur,"").replace(pr,"").replace(gr,"\n"),Object.entries(yr)))if(i(t,e))return r;throw new fr("No diagram type detected matching given configuration for text: "+t)}),"detectType"),Cr=i(((...t)=>{for(var{id:e,detector:r,loader:i}of t)xr(e,r,i)}),"registerLazyLoadedDiagrams"),xr=i(((t,e,r)=>{yr[t]&&h.warn(`Detector with key ${t} already exists. Overwriting.`),yr[t]={detector:e,loader:r},h.debug(`Detector with key ${t} added`+(r?" with loader":""))}),"addDetector"),br=i((t=>yr[t].loader),"getDiagramLoader"),kr=/<br\s*\/?>/gi,wr=i((t=>t?Er(t).replace(/\\n/g,"#br#").split("#br#"):[""]),"getRows"),Tr=(()=>{let t=!1;return()=>{t||(Sr(),t=!0)}})();function Sr(){const t="data-temp-href-target";ne.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),ne.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")}))}i(Sr,"setupDompurifyHooks");var vr=i((t=>(Tr(),ne.sanitize(t))),"removeScript"),Br=i(((t,e)=>(dr(e)&&("antiscript"===(e=e.securityLevel)||"strict"===e||"sandbox"===e?t=vr(t):"loose"!==e&&(t=(t=(t=Er(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Ar(t))),t)),"sanitizeMore"),_r=i(((t,e)=>t&&(e.dompurifyConfig?ne.sanitize(Br(t,e),e.dompurifyConfig):ne.sanitize(Br(t,e),{FORBID_TAGS:["style"]})).toString()),"sanitizeText"),Fr=i(((t,e)=>"string"==typeof t?_r(t,e):t.flat().map((t=>_r(t,e)))),"sanitizeTextOrArray"),Lr=i((t=>kr.test(t)),"hasBreaks"),Mr=i((t=>t.split(kr)),"splitBreaks"),Ar=i((t=>t.replace(/#br#/g,"<br/>")),"placeholderToBreak"),Er=i((t=>t.replace(kr,"#br#")),"breakToPlaceholder"),Or=i((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e}),"getUrl"),$r=i((function(...t){return t=t.filter((t=>!isNaN(t))),Math.max(...t)}),"getMax"),Ir=i((function(...t){return t=t.filter((t=>!isNaN(t))),Math.min(...t)}),"getMin"),Dr=i((function(t){var e,r,i=t.split(/(,)/),o=[];for(let t=0;t<i.length;t++){let a=i[t];","===a&&0<t&&t+1<i.length&&(e=i[t-1],r=i[t+1],Pr(e,r))&&(a=e+","+r,t++,o.pop()),o.push(zr(a))}return o.join("")}),"parseGenericTypes"),qr=i(((t,e)=>Math.max(0,t.split(e).length-1)),"countOccurrence"),Pr=i(((t,e)=>(t=qr(t,"~"),e=qr(e,"~"),1===t&&1===e)),"shouldCombineSets"),zr=i((t=>{var e=qr(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);var 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"),Rr=i((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Nr=/\$\$(.*?)\$\$/g,Wr=i((t=>0<(t.match(Nr)?.length??0)),"hasKatex"),jr=i((async(t,e)=>{var r=document.createElement("div");return r.innerHTML=await Ur(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r),t={width:r.clientWidth,height:r.clientHeight},r.remove(),t}),"calculateMathMLDimensions"),Hr=i((async(t,e)=>{if(!Wr(t))return t;if(!(Rr()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Nr,"MathML is unsupported in this environment.");{const r=(await import("./katex-67456a45.js")).default,i=e.forceLegacyMathML||!Rr()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(kr).map((t=>Wr(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`)).join("").replace(Nr,((t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,"")))}}),"renderKatexUnsanitized"),Ur=i((async(t,e)=>_r(await Hr(t,e),e)),"renderKatexSanitized"),Yr={getRows:wr,sanitizeText:_r,sanitizeTextOrArray:Fr,hasBreaks:Lr,splitBreaks:Mr,lineBreakRegex:kr,removeScript:vr,getUrl:Or,evaluate:Ye,getMax:$r,getMin:Ir},Gr=i((function(t,e){for(var r of e)t.attr(r[0],r[1])}),"d3Attrs"),Xr=i((function(t,e,r){var 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"),Vr=i((function(t,e,r,i){e=Xr(e,r,i),Gr(t,e)}),"configureSvgSize"),Zr=i((function(t,e,r,i){var o=e.node().getBBox(),a=o.width,s=o.height;h.info(`SVG bounds: ${a}x`+s,o),h.info("Graph bounds: 0x0",t),h.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Vr(e,a,t,i),s=`${o.x-r} ${o.y-r} ${o.width+2*r} `+(o.height+2*r);e.attr("viewBox",s)}),"setupGraphViewbox"),Qr={};function Kr(t){return[...t.cssRules].map((t=>t.cssText)).join("\n")}i(Kr,"cssStyleSheetToString");var Jr=i(((t,e,r,i)=>{let o="";return t in Qr&&Qr[t]?o=Qr[t]({...r,svgId:i}):h.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 [data-look="neo"].swimlane.cluster rect {\n filter: 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"),ti=i(((t,e)=>{void 0!==e&&(Qr[t]=e)}),"addStylesForDiagram"),ei=Jr,ri={},ii=(o(ri,{clear:()=>ni,getAccDescription:()=>di,getAccTitle:()=>hi,getDiagramTitle:()=>pi,setAccDescription:()=>ci,setAccTitle:()=>li,setDiagramTitle:()=>ui}),""),oi="",ai="",si=i((t=>_r(t,rr())),"sanitizeText"),ni=i((()=>{oi=ai=ii=""}),"clear"),li=i((t=>{ii=si(t).replace(/^\s+/g,"")}),"setAccTitle"),hi=i((()=>ii),"getAccTitle"),ci=i((t=>{ai=si(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),di=i((()=>ai),"getAccDescription"),ui=i((t=>{oi=si(t)}),"setDiagramTitle"),pi=i((()=>oi),"getDiagramTitle"),gi=h,fi=c,yi=rr,mi=er,Ci=Ue,xi=i((t=>_r(t,yi())),"sanitizeText"),bi=Zr,ki=i((()=>ri),"getCommonDb"),wi={},Ti=i(((t,e,r)=>{wi[t]&&gi.warn(`Diagram with id ${t} already registered. Overwriting.`),wi[t]=e,r&&xr(t,r),ti(t,e.styles),e.injectUtils?.(gi,fi,yi,xi,bi,ki(),(()=>{}))}),"registerDiagram"),Si=i((t=>{if(t in wi)return wi[t];throw new vi(t)}),"getDiagram"),vi=class extends Error{static{i(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}},Bi={value:()=>{}};function _i(){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 Fi(i)}function Fi(t){this._=t}function Li(t,e){for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).name===e)return r.value}function Mi(t,e,r){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=Bi,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}Fi.prototype=_i.prototype={constructor:Fi,on:function(t,e){var r,i=this._,o=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var r="",i=t.indexOf(".");if(0<=i&&(r=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}(t+"",i),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(r=(t=o[a]).type)i[r]=Mi(i[r],t.name,e);else if(null==e)for(r in i)i[r]=Mi(i[r],t.name,null);return this}for(;++a<s;)if(r=(r=(t=o[a]).type)&&Li(i[r],t.name))return r},copy:function(){var t,e={},r=this._;for(t in r)e[t]=r[t].slice();return new Fi(e)},call:function(t,e){if(0<(r=arguments.length-2))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 Ai="http://www.w3.org/1999/xhtml",Ei={svg:"http://www.w3.org/2000/svg",xhtml:Ai,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oi(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),Ei.hasOwnProperty(e)?{space:Ei[e],local:t}:t}function $i(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Ai&&e.documentElement.namespaceURI===Ai?e.createElement(t):e.createElementNS(r,t)}}function Ii(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Di(t){return((t=Oi(t)).local?Ii:$i)(t)}function qi(){}function Pi(t){return null==t?qi:function(){return this.querySelector(t)}}function zi(){return[]}function Ri(t){return null==t?zi:function(){return this.querySelectorAll(t)}}function Ni(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function Wi(t){return function(){return this.matches(t)}}function ji(t){return function(e){return e.matches(t)}}var Hi=Array.prototype.find;function Ui(){return this.firstElementChild}var Yi=Array.prototype.filter;function Gi(){return Array.from(this.children)}function Xi(t){return new Array(t.length)}function Vi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Zi(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 Vi(t,a[n]);for(;n<l;++n)(s=e[n])&&(o[n]=s)}function Qi(t,e,r,i,o,a,s){for(var n,l,h=new Map,c=e.length,d=a.length,u=new Array(c),p=0;p<c;++p)(n=e[p])&&(u[p]=l=s.call(n,n.__data__,p,e)+"",h.has(l)?o[p]=n:h.set(l,n));for(p=0;p<d;++p)l=s.call(t,a[p],p,a)+"",(n=h.get(l))?((i[p]=n).__data__=a[p],h.delete(l)):r[p]=new Vi(t,a[p]);for(p=0;p<c;++p)(n=e[p])&&h.get(u[p])===n&&(o[p]=n)}function Ki(t){return t.__data__}function Ji(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function to(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}function eo(t){return function(){this.removeAttribute(t)}}function ro(t){return function(){this.removeAttributeNS(t.space,t.local)}}function io(t,e){return function(){this.setAttribute(t,e)}}function oo(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ao(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function so(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 no(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function lo(t){return function(){this.style.removeProperty(t)}}function ho(t,e,r){return function(){this.style.setProperty(t,e,r)}}function co(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function uo(t,e){return t.style.getPropertyValue(e)||no(t).getComputedStyle(t,null).getPropertyValue(e)}function po(t){return function(){delete this[t]}}function go(t,e){return function(){this[t]=e}}function fo(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function yo(t){return t.trim().split(/^|\s+/)}function mo(t){return t.classList||new Co(t)}function Co(t){this._node=t,this._names=yo(t.getAttribute("class")||"")}function xo(t,e){for(var r=mo(t),i=-1,o=e.length;++i<o;)r.add(e[i])}function bo(t,e){for(var r=mo(t),i=-1,o=e.length;++i<o;)r.remove(e[i])}function ko(t){return function(){xo(this,t)}}function wo(t){return function(){bo(this,t)}}function To(t,e){return function(){(e.apply(this,arguments)?xo:bo)(this,t)}}function So(){this.textContent=""}function vo(t){return function(){this.textContent=t}}function Bo(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function _o(){this.innerHTML=""}function Fo(t){return function(){this.innerHTML=t}}function Lo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Mo(){this.nextSibling&&this.parentNode.appendChild(this)}function Ao(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Eo(){return null}function Oo(){var t=this.parentNode;t&&t.removeChild(this)}function $o(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Io(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Do(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 qo(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 Po(t,e,r){var i=no(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 zo(t,e){return function(){return Po(this,t,e)}}function Ro(t,e){return function(){return Po(this,t,e.apply(this,arguments))}}Vi.prototype={constructor:Vi,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)}},Co.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return 0<=this._names.indexOf(t)}};var No=[null];function Wo(t,e){this._groups=t,this._parents=e}function jo(){return new Wo([[document.documentElement]],No)}function Ho(t){return"string"==typeof t?new Wo([[document.querySelector(t)]],[document.documentElement]):new Wo([[t]],No)}function Uo(t,e,r){(t.prototype=e.prototype=r).constructor=t}function Yo(t,e){var r,i=Object.create(t.prototype);for(r in e)i[r]=e[r];return i}function Go(){}Wo.prototype=jo.prototype={constructor:Wo,select:function(t){"function"!=typeof t&&(t=Pi(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 Wo(i,this._parents)},selectAll:function(t){t=("function"==typeof t?Ni:Ri)(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 Wo(i,o)},selectChild:function(t){return this.select(null==t?Ui:function(t){return function(){return Hi.call(this.children,t)}}("function"==typeof t?t:ji(t)))},selectChildren:function(t){return this.selectAll(null==t?Gi:function(t){return function(){return Yi.call(this.children,t)}}("function"==typeof t?t:ji(t)))},filter:function(t){"function"!=typeof t&&(t=Wi(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 Wo(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Ki);var r=e?Qi:Zi,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=Ji(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,b=0;x<g;++x)if(m=f[x]){for(b<=x&&(b=x+1);!(C=y[b])&&++b<g;);m._next=C||null}}return(s=new Wo(s,i))._enter=n,s._exit=l,s},enter:function(){return new Wo(this._enter||this._groups.map(Xi),this._parents)},exit:function(){return new Wo(this._exit||this._groups.map(Xi),this._parents)},join:function(t,e,r){var i=this.enter(),o=this,a=this.exit();return i="function"==typeof t?(i=t(i))&&i.selection():i.append(t+""),null!=e&&(o=(o=e(o))&&o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(t){t=t.selection?t.selection():t;for(var e=this._groups,r=t._groups,i=e.length,o=(t=r.length,Math.min(i,t)),a=new Array(i),s=0;s<o;++s)for(var n,l=e[s],h=r[s],c=l.length,d=a[s]=new Array(c),u=0;u<c;++u)(n=l[u]||h[u])&&(d[u]=n);for(;s<i;++s)a[s]=e[s];return new Wo(a,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];0<=--a;)(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||to;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 Wo(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,i=Oi(t);return arguments.length<2?(r=this.node(),i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)):this.each((null==e?i.local?ro:eo:"function"==typeof e?i.local?so:ao:i.local?oo:io)(i,e))},style:function(t,e,r){return 1<arguments.length?this.each((null==e?lo:"function"==typeof e?co:ho)(t,e,null==r?"":r)):uo(this.node(),t)},property:function(t,e){return 1<arguments.length?this.each((null==e?po:"function"==typeof e?fo:go)(t,e)):this.node()[t]},classed:function(t,e){var r=yo(t+"");if(arguments.length<2){for(var i=mo(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof e?To:e?ko:wo)(r,e))},text:function(t){return arguments.length?this.each(null==t?So:("function"==typeof t?Bo:vo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?_o:("function"==typeof t?Lo:Fo)(t)):this.node().innerHTML},raise:function(){return this.each(Mo)},lower:function(){return this.each(Ao)},append:function(t){var e="function"==typeof t?t:Di(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var r="function"==typeof t?t:Di(t),i=null==e?Eo:"function"==typeof e?e:Pi(e);return this.select((function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(Oo)},clone:function(t){return this.select(t?Io:$o)},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 0<=r&&(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?qo:Do,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?Ro:zo)(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 Xo=.7,Vo=1/Xo,Zo="\\s*([+-]?\\d+)\\s*",Qo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ko="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Jo=/^#([0-9a-f]{3,8})$/,ta=new RegExp(`^rgb\\(${Zo},${Zo},${Zo}\\)$`),ea=new RegExp(`^rgb\\(${Ko},${Ko},${Ko}\\)$`),ra=new RegExp(`^rgba\\(${Zo},${Zo},${Zo},${Qo}\\)$`),ia=new RegExp(`^rgba\\(${Ko},${Ko},${Ko},${Qo}\\)$`),oa=new RegExp(`^hsl\\(${Qo},${Ko},${Ko}\\)$`),aa=new RegExp(`^hsla\\(${Qo},${Ko},${Ko},${Qo}\\)$`),sa={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function na(){return this.rgb().formatHex()}function la(){return this.rgb().formatRgb()}function ha(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Jo.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?ca(e):3===r?new ga(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?da(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?da(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ta.exec(t))?new ga(e[1],e[2],e[3],1):(e=ea.exec(t))?new ga(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ra.exec(t))?da(e[1],e[2],e[3],e[4]):(e=ia.exec(t))?da(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=oa.exec(t))?ba(e[1],e[2]/100,e[3]/100,1):(e=aa.exec(t))?ba(e[1],e[2]/100,e[3]/100,e[4]):sa.hasOwnProperty(t)?ca(sa[t]):"transparent"===t?new ga(NaN,NaN,NaN,0):null}function ca(t){return new ga(t>>16&255,t>>8&255,255&t,1)}function da(t,e,r,i){return new ga(t=i<=0?e=r=NaN:t,e,r,i)}function ua(t){return(t=t instanceof Go?t:ha(t))?new ga((t=t.rgb()).r,t.g,t.b,t.opacity):new ga}function pa(t,e,r,i){return 1===arguments.length?ua(t):new ga(t,e,r,null==i?1:i)}function ga(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function fa(){return"#"+xa(this.r)+xa(this.g)+xa(this.b)}function ya(){var t=ma(this.opacity);return(1===t?"rgb(":"rgba(")+Ca(this.r)+`, ${Ca(this.g)}, `+Ca(this.b)+(1===t?")":`, ${t})`)}function ma(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ca(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function xa(t){return((t=Ca(t))<16?"0":"")+t.toString(16)}function ba(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new wa(t,e,r,i)}function ka(t){var e,r,i,o,a,s,n,l;return t instanceof wa?new wa(t.h,t.s,t.l,t.opacity):(t=t instanceof Go?t:ha(t))?t instanceof wa?t:(e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,o=Math.min(e,r,i),s=NaN,l=((a=Math.max(e,r,i))+o)/2,(n=a-o)?(s=e===a?(r-i)/n+6*(r<i):r===a?(i-e)/n+2:(e-r)/n+4,n/=l<.5?a+o:2-a-o,s*=60):n=0<l&&l<1?0:s,new wa(s,n,l,t.opacity)):new wa}function wa(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Ta(t){return(t=(t||0)%360)<0?t+360:t}function Sa(t){return Math.max(0,Math.min(1,t||0))}function va(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}Uo(Go,ha,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:na,formatHex:na,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ka(this).formatHsl()},formatRgb:la,toString:la}),Uo(ga,pa,Yo(Go,{brighter(t){return t=null==t?Vo:Math.pow(Vo,t),new ga(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Xo:Math.pow(Xo,t),new ga(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ga(Ca(this.r),Ca(this.g),Ca(this.b),ma(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fa,formatHex:fa,formatHex8:function(){return"#"+xa(this.r)+xa(this.g)+xa(this.b)+xa(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:ya,toString:ya})),Uo(wa,(function(t,e,r,i){return 1===arguments.length?ka(t):new wa(t,e,r,null==i?1:i)}),Yo(Go,{brighter(t){return t=null==t?Vo:Math.pow(Vo,t),new wa(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Xo:Math.pow(Xo,t),new wa(this.h,this.s,this.l*t,this.opacity)},rgb(){var t,e=this.h%360+360*(this.h<0),r=isNaN(e)||isNaN(this.s)?0:this.s;return new ga(va(240<=e?e-240:120+e,t=2*(t=this.l)-(r=t+(t<.5?t:1-t)*r),r),va(e,t,r),va(e<120?240+e:e-120,t,r),this.opacity)},clamp(){return new wa(Ta(this.h),Sa(this.s),Sa(this.l),ma(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=ma(this.opacity);return(1===t?"hsl(":"hsla(")+Ta(this.h)+`, ${100*Sa(this.s)}%, ${100*Sa(this.l)}%`+(1===t?")":`, ${t})`)}}));var Ba=t=>()=>t;function _a(t,e){return function(r){return t+r*e}}function Fa(t,e){var r=e-t;return r?_a(t,180<r||r<-180?r-360*Math.round(r/360):r):Ba(isNaN(t)?e:t)}function La(t){return 1==(t=+t)?Ma:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):Ba(isNaN(e)?r:e)}}function Ma(t,e){var r=e-t;return r?_a(t,r):Ba(isNaN(t)?e:t)}var Aa=function t(e){var r=La(e);function i(t,e){var i=r((t=pa(t)).r,(e=pa(e)).r),o=r(t.g,e.g),a=r(t.b,e.b),s=Ma(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=a(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function Ea(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Oa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$a=new RegExp(Oa.source,"g");function Ia(t,e){var r,i,o,a=Oa.lastIndex=$a.lastIndex=0,s=-1,n=[],l=[];for(t+="",e+="";(r=Oa.exec(t))&&(i=$a.exec(e));)(o=i.index)>a&&(o=e.slice(a,o),n[s]?n[s]+=o:n[++s]=o),(r=r[0])===(i=i[0])?n[s]?n[s]+=i:n[++s]=i:(n[++s]=null,l.push({i:s,x:Ea(r,i)})),a=$a.lastIndex;return a<e.length&&(o=e.slice(a),n[s]?n[s]+=o:n[++s]=o),n.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)n[(r=l[i]).i]=r.x(t);return n.join("")})}var Da,qa=180/Math.PI,Pa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function za(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)*qa,skewX:Math.atan(l)*qa,scaleX:s,scaleY:n}}function Ra(t,e,r,i){function o(t){return t.length?t.pop()+" ":""}return function(a,s){var n,l,h,c,d,u,p,g,f=[],y=[];return a=t(a),s=t(s),h=a.translateX,c=a.translateY,p=s.translateX,u=s.translateY,d=f,l=y,h!==p||c!==u?(n=d.push("translate(",null,e,null,r),l.push({i:n-4,x:Ea(h,p)},{i:n-2,x:Ea(c,u)})):(p||u)&&d.push("translate("+p+e+u+r),l=a.rotate,h=s.rotate,n=f,c=y,l!==h?(180<l-h?h+=360:180<h-l&&(l+=360),c.push({i:n.push(o(n)+"rotate(",null,i)-2,x:Ea(l,h)})):h&&n.push(o(n)+"rotate("+h+i),d=a.skewX,p=s.skewX,u=f,c=y,d!==p?c.push({i:u.push(o(u)+"skewX(",null,i)-2,x:Ea(d,p)}):p&&u.push(o(u)+"skewX("+p+i),l=a.scaleX,h=a.scaleY,c=s.scaleX,d=s.scaleY,u=f,p=y,l!==c||h!==d?(g=u.push(o(u)+"scale(",null,",",null,")"),p.push({i:g-4,x:Ea(l,c)},{i:g-2,x:Ea(h,d)})):1===c&&1===d||u.push(o(u)+"scale("+c+","+d+")"),a=s=null,function(t){for(var e,r=-1,i=y.length;++r<i;)f[(e=y[r]).i]=e.x(t);return f.join("")}}}var Na,Wa,ja=Ra((function(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?Pa:za(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Ha=Ra((function(t){return null!=t&&((Da=Da||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=Da.transform.baseVal.consolidate())?za((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Pa}),", ",")",")"),Ua=0,Ya=0,Ga=0,Xa=1e3,Va=0,Za=0,Qa=0,Ka="object"==typeof performance&&performance.now?performance:Date,Ja="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ts(){return Za||(Ja(es),Za=Ka.now()+Qa)}function es(){Za=0}function rs(){this._call=this._time=this._next=null}function is(t,e,r){var i=new rs;return i.restart(t,e,r),i}function os(){Za=(Va=Ka.now())+Qa,Ua=Ya=0;try{!function(){ts(),++Ua;for(var t,e=Na;e;)0<=(t=Za-e._time)&&e._call.call(void 0,t),e=e._next;--Ua}()}finally{Ua=0,function(){for(var t,e,r=Na,i=1/0;r;)r=r._call?(i>r._time&&(i=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Na=e);Wa=t,ss(i)}(),Za=0}}function as(){var t=Ka.now(),e=t-Va;Xa<e&&(Qa-=e,Va=t)}function ss(t){Ua||(Ya=Ya&&clearTimeout(Ya),24<t-Za?(t<1/0&&(Ya=setTimeout(os,t-Ka.now()-Qa)),Ga=Ga&&clearInterval(Ga)):(Ga||(Va=Ka.now(),Ga=setInterval(as,Xa)),Ua=1,Ja(os)))}function ns(t,e,r){var i=new rs;return e=null==e?0:+e,i.restart((r=>{i.stop(),t(r+e)}),e,r),i}rs.prototype=is.prototype={constructor:rs,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?ts():+r)+(null==e?0:+e),this._next||Wa===this||(Wa?Wa._next=this:Na=this,Wa=this),this._call=t,this._time=r,ss()},stop:function(){this._call&&(this._call=null,this._time=1/0,ss())}};var ls=_i("start","end","cancel","interrupt"),hs=[],cs=0,ds=1,us=2,ps=3,gs=4,fs=5,ys=6;function ms(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(l){var h,c,d,u;if(r.state!==ds)return n();for(h in o)if((u=o[h]).name===r.name){if(u.state===ps)return ns(a);u.state===gs?(u.state=ys,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete o[h]):+h<e&&(u.state=ys,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete o[h])}if(ns((function(){r.state===ps&&(r.state=gs,r.timer.restart(s,r.delay,r.time),s(l))})),r.state=us,r.on.call("start",t,t.__data__,r.index,r.group),r.state===us){for(r.state=ps,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 s(e){for(var o=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(n),r.state=fs,1),a=-1,s=i.length;++a<s;)i[a].call(t,o);r.state===fs&&(r.on.call("end",t,t.__data__,r.index,r.group),n())}function n(){for(var i in r.state=ys,r.timer.stop(),delete o[e],o)return;delete t.__transition}(o[e]=r).timer=is((function(t){r.state=ds,r.timer.restart(a,r.delay,r.time),r.delay<=t&&a(t-r.delay)}),0,r.time)}(t,r,{name:e,index:i,group:o,on:ls,tween:hs,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:cs})}function Cs(t,e){if((t=bs(t,e)).state>cs)throw new Error("too late; already scheduled");return t}function xs(t,e){if((t=bs(t,e)).state>ps)throw new Error("too late; already running");return t}function bs(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function ks(t,e){var r,i;return function(){var o=xs(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 ws(t,e,r){var i,o;if("function"!=typeof r)throw new Error;return function(){var a=xs(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 Ts(t,e,r){var i=t._id;return t.each((function(){var t=xs(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)})),function(t){return bs(t,i).value[e]}}function Ss(t,e){var r;return("number"==typeof e?Ea:e instanceof ha?Aa:(r=ha(e))?(e=r,Aa):Ia)(t,e)}function vs(t){return function(){this.removeAttribute(t)}}function Bs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _s(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 Fs(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 Ls(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 Ms(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 As(t,e){var r,i;function o(){var o=e.apply(this,arguments);return r=o!==i?(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 Es(t,e){var r,i;function o(){var o=e.apply(this,arguments);return r=o!==i?(i=o)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,o):r}return o._value=e,o}function Os(t,e){return function(){Cs(this,t).delay=+e.apply(this,arguments)}}function $s(t,e){return e=+e,function(){Cs(this,t).delay=e}}function Is(t,e){return function(){xs(this,t).duration=+e.apply(this,arguments)}}function Ds(t,e){return e=+e,function(){xs(this,t).duration=e}}var qs=jo.prototype.constructor;function Ps(t){return function(){this.style.removeProperty(t)}}var zs=0;function Rs(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Ns(){return++zs}var Ws=jo.prototype;Rs.prototype={constructor:Rs,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Pi(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,ms(d[u],e,r,u,d,bs(n,r)));return new Rs(a,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Ri(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=bs(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&ms(u,e,r,f,p,g);a.push(p),s.push(l)}return new Rs(a,s,e,r)},selectChild:Ws.selectChild,selectChildren:Ws.selectChildren,filter:function(t){"function"!=typeof t&&(t=Wi(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 Rs(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=(t=r.length,Math.min(i,t)),a=new Array(i),s=0;s<o;++s)for(var n,l=e[s],h=r[s],c=l.length,d=a[s]=new Array(c),u=0;u<c;++u)(n=l[u]||h[u])&&(d[u]=n);for(;s<i;++s)a[s]=e[s];return new Rs(a,this._parents,this._name,this._id)},selection:function(){return new qs(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=Ns(),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])&&ms(s,t,r,h,n,{time:(s=bs(s,e)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new Rs(i,this._parents,t,r)},call:Ws.call,nodes:Ws.nodes,node:Ws.node,size:Ws.size,empty:Ws.empty,each:Ws.each,on:function(t,e){var r=this._id;return arguments.length<2?bs(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!(t=0<=e?t.slice(0,e):t)||"start"===t}))}(e)?Cs:xs;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=Oi(t),i="transform"===r?Ha:Ss;return this.attrTween(t,"function"==typeof e?(r.local?Ms:Ls)(r,i,Ts(this,"attr."+t,e)):null==e?(r.local?Bs:vs)(r):(r.local?Fs:_s)(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=Oi(t);return this.tween(r,(i.local?As:Es)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?ja:Ss;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var a=uo(this,t),s=(this.style.removeProperty(t),uo(this,t));return a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}(t,i)).on("end.style."+t,Ps(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,a;return function(){var s=uo(this,t),n=r(this),l=n+"";return null==n&&(this.style.removeProperty(t),l=n=uo(this,t)),s===l?null:s===i&&l===o?a:(o=l,a=e(i=s,n))}}(t,i,Ts(this,"style."+t,e))).each(function(t,e){var r,i,o,a,s="style."+e,n="end."+s;return function(){var l=xs(this,t),h=l.on,c=null==l.value[s]?a=a||Ps(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=uo(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 i=a!==o?(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}}(Ts(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 e=i!==r?(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,r=this.parentNode;for(e in this.__transition)if(+e!==t)return;r&&r.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,o=bs(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?ks:ws)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Os:$s)(e,t)):bs(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Is:Ds)(e,t)):bs(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(){xs(this,t).ease=e}}(e,t)):bs(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;xs(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=xs(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]:Ws[Symbol.iterator]};var js={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Hs(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}jo.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?s=!1:(i=r.state>us&&r.state<fs,r.state=ys,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[o]);s&&delete t.__transition}}(this,t)}))},jo.prototype.transition=function(t){var e,r;t=t instanceof Rs?(e=t._id,t._name):(e=Ns(),(r=js).time=ts(),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])&&ms(s,t,e,h,n,r||Hs(s,e));return new Rs(i,this._parents,t,e)};const Us=Math.PI,Ys=2*Us,Gs=1e-6,Xs=Ys-Gs;function Vs(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Zs{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Vs:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return Vs;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,o,a){this._append`C${+t},${+e},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,e,r,i,o){if(t=+t,e=+e,r=+r,i=+i,(o=+o)<0)throw new Error("negative radius: "+o);var a,s,n=this._x1,l=this._y1,h=r-t,c=i-e,d=n-t,u=l-e,p=d*d+u*u;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:p>Gs&&(Math.abs(u*h-c*d)>Gs&&o?(s=h*h+c*c,i=(r-=n)*r+(n=i-l)*n,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=o*Math.tan((Us-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>Gs&&this._append`L${t+p*d},${e+p*u}`,this._append`A${o},${o},0,0,${+(d*n<u*r)},${this._x1=t+i*h},${this._y1=e+i*c}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,r,i,o,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error("negative radius: "+r);let s=r*Math.cos(i),n=r*Math.sin(i),l=t+s,h=e+n,c=1^a,d=a?i-o:o-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Gs||Math.abs(this._y1-h)>Gs)&&this._append`L${l},${h}`,r&&((d=d<0?d%Ys+Ys:d)>Xs?this._append`A${r},${r},0,1,${c},${t-s},${e-n}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:d>Gs&&this._append`A${r},${r},0,${+(d>=Us)},${c},${this._x1=t+r*Math.cos(o)},${this._y1=e+r*Math.sin(o)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Qs(t){return function(){return t}}const Ks=Math.abs,Js=Math.atan2,tn=Math.cos,en=Math.max,rn=Math.min,on=Math.sin,an=Math.sqrt,sn=1e-12,nn=Math.PI,ln=nn/2,hn=2*nn;function cn(t){return 1<t?0:t<-1?nn:Math.acos(t)}function dn(t){return 1<=t?ln:t<=-1?-ln:Math.asin(t)}function un(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{var i=Math.floor(r);if(!(0<=i))throw new RangeError("invalid digits: "+r);e=i}return t},()=>new Zs(e)}function pn(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function gn(t){this._context=t}function fn(t){return new gn(t)}function yn(t){return t[0]}function mn(t){return t[1]}function Cn(t,e){var r=Qs(!0),i=null,o=fn,a=null,s=un(n);function n(n){var l,h,c,d=(n=pn(n)).length,u=!1;for(null==i&&(a=o(c=s())),l=0;l<=d;++l)!(l<d&&r(h=n[l],l,n))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+t(h,l,n),+e(h,l,n));if(c)return a=null,c+""||null}return t="function"==typeof t?t:void 0===t?yn:Qs(t),e="function"==typeof e?e:void 0===e?mn:Qs(e),n.x=function(e){return arguments.length?(t="function"==typeof e?e:Qs(+e),n):t},n.y=function(t){return arguments.length?(e="function"==typeof t?t:Qs(+t),n):e},n.defined=function(t){return arguments.length?(r="function"==typeof t?t:Qs(!!t),n):r},n.curve=function(t){return arguments.length?(o=t,null!=i&&(a=o(i)),n):o},n.context=function(t){return arguments.length?(null==t?i=a=null:a=o(i=t),n):i},n}gn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(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;default:this._context.lineTo(t,e)}}};class xn{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function bn(t){return new xn(t,!0)}function kn(t){return new xn(t,!1)}function wn(){}function Tn(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Sn(t){this._context=t}function vn(t){return new Sn(t)}function Bn(t){this._context=t}function _n(t){this._context=t}function Fn(t,e){this._basis=new Sn(t),this._beta=e}Sn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tn(this,this._x1,this._y1);case 2:this._context.lineTo(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tn(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Bn.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Tn(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||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;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Tn(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Fn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(0<r)for(var i,o=t[0],a=e[0],s=t[r]-o,n=e[r]-a,l=-1;++l<=r;)this._basis.point(this._beta*t[l]+(1-this._beta)*(o+(i=l/r)*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 Ln=function t(e){function r(t){return 1===e?new Sn(t):new Fn(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function Mn(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 An(t,e){this._context=t,this._k=(1-e)/6}An.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:Mn(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:Mn(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 En=function t(e){function r(t){return new An(t,e)}return r.tension=function(e){return t(+e)},r}(0);function On(t,e){this._context=t,this._k=(1-e)/6}On.prototype={areaStart:wn,areaEnd:wn,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:Mn(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 $n=function t(e){function r(t){return new On(t,e)}return r.tension=function(e){return t(+e)},r}(0);function In(t,e){this._context=t,this._k=(1-e)/6}In.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:Mn(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 Dn=function t(e){function r(t){return new In(t,e)}return r.tension=function(e){return t(+e)},r}(0);function qn(t,e,r){var i,o,a=t._x1,s=t._y1,n=t._x2,l=t._y2;t._l01_a>sn&&(i=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,o=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*i-t._x0*t._l12_2a+t._x2*t._l01_2a)/o,s=(s*i-t._y0*t._l12_2a+t._y2*t._l01_2a)/o),t._l23_a>sn&&(i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,o=3*t._l23_a*(t._l23_a+t._l12_a),n=(n*i+t._x1*t._l23_2a-e*t._l12_2a)/o,l=(l*i+t._y1*t._l23_2a-r*t._l12_2a)/o),t._context.bezierCurveTo(a,s,n,l,t._x2,t._y2)}function Pn(t,e){this._context=t,this._alpha=e}Pn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:qn(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 zn=function t(e){function r(t){return e?new Pn(t,e):new An(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Rn(t,e){this._context=t,this._alpha=e}Rn.prototype={areaStart:wn,areaEnd:wn,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){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:qn(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 Nn=function t(e){function r(t){return e?new Rn(t,e):new On(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Wn(t,e){this._context=t,this._alpha=e}Wn.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){var r,i;switch(t=+t,e=+e,this._point&&(r=this._x2-t,i=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),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:qn(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 jn=function t(e){function r(t){return e?new Wn(t,e):new In(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Hn(t){this._context=t}function Un(t){return t<0?-1:1}function Yn(t,e,r){var i=t._x1-t._x0,o=(e=e-t._x1,(t._y1-t._y0)/(i||e<0&&-0));t=(o*e+(r=(r-t._y1)/(e||i<0&&-0))*i)/(i+e);return(Un(o)+Un(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(t))||0}function Gn(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Xn(t,e,r){var i=t._x0,o=t._y0,a=t._x1,s=t._y1,n=(a-i)/3;t._context.bezierCurveTo(i+n,o+n*e,a-n,s-n*r,a,s)}function Vn(t){this._context=t}function Zn(t){this._context=new Qn(t)}function Qn(t){this._context=t}function Kn(t){return new Vn(t)}function Jn(t){return new Zn(t)}function tl(t){this._context=t}function el(t){var e,r,i=t.length-1,o=new Array(i),a=new Array(i),s=new Array(i);for(a[o[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)o[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(o[i-1]=2,a[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=o[e]/a[e-1],a[e]-=r,s[e]-=r*s[e-1];for(o[i-1]=s[i-1]/a[i-1],e=i-2;0<=e;--e)o[e]=(s[e]-o[e+1])/a[e];for(a[i-1]=(t[i]+o[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-o[e+1];return[o,a]}function rl(t){return new tl(t)}function il(t,e){this._context=t,this._t=e}function ol(t){return new il(t,.5)}function al(t){return new il(t,0)}function sl(t){return new il(t,1)}function nl(t,e,r){this.k=t,this.x=e,this.y=r}Hn.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Xn(this,this._t0,Gn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){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,Xn(this,Gn(this,r=Yn(this,t,e)),r);break;default:Xn(this,this._t0,r=Yn(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Zn.prototype=Object.create(Vn.prototype)).point=function(t,e){Vn.prototype.point.call(this,e,t)},Qn.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,o,a){this._context.bezierCurveTo(e,t,i,r,a,o)}},tl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=el(t),o=el(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],o[0][a],i[1][a],o[1][a],t[s],e[s]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,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;default:var r;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(r=this._x*(1-this._t)+t*this._t,this._context.lineTo(r,this._y),this._context.lineTo(r,e))}this._x=t,this._y=e}},nl.prototype={constructor:nl,scale:function(t){return 1===t?this:new nl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new nl(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+")"}},nl.prototype;var ll=i((t=>{var e=yi().securityLevel;let r=Ho("body");return"sandbox"===e&&(e=Ho("#i"+t).node()?.contentDocument??document,r=Ho(e.body)),r.select("#"+t)}),"selectSvgElement");function hl(t){return null==t}function cl(t){return"object"==typeof t&&null!==t}function dl(t){return Array.isArray(t)?t:hl(t)?[]:[t]}function ul(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 pl(t,e){for(var r="",i=0;i<e;i+=1)r+=t;return r}function gl(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}i(hl,"isNothing"),i(cl,"isObject"),i(dl,"toArray"),i(ul,"extend"),i(pl,"repeat"),i(gl,"isNegativeZero");var fl={isNothing:hl,isObject:cl,toArray:dl,repeat:pl,isNegativeZero:gl,extend:ul};function yl(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 ml(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=yl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}i(yl,"formatError"),i(ml,"YAMLException$1"),ml.prototype=Object.create(Error.prototype),(ml.prototype.constructor=ml).prototype.toString=i((function(t){return this.name+": "+yl(this,t)}),"toString");var Cl=ml;function xl(t,e,r,i,o){var a="",s="";return(o=Math.floor(o/2)-1)<i-e&&(e=i-o+(a=" ... ").length),o<r-i&&(r=i+o-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function bl(t,e){return fl.repeat(" ",e-t.length)+t}function kl(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);for(var n,l="",h=Math.min(t.line+e.linesAfter,a.length).toString().length,c=e.maxLength-(e.indent+h+3),d=1;d<=e.linesBefore&&!(s-d<0);d++)n=xl(t.buffer,o[s-d],a[s-d],t.position-(o[s]-o[s-d]),c),l=fl.repeat(" ",e.indent)+bl((t.line-d+1).toString(),h)+" | "+n.str+"\n"+l;for(n=xl(t.buffer,o[s],a[s],t.position,c),l=(l+=fl.repeat(" ",e.indent)+bl((t.line+1).toString(),h)+" | "+n.str+"\n")+fl.repeat("-",e.indent+h+3+n.pos)+"^\n",d=1;d<=e.linesAfter&&!(a.length<=s+d);d++)n=xl(t.buffer,o[s+d],a[s+d],t.position-(o[s]-o[s+d]),c),l+=fl.repeat(" ",e.indent)+bl((t.line+d+1).toString(),h)+" | "+n.str+"\n";return l.replace(/\n$/,"")}i(xl,"getLine"),i(bl,"padStart"),i(kl,"makeSnippet");var wl=kl,Tl=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Sl=["scalar","sequence","mapping"];function vl(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function Bl(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===Tl.indexOf(e))throw new Cl('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=vl(e.styleAliases||null),-1===Sl.indexOf(this.kind))throw new Cl('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}i(vl,"compileStyleAliases"),i(Bl,"Type$1");var _l=Bl;function Fl(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 Ll(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(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(i(o,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(o);return r}function Ml(t){return this.extend(t)}i(Fl,"compileList"),i(Ll,"compileMap"),i(Ml,"Schema$1"),Ml.prototype.extend=i((function(t){var e=[],r=[];if(t instanceof _l)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 Cl("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))}return e.forEach((function(t){if(!(t instanceof _l))throw new Cl("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Cl("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 Cl("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 _l))throw new Cl("Specified list of YAML types (or a single Type object) contains a non-Type object.")})),(t=Object.create(Ml.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=Fl(t,"implicit"),t.compiledExplicit=Fl(t,"explicit"),t.compiledTypeMap=Ll(t.compiledImplicit,t.compiledExplicit),t}),"extend");var Al=Ml,El=new _l("tag:yaml.org,2002:str",{kind:"scalar",construct:i((function(t){return null!==t?t:""}),"construct")}),Ol=new _l("tag:yaml.org,2002:seq",{kind:"sequence",construct:i((function(t){return null!==t?t:[]}),"construct")}),$l=new _l("tag:yaml.org,2002:map",{kind:"mapping",construct:i((function(t){return null!==t?t:{}}),"construct")}),Il=new Al({explicit:[El,Ol,$l]});function Dl(t){var e;return null===t||1===(e=t.length)&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function ql(){return null}function Pl(t){return null===t}i(Dl,"resolveYamlNull"),i(ql,"constructYamlNull"),i(Pl,"isNull");var zl=new _l("tag:yaml.org,2002:null",{kind:"scalar",resolve:Dl,construct:ql,predicate:Pl,represent:{canonical:i((function(){return"~"}),"canonical"),lowercase:i((function(){return"null"}),"lowercase"),uppercase:i((function(){return"NULL"}),"uppercase"),camelcase:i((function(){return"Null"}),"camelcase"),empty:i((function(){return""}),"empty")},defaultStyle:"lowercase"});function Rl(t){var e;return null!==t&&(4===(e=t.length)&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t))}function Nl(t){return"true"===t||"True"===t||"TRUE"===t}function Wl(t){return"[object Boolean]"===Object.prototype.toString.call(t)}i(Rl,"resolveYamlBoolean"),i(Nl,"constructYamlBoolean"),i(Wl,"isBoolean");var jl=new _l("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Rl,construct:Nl,predicate:Wl,represent:{lowercase:i((function(t){return t?"true":"false"}),"lowercase"),uppercase:i((function(t){return t?"TRUE":"FALSE"}),"uppercase"),camelcase:i((function(t){return t?"True":"False"}),"camelcase")},defaultStyle:"lowercase"});function Hl(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ul(t){return 48<=t&&t<=55}function Yl(t){return 48<=t&&t<=57}function Gl(t){if(null===t)return!1;var e,r=t.length,i=0,o=!1;if(!r)return!1;if("0"===(e="-"!==(e=t[i])&&"+"!==e?e:t[++i])){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(!Hl(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Ul(t.charCodeAt(i)))return!1;o=!0}return o&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!Yl(t.charCodeAt(i)))return!1;o=!0}return!(!o||"_"===e)}function Xl(t){var e,r=1;if("-"!==(e=(t=-1!==t.indexOf("_")?t.replace(/_/g,""):t)[0])&&"+"!==e||("-"===e&&(r=-1),e=(t=t.slice(1))[0]),"0"===t)return 0;if("0"===e){if("b"===t[1])return r*parseInt(t.slice(2),2);if("x"===t[1])return r*parseInt(t.slice(2),16);if("o"===t[1])return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Vl(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!fl.isNegativeZero(t)}i(Hl,"isHexCode"),i(Ul,"isOctCode"),i(Yl,"isDecCode"),i(Gl,"resolveYamlInteger"),i(Xl,"constructYamlInteger"),i(Vl,"isInteger");var Zl=new _l("tag:yaml.org,2002:int",{kind:"scalar",resolve:Gl,construct:Xl,predicate:Vl,represent:{binary:i((function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:i((function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:i((function(t){return t.toString(10)}),"decimal"),hexadecimal:i((function(t){return 0<=t?"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"]}}),Ql=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Kl(t){return null!==t&&!(!Ql.test(t)||"_"===t[t.length-1])}function Jl(t){var e="-"===(t=t.replace(/_/g,"").toLowerCase())[0]?-1:1;return".inf"===(t=0<="+-".indexOf(t[0])?t.slice(1):t)?1==e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:e*parseFloat(t,10)}i(Kl,"resolveYamlFloat"),i(Jl,"constructYamlFloat");var th=/^[-+]?[0-9]+e/;function eh(t,e){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(fl.isNegativeZero(t))return"-0.0";return e=t.toString(10),th.test(e)?e.replace("e",".e"):e}function rh(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||fl.isNegativeZero(t))}i(eh,"representYamlFloat"),i(rh,"isFloat");var ih=new _l("tag:yaml.org,2002:float",{kind:"scalar",resolve:Kl,construct:Jl,predicate:rh,represent:eh,defaultStyle:"lowercase"}),oh=Il.extend({implicit:[zl,jl,Zl,ih]}),ah=oh,sh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),nh=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 lh(t){return null!==t&&(null!==sh.exec(t)||null!==nh.exec(t))}function hh(t){var e,r,i,o,a,s=0,n=null,l=sh.exec(t);if(null===(l=null===l?nh.exec(t):l))throw new Error("Date resolve error");if(t=+l[1],e=+l[2]-1,r=+l[3],!l[4])return new Date(Date.UTC(t,e,r));if(i=+l[4],o=+l[5],a=+l[6],l[7]){for(s=l[7].slice(0,3);s.length<3;)s+="0";s=+s}return l[9]&&(n=6e4*(60*+l[10]+ +(l[11]||0)),"-"===l[9])&&(n=-n),l=new Date(Date.UTC(t,e,r,i,o,a,s)),n&&l.setTime(l.getTime()-n),l}function ch(t){return t.toISOString()}i(lh,"resolveYamlTimestamp"),i(hh,"constructYamlTimestamp"),i(ch,"representYamlTimestamp");var dh=new _l("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:lh,construct:hh,instanceOf:Date,represent:ch});function uh(t){return"<<"===t||null===t}i(uh,"resolveYamlMerge");var ph=new _l("tag:yaml.org,2002:merge",{kind:"scalar",resolve:uh}),gh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function fh(t){if(null===t)return!1;for(var e,r=0,i=t.length,o=gh,a=0;a<i;a++)if(!(64<(e=o.indexOf(t.charAt(a))))){if(e<0)return!1;r+=6}return r%8==0}function yh(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=gh,o=0,a=[],s=0;s<r;s++)s%4==0&&s&&(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|i.indexOf(e.charAt(s));return 0==(t=r%4*6)?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18==t?(a.push(o>>10&255),a.push(o>>2&255)):12==t&&a.push(o>>4&255),new Uint8Array(a)}function mh(t){for(var e,r="",i=0,o=t.length,a=gh,s=0;s<o;s++)s%3==0&&s&&(r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]),i=(i<<8)+t[s];return 0==(e=o%3)?r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]:2==e?r=(r=(r=(r+=a[i>>10&63])+a[i>>4&63])+a[i<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[i>>2&63])+a[i<<4&63])+a[64])+a[64]),r}function Ch(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}i(fh,"resolveYamlBinary"),i(yh,"constructYamlBinary"),i(mh,"representYamlBinary"),i(Ch,"isBinary");var xh=new _l("tag:yaml.org,2002:binary",{kind:"scalar",resolve:fh,construct:yh,predicate:Ch,represent:mh}),bh=Object.prototype.hasOwnProperty,kh=Object.prototype.toString;function wh(t){if(null!==t)for(var e,r,i,o=[],a=t,s=0,n=a.length;s<n;s+=1){if(e=a[s],i=!1,"[object Object]"!==kh.call(e))return!1;for(r in e)if(bh.call(e,r)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==o.indexOf(r))return!1;o.push(r)}return!0}function Th(t){return null!==t?t:[]}i(wh,"resolveYamlOmap"),i(Th,"constructYamlOmap");var Sh=new _l("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wh,construct:Th}),vh=Object.prototype.toString;function Bh(t){if(null!==t)for(var e,r,i=t,o=new Array(i.length),a=0,s=i.length;a<s;a+=1){if(e=i[a],"[object Object]"!==vh.call(e))return!1;if(1!==(r=Object.keys(e)).length)return!1;o[a]=[r[0],e[r[0]]]}return!0}function _h(t){if(null===t)return[];for(var e,r,i=t,o=new Array(i.length),a=0,s=i.length;a<s;a+=1)e=i[a],r=Object.keys(e),o[a]=[r[0],e[r[0]]];return o}i(Bh,"resolveYamlPairs"),i(_h,"constructYamlPairs");var Fh=new _l("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Bh,construct:_h}),Lh=Object.prototype.hasOwnProperty;function Mh(t){if(null!==t){var e,r=t;for(e in r)if(Lh.call(r,e)&&null!==r[e])return!1}return!0}function Ah(t){return null!==t?t:{}}i(Mh,"resolveYamlSet"),i(Ah,"constructYamlSet");var Eh=new _l("tag:yaml.org,2002:set",{kind:"mapping",resolve:Mh,construct:Ah}),Oh=ah.extend({implicit:[dh,ph],explicit:[xh,Sh,Fh,Eh]}),$h=Object.prototype.hasOwnProperty,Ih=1,Dh=2,qh=3,Ph=4,zh=1,Rh=2,Nh=3,Wh=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jh=/[\x85\u2028\u2029]/,Hh=/[,\[\]\{\}]/,Uh=/^(?:!|!!|![a-z\-]+!)$/i,Yh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Gh(t){return Object.prototype.toString.call(t)}function Xh(t){return 10===t||13===t}function Vh(t){return 9===t||32===t}function Zh(t){return 9===t||32===t||10===t||13===t}function Qh(t){return 44===t||91===t||93===t||123===t||125===t}function Kh(t){return 48<=t&&t<=57?t-48:97<=(t|=32)&&t<=102?t-97+10:-1}function Jh(t){return 120===t?2:117===t?4:85===t?8:0}function tc(t){return 48<=t&&t<=57?t-48:-1}function ec(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 rc(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function ic(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}i(Gh,"_class"),i(Xh,"is_EOL"),i(Vh,"is_WHITE_SPACE"),i(Zh,"is_WS_OR_EOL"),i(Qh,"is_FLOW_INDICATOR"),i(Kh,"fromHexCode"),i(Jh,"escapedHexLen"),i(tc,"fromDecimalCode"),i(ec,"simpleEscapeSequence"),i(rc,"charFromCodepoint"),i(ic,"setProperty");for(var oc=new Array(256),ac=new Array(256),sc=0;sc<256;sc++)oc[sc]=ec(sc)?1:0,ac[sc]=ec(sc);function nc(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Oh,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 lc(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=wl(t),new Cl(e,t)}function hc(t,e){throw lc(t,e)}function cc(t,e){t.onWarning&&t.onWarning.call(null,lc(t,e))}i(nc,"State$1"),i(lc,"generateError"),i(hc,"throwError"),i(cc,"throwWarning");var dc={YAML:i((function(t,e,r){var i,o;null!==t.version&&hc(t,"duplication of %YAML directive"),1!==r.length&&hc(t,"YAML directive accepts exactly one argument"),null===(o=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&hc(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),o=parseInt(o[2],10),1!==i&&hc(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&cc(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:i((function(t,e,r){var i;2!==r.length&&hc(t,"TAG directive accepts exactly two arguments"),i=r[0],r=r[1],Uh.test(i)||hc(t,"ill-formed tag handle (first argument) of the TAG directive"),$h.call(t.tagMap,i)&&hc(t,'there is a previously declared suffix for "'+i+'" tag handle'),Yh.test(r)||hc(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(e){hc(t,"tag prefix is malformed: "+r)}t.tagMap[i]=r}),"handleTagDirective")};function uc(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||hc(t,"expected valid JSON character");else Wh.test(n)&&hc(t,"the stream contains non-printable characters");t.result+=n}}function pc(t,e,r,i){var o,a,s,n;for(fl.isObject(r)||hc(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],$h.call(e,a)||(ic(e,a,r[a]),i[a]=!0)}function gc(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])&&hc(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===Gh(o[h])&&(o[h]="[object Object]");if("object"==typeof o&&"[object Object]"===Gh(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)pc(t,e,a[h],r);else pc(t,e,a,r);else t.json||$h.call(r,o)||!$h.call(e,o)||(t.line=s||t.line,t.lineStart=n||t.lineStart,t.position=l||t.position,hc(t,"duplicated mapping key")),ic(e,o,a),delete r[o];return e}function fc(t){var e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):hc(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function yc(t,e,r){for(var i=0,o=t.input.charCodeAt(t.position);0!==o;){for(;Vh(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)for(;10!==(o=t.input.charCodeAt(++t.position))&&13!==o&&0!==o;);if(!Xh(o))break;for(fc(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&&cc(t,"deficient indentation"),i}function mc(t){var e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||0!==(r=t.input.charCodeAt(e+=3))&&!Zh(r))}function Cc(t,e){1===e?t.result+=" ":1<e&&(t.result+=fl.repeat("\n",e-1))}function xc(t,e,r){var i,o,a,s,n,l,h,c=t.kind,d=t.result,u=t.input.charCodeAt(t.position);if(!Zh(u)&&!Qh(u)&&35!==u&&38!==u&&42!==u&&33!==u&&124!==u&&62!==u&&39!==u&&34!==u&&37!==u&&64!==u&&96!==u&&(63!==u&&45!==u||!(Zh(i=t.input.charCodeAt(t.position+1))||r&&Qh(i)))){for(t.kind="scalar",t.result="",o=a=t.position,s=!1;0!==u;){if(58===u){if(Zh(i=t.input.charCodeAt(t.position+1))||r&&Qh(i))break}else if(35===u){if(Zh(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&mc(t)||r&&Qh(u))break;if(Xh(u)){if(n=t.line,l=t.lineStart,h=t.lineIndent,yc(t,!1,-1),t.lineIndent>=e){s=!0,u=t.input.charCodeAt(t.position);continue}t.position=a,t.line=n,t.lineStart=l,t.lineIndent=h;break}}s&&(uc(t,o,a,!1),Cc(t,t.line-n),o=a=t.position,s=!1),Vh(u)||(a=t.position+1),u=t.input.charCodeAt(++t.position)}if(uc(t,o,a,!1),t.result)return!0;t.kind=c,t.result=d}return!1}function bc(t,e){var r,i,o=t.input.charCodeAt(t.position);if(39!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));)if(39===o){if(uc(t,r,t.position,!0),39!==(o=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else Xh(o)?(uc(t,r,i,!0),Cc(t,yc(t,!1,e)),r=i=t.position):t.position===t.lineStart&&mc(t)?hc(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);hc(t,"unexpected end of the stream within a single quoted scalar")}function kc(t,e){var r,i,o,a,s,n=t.input.charCodeAt(t.position);if(34!==n)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 uc(t,r,t.position,!0),t.position++,!0;if(92===n){if(uc(t,r,t.position,!0),Xh(n=t.input.charCodeAt(++t.position)))yc(t,!1,e);else if(n<256&&oc[n])t.result+=ac[n],t.position++;else if(0<(s=Jh(n))){for(o=s,a=0;0<o;o--)0<=(s=Kh(n=t.input.charCodeAt(++t.position)))?a=(a<<4)+s:hc(t,"expected hexadecimal character");t.result+=rc(a),t.position++}else hc(t,"unknown escape sequence");r=i=t.position}else Xh(n)?(uc(t,r,i,!0),Cc(t,yc(t,!1,e)),r=i=t.position):t.position===t.lineStart&&mc(t)?hc(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}hc(t,"unexpected end of the stream within a double quoted scalar")}function wc(t,e){var r,i,o,a,s,n,l,h,c,d,u,p=!0,g=t.tag,f=t.anchor,y=Object.create(null),m=t.input.charCodeAt(t.position);if(91===m)h=!(s=93),a=[];else{if(123!==m)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),m=t.input.charCodeAt(++t.position);0!==m;){if(yc(t,!0,e),(m=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=g,t.anchor=f,t.kind=h?"mapping":"sequence",t.result=a,!0;p?44===m&&hc(t,"expected the node content, but found ','"):hc(t,"missed comma between flow collection entries"),u=null,n=l=!1,63===m&&Zh(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,yc(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,Lc(t,e,Ih,!1,!0),d=t.tag,c=t.result,yc(t,!0,e),m=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==m||(n=!0,m=t.input.charCodeAt(++t.position),yc(t,!0,e),Lc(t,e,Ih,!1,!0),u=t.result),h?gc(t,a,y,d,c,u,r,i,o):n?a.push(gc(t,null,y,d,c,u,r,i,o)):a.push(c),yc(t,!0,e),44===(m=t.input.charCodeAt(t.position))?(p=!0,m=t.input.charCodeAt(++t.position)):p=!1}hc(t,"unexpected end of the stream within a flow collection")}function Tc(t,e){var r,i,o,a=zh,s=!1,n=!1,l=e,h=0,c=!1,d=t.input.charCodeAt(t.position);if(124===d)i=!1;else{if(62!==d)return!1;i=!0}for(t.kind="scalar",t.result="";0!==d;)if(43===(d=t.input.charCodeAt(++t.position))||45===d)zh===a?a=43===d?Nh:Rh:hc(t,"repeat of a chomping mode identifier");else{if(!(0<=(o=tc(d))))break;0===o?hc(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?hc(t,"repeat of an indentation width identifier"):(l=e+o-1,n=!0)}if(Vh(d)){for(;Vh(d=t.input.charCodeAt(++t.position)););if(35===d)for(;!Xh(d=t.input.charCodeAt(++t.position))&&0!==d;);}for(;0!==d;){for(fc(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!n||t.lineIndent<l)&&32===d;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!n&&t.lineIndent>l&&(l=t.lineIndent),Xh(d))h++;else{if(t.lineIndent<l){a===Nh?t.result+=fl.repeat("\n",s?1+h:h):a===zh&&s&&(t.result+="\n");break}for(i?Vh(d)?(c=!0,t.result+=fl.repeat("\n",s?1+h:h)):c?(c=!1,t.result+=fl.repeat("\n",h+1)):0===h?s&&(t.result+=" "):t.result+=fl.repeat("\n",h):t.result+=fl.repeat("\n",s?1+h:h),n=s=!0,h=0,r=t.position;!Xh(d)&&0!==d;)d=t.input.charCodeAt(++t.position);uc(t,r,t.position,!1)}}return!0}function Sc(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,hc(t,"tab characters must not be used in indentation")),45===i)&&Zh(t.input.charCodeAt(t.position+1));)if(n=!0,t.position++,yc(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,Lc(t,e,qh,!1,!0),s.push(t.result),yc(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)hc(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 vc(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,hc(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),a=t.line,63!==h&&58!==h||!Zh(i)){if(s=t.line,n=t.lineStart,l=t.position,!Lc(t,r,Dh,!1,!0))break;if(t.line===a){for(h=t.input.charCodeAt(t.position);Vh(h);)h=t.input.charCodeAt(++t.position);if(58===h)Zh(h=t.input.charCodeAt(++t.position))||hc(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(gc(t,u,p,g,f,null,s,n,l),g=f=y=null),o=m=!(C=!0),g=t.tag,f=t.result;else{if(!C)return t.tag=c,t.anchor=d,!0;hc(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return t.tag=c,t.anchor=d,!0;hc(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(gc(t,u,p,g,f,null,s,n,l),g=f=y=null),o=m=C=!0):m?o=!(m=!1):hc(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),Lc(t,e,Ph,!0,o)&&(m?f=t.result:y=t.result),m||(gc(t,u,p,g,f,y,s,n,l),g=f=y=null),yc(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)hc(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&gc(t,u,p,g,f,null,s,n,l),C&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),C}function Bc(t){var e,r,i,o=!1,a=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;if(null!==t.tag&&hc(t,"duplication of a tag property"),60===(s=t.input.charCodeAt(++t.position))?(o=!0,s=t.input.charCodeAt(++t.position)):33===s?(a=!0,r="!!",s=t.input.charCodeAt(++t.position)):r="!",e=t.position,o){for(;0!==(s=t.input.charCodeAt(++t.position))&&62!==s;);t.position<t.length?(i=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):hc(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!Zh(s);)33===s&&(a?hc(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Uh.test(r)||hc(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Hh.test(i)&&hc(t,"tag suffix cannot contain flow indicator characters")}i&&!Yh.test(i)&&hc(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){hc(t,"tag name is malformed: "+i)}return o?t.tag=i:$h.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:hc(t,'undeclared tag handle "'+r+'"'),!0}function _c(t){var e,r=t.input.charCodeAt(t.position);if(38!==r)return!1;for(null!==t.anchor&&hc(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Zh(r)&&!Qh(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&hc(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function Fc(t){var e,r=t.input.charCodeAt(t.position);if(42!==r)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Zh(r)&&!Qh(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&hc(t,"name of an alias node must contain at least one character"),e=t.input.slice(e,t.position),$h.call(t.anchorMap,e)||hc(t,'unidentified alias "'+e+'"'),t.result=t.anchorMap[e],yc(t,!0,-1),!0}function Lc(t,e,r,i,o){var a,s,n,l,h,c,d,u=1,p=!1,g=!1;if(null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=n=Ph===r||qh===r,i&&yc(t,!0,-1)&&(p=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),1===u)for(;Bc(t)||_c(t);)yc(t,!0,-1)?(p=!0,n=a,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):n=!1;if(n=n&&(p||o),1!==u&&Ph!==r||(i=Ih===r||Dh===r?e:e+1,o=t.position-t.lineStart,1===u?n&&(Sc(t,o)||vc(t,o,i))||wc(t,i)?g=!0:(s&&Tc(t,i)||bc(t,i)||kc(t,i)?g=!0:Fc(t)?(g=!0,null===t.tag&&null===t.anchor||hc(t,"alias node should not have any properties")):xc(t,i,Ih===r)&&(g=!0,null===t.tag)&&(t.tag="?"),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===u&&(g=n&&Sc(t,o))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&hc(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($h.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||hc(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&hc(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)):hc(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function Mc(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))&&(yc(t,!0,-1),o=t.input.charCodeAt(t.position),!(0<t.lineIndent||37!==o));){for(s=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Zh(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&hc(t,"directive name must not be less than one character in length");0!==o;){for(;Vh(o);)o=t.input.charCodeAt(++t.position);if(35===o){for(;0!==(o=t.input.charCodeAt(++t.position))&&!Xh(o););break}if(Xh(o))break;for(e=t.position;0!==o&&!Zh(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&fc(t),$h.call(dc,r)?dc[r](t,r,i):cc(t,'unknown document directive "'+r+'"')}yc(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,yc(t,!0,-1)):s&&hc(t,"directives end mark is expected"),Lc(t,t.lineIndent-1,Ph,!1,!0),yc(t,!0,-1),t.checkLineBreaks&&jh.test(t.input.slice(a,t.position))&&cc(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&mc(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,yc(t,!0,-1)):t.position<t.length-1&&hc(t,"end of the stream or a document separator is expected")}function Ac(t,e){e=e||{};var r=new nc(t=0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0))?t.slice(1):t,e);for(-1!==(e=t.indexOf("\0"))&&(r.position=e,hc(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;)Mc(r);return r.documents}function Ec(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=Ac(t,r);if("function"!=typeof e)return i;for(var o=0,a=i.length;o<a;o+=1)e(i[o])}function Oc(t,e){if(0!==(t=Ac(t,e)).length){if(1===t.length)return t[0];throw new Cl("expected a single document in the stream, but found more")}}i(uc,"captureSegment"),i(pc,"mergeMappings"),i(gc,"storeMappingPair"),i(fc,"readLineBreak"),i(yc,"skipSeparationSpace"),i(mc,"testDocumentSeparator"),i(Cc,"writeFoldedLines"),i(xc,"readPlainScalar"),i(bc,"readSingleQuotedScalar"),i(kc,"readDoubleQuotedScalar"),i(wc,"readFlowCollection"),i(Tc,"readBlockScalar"),i(Sc,"readBlockSequence"),i(vc,"readBlockMapping"),i(Bc,"readTagProperty"),i(_c,"readAnchorProperty"),i(Fc,"readAlias"),i(Lc,"composeNode"),i(Mc,"readDocument"),i(Ac,"loadDocuments"),i(Ec,"loadAll$1"),i(Oc,"load$1");var $c=Oc,Ic=Object.prototype.toString,Dc=Object.prototype.hasOwnProperty,qc=65279,Pc=9,zc=10,Rc=13,Nc=32,Wc=33,jc=34,Hc=35,Uc=37,Yc=38,Gc=39,Xc=42,Vc=44,Zc=45,Qc=58,Kc=61,Jc=62,td=63,ed=64,rd=91,id=93,od=96,ad=123,sd=124,nd=125,ld={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"},hd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],cd=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function dd(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])&&Dc.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[s]=n;return r}function ud(t){var e,r,i=t.toString(16).toUpperCase();if(t<=255)e="x",r=2;else if(t<=65535)e="u",r=4;else{if(!(t<=4294967295))throw new Cl("code point within a string may not be greater than 0xFFFFFFFF");e="U",r=8}return"\\"+e+fl.repeat("0",r-i.length)+i}i(dd,"compileStyleMap"),i(ud,"encodeHex");var pd=1,gd=2;function fd(t){this.schema=t.schema||Oh,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=fl.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=dd(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?gd:pd,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 yd(t,e){for(var r,i,o=fl.repeat(" ",e),a=0,s="",n=t.length;a<n;)a=-1===(r=t.indexOf("\n",a))?(i=t.slice(a),n):(i=t.slice(a,r+1),r+1),i.length&&"\n"!==i&&(s+=o),s+=i;return s}function md(t,e){return"\n"+fl.repeat(" ",t.indent*e)}function Cd(t,e){for(var r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function xd(t){return t===Nc||t===Pc}function bd(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==qc||65536<=t&&t<=1114111}function kd(t){return bd(t)&&t!==qc&&t!==Rc&&t!==zc}function wd(t,e,r){var i=kd(t),o=i&&!xd(t);return(r?i:i&&t!==Vc&&t!==rd&&t!==id&&t!==ad&&t!==nd)&&t!==Hc&&!(e===Qc&&!o)||kd(e)&&!xd(e)&&t===Hc||e===Qc&&o}function Td(t){return bd(t)&&t!==qc&&!xd(t)&&t!==Zc&&t!==td&&t!==Qc&&t!==Vc&&t!==rd&&t!==id&&t!==ad&&t!==nd&&t!==Hc&&t!==Yc&&t!==Xc&&t!==Wc&&t!==sd&&t!==Kc&&t!==Jc&&t!==Gc&&t!==jc&&t!==Uc&&t!==ed&&t!==od}function Sd(t){return!xd(t)&&t!==Qc}function vd(t,e){var r=t.charCodeAt(e);return 55296<=r&&r<=56319&&e+1<t.length&&56320<=(t=t.charCodeAt(e+1))&&t<=57343?1024*(r-55296)+t-56320+65536:r}function Bd(t){return/^\n* /.test(t)}i(fd,"State"),i(yd,"indentString"),i(md,"generateNextLine"),i(Cd,"testImplicitResolving"),i(xd,"isWhitespace"),i(bd,"isPrintable"),i(kd,"isNsCharOrWhitespace"),i(wd,"isPlainSafe"),i(Td,"isPlainSafeFirst"),i(Sd,"isPlainSafeLast"),i(vd,"codePointAt"),i(Bd,"needIndentIndicator");var _d=1,Fd=2,Ld=3,Md=4,Ad=5;function Ed(t,e,r,i,o,a,s,n){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Td(vd(t,0))&&Sd(vd(t,t.length-1));if(e||s)for(l=0;l<t.length;65536<=h?l+=2:l++){if(!bd(h=vd(t,l)))return Ad;f=f&&wd(h,c,n),c=h}else{for(l=0;l<t.length;65536<=h?l+=2:l++){if((h=vd(t,l))===zc)d=!0,p&&(u=u||i<l-g-1&&" "!==t[g+1],g=l);else if(!bd(h))return Ad;f=f&&wd(h,c,n),c=h}u=u||p&&i<l-g-1&&" "!==t[g+1]}return d||u?9<r&&Bd(t)?Ad:s?a===gd?Ad:Fd:u?Md:Ld:!f||s||o(t)?a===gd?Ad:Fd:_d}function Od(t,e,r,o,a){t.dump=function(){if(0===e.length)return t.quotingType===gd?'""':"''";if(!t.noCompatMode&&(-1!==hd.indexOf(e)||cd.test(e)))return t.quotingType===gd?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),n=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),l=o||-1<t.flowLevel&&r>=t.flowLevel;function h(e){return Cd(t,e)}switch(i(h,"testAmbiguity"),Ed(e,l,t.indent,n,h,t.quotingType,t.forceQuotes&&!o,a)){case _d:return e;case Fd:return"'"+e.replace(/'/g,"''")+"'";case Ld:return"|"+$d(e,t.indent)+Id(yd(e,s));case Md:return">"+$d(e,t.indent)+Id(yd(Dd(e,n),s));case Ad:return'"'+Pd(e)+'"';default:throw new Cl("impossible error: invalid scalar style")}}()}function $d(t,e){e=Bd(t)?String(e):"";var r="\n"===t[t.length-1];return e+(!r||"\n"!==t[t.length-2]&&"\n"!==t?r?"":"-":"+")+"\n"}function Id(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Dd(t,e){for(var r,i=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,i.lastIndex=r,qd(t.slice(0,r),e)),a="\n"===t[0]||" "===t[0];n=i.exec(t);){var s=n[1],n=n[2],l=" "===n[0];o+=s+(a||l||""===n?"":"\n")+qd(n,e),a=l}return o}function qd(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,a=0,s=0,n="";i=o.exec(t);)e<(i=i.index)-a&&(n+="\n"+t.slice(a,r=a<s?s:i),a=r+1),s=i;return n+="\n",t.length-a>e&&a<s?n+=t.slice(a,s)+"\n"+t.slice(s+1):n+=t.slice(a),n.slice(1)}function Pd(t){for(var e,r,i="",o=0;o<t.length;65536<=e?o+=2:o++)e=vd(t,o),!(r=ld[e])&&bd(e)?(i+=t[o],65536<=e&&(i+=t[o+1])):i+=r||ud(e);return i}function zd(t,e,r){for(var i,o="",a=t.tag,s=0,n=r.length;s<n;s+=1)i=r[s],t.replacer&&(i=t.replacer.call(r,String(s),i)),(Hd(t,e,i,!1,!1)||void 0===i&&Hd(t,e,null,!1,!1))&&(""!==o&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function Rd(t,e,r,i){for(var o,a="",s=t.tag,n=0,l=r.length;n<l;n+=1)o=r[n],t.replacer&&(o=t.replacer.call(r,String(n),o)),(Hd(t,e+1,o,!0,!0,!1,!0)||void 0===o&&Hd(t,e+1,null,!0,!0,!1,!0))&&(i&&""===a||(a+=md(t,e)),t.dump&&zc===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=s,t.dump=a||"[]"}function Nd(t,e,r){for(var i,o,a,s="",n=t.tag,l=Object.keys(r),h=0,c=l.length;h<c;h+=1)(a="")!==s&&(a+=", "),t.condenseFlow&&(a+='"'),o=r[i=l[h]],t.replacer&&(o=t.replacer.call(r,i,o)),Hd(t,e,i,!1,!1)&&(1024<t.dump.length&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Hd(t,e,o,!1,!1))&&(s+=a+=t.dump);t.tag=n,t.dump="{"+s+"}"}function Wd(t,e,r,i){var o,a,s,n,l,h="",c=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new Cl("sortKeys must be a boolean or a function");for(o=0,a=d.length;o<a;o+=1)l="",i&&""===h||(l+=md(t,e)),s=r[n=d[o]],t.replacer&&(s=t.replacer.call(r,n,s)),Hd(t,e+1,n,!0,!0,!0)&&((n=null!==t.tag&&"?"!==t.tag||t.dump&&1024<t.dump.length)&&(t.dump&&zc===t.dump.charCodeAt(0)?l+="?":l+="? "),l+=t.dump,n&&(l+=md(t,e)),Hd(t,e+1,s,!0,n))&&(t.dump&&zc===t.dump.charCodeAt(0)?l+=":":l+=": ",h+=l+=t.dump);t.tag=c,t.dump=h||"{}"}function jd(t,e,r){for(var i,o,a,s=r?t.explicitTypes:t.implicitTypes,n=0,l=s.length;n<l;n+=1)if(((o=s[n]).instanceOf||o.predicate)&&(!o.instanceOf||"object"==typeof e&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(r?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(a=t.styleMap[o.tag]||o.defaultStyle,"[object Function]"===Ic.call(o.represent))i=o.represent(e,a);else{if(!Dc.call(o.represent,a))throw new Cl("!<"+o.tag+'> tag resolver accepts not "'+a+'" style');i=o.represent[a](e,a)}t.dump=i}return!0}return!1}function Hd(t,e,r,i,o,a,s){t.tag=null,t.dump=r,jd(t,r,!1)||jd(t,r,!0);var n,l,h=Ic.call(t.dump),c=i,d=(i=i&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===h||"[object Array]"===h);if(d&&(l=-1!==(n=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0<e)&&(o=!1),l&&t.usedDuplicates[n])t.dump="*ref_"+n;else{if(d&&l&&!t.usedDuplicates[n]&&(t.usedDuplicates[n]=!0),"[object Object]"===h)i&&0!==Object.keys(t.dump).length?(Wd(t,e,t.dump,o),l&&(t.dump="&ref_"+n+t.dump)):(Nd(t,e,t.dump),l&&(t.dump="&ref_"+n+" "+t.dump));else if("[object Array]"===h)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&0<e?Rd(t,e-1,t.dump,o):Rd(t,e,t.dump,o),l&&(t.dump="&ref_"+n+t.dump)):(zd(t,e,t.dump),l&&(t.dump="&ref_"+n+" "+t.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(t.skipInvalid)return!1;throw new Cl("unacceptable kind of an object to dump "+h)}"?"!==t.tag&&Od(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(r=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),r="!"===t.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",t.dump=r+" "+t.dump)}return!0}function Ud(t,e){var r,i,o=[],a=[];for(Yd(t,o,a),r=0,i=a.length;r<i;r+=1)e.duplicates.push(o[a[r]]);e.usedDuplicates=new Array(i)}function Yd(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)Yd(t[o],e,r);else for(o=0,a=(i=Object.keys(t)).length;o<a;o+=1)Yd(t[i[o]],e,r)}i(Ed,"chooseScalarStyle"),i(Od,"writeScalar"),i($d,"blockHeader"),i(Id,"dropEndingNewline"),i(Dd,"foldString"),i(qd,"foldLine"),i(Pd,"escapeString"),i(zd,"writeFlowSequence"),i(Rd,"writeBlockSequence"),i(Nd,"writeFlowMapping"),i(Wd,"writeBlockMapping"),i(jd,"detectType"),i(Hd,"writeNode"),i(Ud,"getDuplicateReferences"),i(Yd,"inspectNode"),i((function(t,e){return(e=new fd(e=e||{})).noRefs||Ud(t,e),e.replacer&&(t=e.replacer.call({"":t},"",t)),Hd(e,0,t,!0,!0)?e.dump+"\n":""}),"dump$1"),i((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 Gd=oh,Xd=$c,Vd=i((t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:yi().handDrawnSeed})),"solidStateFill"),Zd=i((t=>({stylesMap:t=Qd([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]),stylesArray:[...t]})),"compileStyles"),Qd=i((t=>{const e=new Map;return t.forEach((t=>{var[t,r]=t.split(":");e.set(t.trim(),r?.trim())})),e}),"styles2Map"),Kd=i((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"),Jd=i((t=>{t=Zd(t).stylesArray;const e=[],r=[],i=[],o=[];return t.forEach((t=>{var a=t[0];Kd(a)?e.push(t.join(":")+" !important"):(r.push(t.join(":")+" !important"),a.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===a&&o.push(t.join(":")+" !important"))})),{labelStyles:e.join(";"),nodeStyles:r.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:o}}),"styles2String"),tu=i(((t,e)=>{var{themeVariables:r,handDrawnSeed:i}=yi(),{nodeBorder:r,mainBkg:o}=r;t=Zd(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:i,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:eu(t.get("stroke-dasharray"))},e)}),"userNodeOverrides"),eu=i((t=>{var e;return t?1===(t=t.trim().split(/\s+/).map(Number)).length?[e=isNaN(t[0])?0:t[0],e]:[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]:[0,0]}),"getStrokeDashArray"),ru={},iu={},ou=(Object.defineProperty(iu,"__esModule",{value:!0}),iu.BLANK_URL=iu.relativeFirstCharacters=iu.whitespaceEscapeCharsRegex=iu.urlSchemeRegex=iu.ctrlCharactersRegex=iu.htmlCtrlEntityRegex=iu.htmlEntitiesRegex=iu.invalidProtocolRegex=void 0,iu.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,iu.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,iu.htmlCtrlEntityRegex=/&(newline|tab);/gi,iu.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,iu.urlSchemeRegex=/^.+(:|&colon;)/gim,iu.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,iu.relativeFirstCharacters=[".","/"],iu.BLANK_URL="about:blank",Object.defineProperty(ru,"__esModule",{value:!0}),ru.sanitizeUrl=function(t){if(!t)return au.BLANK_URL;for(var e,r=nu(t.trim());(e=(r=nu(r=su(r).replace(au.htmlCtrlEntityRegex,"").replace(au.ctrlCharactersRegex,"").replace(au.whitespaceEscapeCharsRegex,"").trim())).match(au.ctrlCharactersRegex)||r.match(au.htmlEntitiesRegex)||r.match(au.htmlCtrlEntityRegex)||r.match(au.whitespaceEscapeCharsRegex))&&0<e.length;);var i,o;t=r;return t?!function(t){return-1<au.relativeFirstCharacters.indexOf(t[0])}(t)&&(o=(i=t.trimStart()).match(au.urlSchemeRegex))?(o=o[0].toLowerCase().trim(),au.invalidProtocolRegex.test(o)?au.BLANK_URL:(i=i.replace(/\\/g,"/"),"mailto:"===o||o.includes("://")||"http:"!==o&&"https:"!==o?i:function(t){return URL.canParse(t)}(i)?((o=new URL(i)).protocol=o.protocol.toLowerCase(),o.hostname=o.hostname.toLowerCase(),o.toString()):au.BLANK_URL)):t:au.BLANK_URL}),au=iu;function su(t){return t.replace(au.ctrlCharactersRegex,"").replace(au.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))}function nu(t){try{return decodeURIComponent(t)}catch(e){return t}}function lu(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;var e;if("[object Object]"!==Object.prototype.toString.call(t))return null!=(e=t[Symbol.toStringTag])&&!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`;let r=t;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r}function hu(){}function cu(t){return Object.getOwnPropertySymbols(t).filter((e=>Object.prototype.propertyIsEnumerable.call(t,e)))}function du(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const uu="[object RegExp]",pu="[object String]",gu="[object Number]",fu="[object Boolean]",yu="[object Arguments]",mu="[object Symbol]",Cu="[object Date]",xu="[object Map]",bu="[object Set]",ku="[object Array]",wu="[object ArrayBuffer]",Tu="[object Object]",Su="[object DataView]",vu="[object Uint8Array]",Bu="[object Uint8ClampedArray]",_u="[object Uint16Array]",Fu="[object Uint32Array]",Lu="[object Int8Array]",Mu="[object Int16Array]",Au="[object Int32Array]",Eu="[object Float32Array]",Ou="[object Float64Array]",$u="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}();function Iu(t){return void 0!==$u.Buffer&&$u.Buffer.isBuffer(t)}function Du(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&0<=t}(t.length)}function qu(t){return"__proto__"===t}function Pu(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function zu(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ru(t,e,r,i=new Map,o=void 0){e=o?.(t,e,r,i);if(void 0!==e)return e;if(Pu(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){var a=new Array(t.length);i.set(t,a);for(let e=0;e<t.length;e++)a[e]=Ru(t[e],e,r,i,o);return Object.hasOwn(t,"index")&&(a.index=t.index),Object.hasOwn(t,"input")&&(a.input=t.input),a}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return(e=new RegExp(t.source,t.flags)).lastIndex=t.lastIndex,e;if(t instanceof Map){var s,n,l=new Map;for([s,n]of(i.set(t,l),t))l.set(s,Ru(n,s,r,i,o));return l}if(t instanceof Set){var h=new Set;i.set(t,h);for(const e of t)h.add(Ru(e,void 0,r,i,o));return h}if(Iu(t))return t.subarray();if(zu(t)){var c=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,c);for(let e=0;e<t.length;e++)c[e]=Ru(t[e],e,r,i,o);return c}return t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer?t.slice(0):t instanceof DataView?(e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength),i.set(t,e),Nu(e,t,r,i,o),e):"undefined"!=typeof File&&t instanceof File?(e=new File([t],t.name,{type:t.type}),i.set(t,e),Nu(e,t,r,i,o),e):"undefined"!=typeof Blob&&t instanceof Blob?(e=new Blob([t],{type:t.type}),i.set(t,e),Nu(e,t,r,i,o),e):t instanceof Error?(e=structuredClone(t),i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,Nu(e,t,r,i,o),e):t instanceof Boolean?(e=new Boolean(t.valueOf()),i.set(t,e),Nu(e,t,r,i,o),e):t instanceof Number?(e=new Number(t.valueOf()),i.set(t,e),Nu(e,t,r,i,o),e):t instanceof String?(e=new String(t.valueOf()),i.set(t,e),Nu(e,t,r,i,o),e):"object"==typeof t&&function(t){switch(du(t)){case yu:case ku:case wu:case Su:case fu:case Cu:case Eu:case Ou:case Lu:case Mu:case Au:case xu:case gu:case Tu:case uu:case bu:case pu:case mu:case vu:case Bu:case _u:case Fu:return!0;default:return!1}}(t)?(e=Object.create(Object.getPrototypeOf(t)),i.set(t,e),Nu(e,t,r,i,o),e):t}function Nu(t,e,r=t,i,o){var a=[...Object.keys(e),...cu(e)];for(let l=0;l<a.length;l++){var s=a[l],n=Object.getOwnPropertyDescriptor(t,s);null!=n&&!n.writable||(t[s]=Ru(e[s],s,r,i,o))}}function Wu(t,e){return function(t,e){return Ru(t,void 0,t,new Map,e)}(t,((r,i,o,a)=>{if(r=e?.(r,i,o,a),void 0!==r)return r;if("object"==typeof t){if("[object Object]"===du(t)&&"function"!=typeof t.constructor)return a.set(t,i={}),Nu(i,t,o,a),i;switch(Object.prototype.toString.call(t)){case gu:case pu:case fu:var s=new t.constructor(t?.valueOf());return Nu(s,t),s;case yu:return Nu(s={},t),s.length=t.length,s[Symbol.iterator]=t[Symbol.iterator],s;default:return}}}))}function ju(t){return Wu(t)}function Hu(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===du(t)}function Uu(t){return"object"==typeof t&&null!==t}function Yu(t){return Uu(t)&&Du(t)}function Gu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");function r(...i){var o=e?e.apply(this,i):i[0],a=r.cache;return a.has(o)?a.get(o):(i=t.apply(this,i),r.cache=a.set(o,i)||a,i)}return r.cache=new(Gu.Cache||Map),r}function Xu(t){return zu(t)}function Vu(t,e,r,i){if(Pu(t)&&(t=Object(t)),null!=e&&"object"==typeof e){if(i.has(e))return function(t){if(Pu(t))return t;if(Array.isArray(t)||zu(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);var e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);var r,i=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new i(t);if(t instanceof RegExp)return(r=new i(t)).lastIndex=t.lastIndex,r;if(t instanceof DataView)return new i(t.buffer.slice(0));if(t instanceof Error){let e;return(e=t instanceof AggregateError?new i(t.errors,t.message,{cause:t.cause}):new i(t.message,{cause:t.cause})).stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new i([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):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}var o=[...Object.keys(e),...cu(e)];for(let d=0;d<o.length;d++){var a=o[d];if(!qu(a)){let o=e[a],d=t[a];if(Hu(o)&&(o={...o}),Hu(d)&&(d={...d}),Iu(o)&&(o=ju(o)),Array.isArray(o))if(Array.isArray(d)){var s=[],n=Reflect.ownKeys(d);for(let t=0;t<n.length;t++){var l=n[t];s[l]=d[l]}d=s}else if(Yu(d)){var h=[];for(let t=0;t<d.length;t++)h[t]=d[t];d=h}else d=[];var c=r(d,o,a,t,e,i);void 0!==c?t[a]=c:Array.isArray(o)||Uu(d)&&Uu(o)&&(lu(d)||lu(o)||Xu(d)||Xu(o))?t[a]=Vu(d,o,r,i):null==d&&lu(o)?t[a]=Vu({},o,r,i):null==d&&Xu(o)?t[a]=ju(o):void 0!==d&&void 0===o||(t[a]=o)}}}return t}function Zu(t,...e){return function(t,...e){var r=e.slice(0,-1),i=e[e.length-1];let o=t;for(let t=0;t<r.length;t++)o=Vu(o,r[t],i,new Map);return o}(t,...e,hu)}function Qu(t){var e;return null==t||(Du(t)?!!("function"==typeof t.splice||"string"==typeof t||Iu(t)||Xu(t)||Hu(t))&&0===t.length:"object"!=typeof t&&"function"!=typeof t||(t instanceof Map||t instanceof Set?0===t.size:(e=Object.keys(t),function(t){var e=t?.constructor;return t===("function"==typeof e?e:Object).prototype}(t)?0===e.filter((t=>"constructor"!==t)).length:0===e.length)))}Gu.Cache=Map;var Ku="​",Ju={curveBasis:vn,curveBasisClosed:function(t){return new Bn(t)},curveBasisOpen:function(t){return new _n(t)},curveBumpX:bn,curveBumpY:kn,curveBundle:Ln,curveCardinalClosed:$n,curveCardinalOpen:Dn,curveCardinal:En,curveCatmullRomClosed:Nn,curveCatmullRomOpen:jn,curveCatmullRom:zn,curveLinear:fn,curveLinearClosed:function(t){return new Hn(t)},curveMonotoneX:Kn,curveMonotoneY:Jn,curveNatural:rl,curveStep:ol,curveStepAfter:sl,curveStepBefore:al},tp=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ep=i((function(t,e){var r=rp(t,/(?:init\b)|(?:initialize\b)/);let i={};if(i=Array.isArray(r)?(o=r.map((t=>t.args)),je(o),he(i,[...o])):r.args){let r=mr(t,e);var o="config";return void 0!==i[o]&&("flowchart-v2"===r&&(r="flowchart"),i[r]=i[o],delete i[o]),i}}),"detectInit"),rp=i((function(t,e=null){try{for(var r,i,o,a=new RegExp(`[%]{2}(?![{]${tp.source})(?=[}][%]{2}).*\n`,"ig"),s=(t=t.trim().replace(a,"").replace(/'/gm,'"'),h.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t),[]);null!==(r=pr.exec(t));)r.index===pr.lastIndex&&pr.lastIndex++,(r&&!e||e&&r[1]?.match(e)||e&&r[2]?.match(e))&&(i=r[1]||r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null,s.push({type:i,args:o}));return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return h.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),ip=i((function(t){return t.replace(pr,"")}),"removeDirectives"),op=i((function(t,e){for(var[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function ap(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),Ju[t]??e):e}function sp(t,e){if(t=t.trim())return"loose"!==e.securityLevel?ou(t):t}i(ap,"interpolateToCurve"),i(sp,"formatUrl");var np=i(((t,...e)=>{var 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]]))return void h.error(`Function name: ${t} not found in window`);a[o](...e)}),"runFunc");function lp(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function hp(t){let e,r=0;return t.forEach((t=>{r+=lp(t,e),e=t})),up(t,r/2)}function cp(t){return 1===t.length?t[0]:hp(t)}i(lp,"distance"),i(hp,"traverseEdge"),i(cp,"calcLabelPosition");var dp=i(((t,e=2)=>(e=Math.pow(10,e),Math.round(t*e)/e)),"roundNumber"),up=i(((t,e)=>{let r,i=e;for(const e of t){if(r){var o=lp(e,r);if(0===o)return r;if(o<i)i-=o;else{if((o=i/o)<=0)return r;if(1<=o)return{x:e.x,y:e.y};if(0<o&&o<1)return{x:dp((1-o)*r.x+o*e.x,5),y:dp((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),pp=i(((t,e,r)=>{h.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());r=up(e,25),t=t?10:5;var i=Math.atan2(e[0].y-r.y,e[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(i)*t+(e[0].x+r.x)/2,o.y=-Math.cos(i)*t+(e[0].y+r.y)/2,o}),"calcCardinalityPosition");function gp(t,e,r){r=structuredClone(r);var i=(h.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),o=(i=up(r,i),t=10+.5*t,Math.atan2(r[0].y-i.y,r[0].x-i.x)),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(o+Math.PI)*t+(r[0].x+i.x)/2,a.y=-Math.cos(o+Math.PI)*t+(r[0].y+i.y)/2):"end_right"===e?(a.x=Math.sin(o-Math.PI)*t+(r[0].x+i.x)/2-5,a.y=-Math.cos(o-Math.PI)*t+(r[0].y+i.y)/2-5):"end_left"===e?(a.x=Math.sin(o)*t+(r[0].x+i.x)/2-5,a.y=-Math.cos(o)*t+(r[0].y+i.y)/2-5):(a.x=Math.sin(o)*t+(r[0].x+i.x)/2,a.y=-Math.cos(o)*t+(r[0].y+i.y)/2),a}function fp(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}}i(gp,"calcTerminalLabelPosition"),i(fp,"getStylesFromArray");var yp=0,mp=i((()=>(yp++,"id-"+Math.random().toString(36).substr(2,12)+"-"+yp)),"generateId");function Cp(t){let e="";var r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}i(Cp,"makeRandomHex");var xp=i((t=>Cp(t.length)),"random"),bp=i((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"),kp=i((function(t,e){var r,i=e.text.replace(Yr.lineBreakRegex," "),[,r]=Ep(e.fontSize);return(r=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",r),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"))).attr("x",e.x+2*e.textMargin),r.attr("fill",e.fill),r.text(i),t}),"drawSimpleText"),wp=Gu(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Yr.lineBreakRegex.test(t))return t;const i=t.split(" ").filter(Boolean),o=[];let a="";return i.forEach(((t,s)=>{var n,l=vp(t+" ",r),h=vp(a,r),c=(a=e<l?(({hyphenatedStrings:c,remainingWord:n}=Tp(t,e,"-",r)),o.push(a,...c),n):e<=h+l?(o.push(a),t):[a,t].filter(Boolean).join(" "),s+1);c===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)),Tp=Gu(((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)=>{var l=vp(t=""+s+t,i);s=e<=l?(l=n+1,n=o.length===l,l=t+r,a.push(n?t:l),""):t})),{hyphenatedStrings:a,remainingWord:s}}),((t,e,r="-",i)=>""+t+e+r+i.fontSize+i.fontWeight+i.fontFamily));function Sp(t,e){return _p(t,e).height}function vp(t,e){return _p(t,e).width}i(Sp,"calculateTextHeight"),i(vp,"calculateTextWidth");var Bp,_p=Gu(((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};var r,[,o]=Ep(e),a=(e=["sans-serif",r],t.split(Yr.lineBreakRegex)),s=[];if(!(r=Ho("body")).remove)return{width:0,height:0,lineHeight:0};var n=r.append("svg");for(const t of e){var l={width:0,height:0,lineHeight:0};for(const e of a){var h;if(0===(h=((h=((h=bp()).text=e||"​",kp(n,h).style("font-size",o).style("font-weight",i).style("font-family",t)))._groups||h)[0][0].getBBox()).width&&0===h.height)throw new Error("svg element not in render tree");l.width=Math.round(Math.max(l.width,h.width)),h=Math.round(h.height),l.height+=h,l.lineHeight=Math.round(Math.max(l.lineHeight,h))}s.push(l)}return n.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]}),((t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily)),Fp=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{i(this,"InitIDGenerator")}},Lp=i((function(t){return Bp=Bp||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Bp.innerHTML=t,unescape(Bp.textContent)}),"entityDecode");function Mp(t){return"str"in t}i(Mp,"isDetailedError");var Ap=i(((t,e,r,i)=>{var o;i&&(o=t.node()?.getBBox())&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),Ep=i((t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])}),"parseFontSize");function Op(t,e){return Zu({},t,e)}i(Op,"cleanAndMerge");var $p={assignWithDepth:he,wrapLabel:wp,calculateTextHeight:Sp,calculateTextWidth:vp,calculateTextDimensions:_p,cleanAndMerge:Op,detectInit:ep,detectDirective:rp,isSubstringInArray:op,interpolateToCurve:ap,calcLabelPosition:cp,calcCardinalityPosition:pp,calcTerminalLabelPosition:gp,formatUrl:sp,getStylesFromArray:fp,generateId:mp,random:xp,runFunc:np,entityDecode:Lp,insertTitle:Ap,isLabelCoordinateInPath:zp,parseFontSize:Ep,InitIDGenerator:Fp},Ip=i((function(t){let e=t;return(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"}))}),"encodeEntities"),Dp=i((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),qp=i(((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||(i?i+"_":"")+t+`_${e}_`+r+(o?"_"+o:"")),"getEdgeId");function Pp(t){return t??null}function zp(t,e){var r=Math.round(t.x);t=Math.round(t.y),e=e.replace(/(\d+\.\d+)/g,(t=>Math.round(parseFloat(t)).toString()));return e.includes(r.toString())||e.includes(t.toString())}i(Pp,"handleUndefinedAttr"),i(zp,"isLabelCoordinateInPath");var Rp=i((({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}}),"getSubGraphTitleMargins");async function Np(t,e){if((t=t.getElementsByTagName("img"))&&0!==t.length){const r=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...t].map((t=>new Promise((e=>{function o(){var i;t.style.display="flex",t.style.flexDirection="column",r?(i=(yi().fontSize?yi():window.getComputedStyle(document.body)).fontSize,[i=Re.fontSize]=Ep(i),t.style.minWidth=i=5*i+"px",t.style.maxWidth=i):t.style.width="100%",e(t)}i(o,"setupImage"),setTimeout((()=>{t.complete&&o()})),t.addEventListener("error",o),t.addEventListener("load",o)})))))}}i(Np,"configureLabelImages");const Wp=Object.freeze({left:0,top:0,width:16,height:16}),jp=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Hp=Object.freeze({...Wp,...jp}),Up=Object.freeze({...Hp,body:"",hidden:!1}),Yp=Object.freeze({width:null,height:null}),Gp=Object.freeze({...Yp,...jp}),Xp=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function Vp(t,e){var r=function(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}(t,e);for(const i in Up)i in jp?i in t&&!(i in r)&&(r[i]=jp[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function Zp(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let a={};function s(t){a=Vp(i[t]||o[t],a)}return s(e),r.forEach(s),Vp(t,a)}function Qp(t,e){var r;return t.icons[e]?Zp(t,e,[]):(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){var a,s;return r[e]?o[e]=[]:(e in o||(o[e]=null,(s=(a=i[e]&&i[e].parent)&&t(a))&&(o[e]=[a].concat(s))),o[e])})),o}(t,[e])[e])?Zp(t,e,r):null}const Kp=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Jp=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function tg(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;var i=t.split(Kp);if(null===i||!i.length)return t;var o,a=[];let s=i.shift(),n=Jp.test(s);for(;;){if(!n||(o=parseFloat(s),isNaN(o))?a.push(s):a.push(Math.ceil(o*e*r)/r),void 0===(s=i.shift()))return a.join("");n=!n}}const eg=/\sid="(\S+)"/g,rg=new Map;function ig(t){for(var e,r=[];e=eg.exec(t);)r.push(e[1]);if(r.length){const e="suffix"+(16777216*Math.random()|Date.now()).toString(16);r.forEach((r=>{var i=function(t){t=t.replace(/[0-9]+$/,"")||"a";var e=rg.get(t)||0;return rg.set(t,e+1),e?""+t+e:t}(r);r=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+r+')([")]|\\.[a-z])',"g"),"$1"+i+e+"$3")})),t=t.replace(new RegExp(e,"g"),"")}return t}var og={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},ag=new Map,sg=new Map,ng=i((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(h.debug("Registering icon pack:",e.name),"loader"in e)sg.set(e.name,e.loader);else{if(!("icons"in e))throw h.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');ag.set(e.name,e.icons)}}}),"registerIconPacks"),lg=i((async(t,e)=>{var r=((t,e,r,i="")=>{var o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||3<o.length)return null;i=o.shift().slice(1)}if(3<o.length||!o.length)return null;if(1<o.length){const r=o.pop();return t=o.pop(),t={provider:0<o.length?o[0]:i,prefix:t,name:r},e&&!Xp(t)?null:t}const a=o[0];return 1<(t=a.split("-")).length?(o={provider:i,prefix:t.shift(),name:t.join("-")},e&&!Xp(o)?null:o):r&&""===i&&(t={provider:i,prefix:"",name:a},!e||Xp(t,r))?t:null})(t,!0,void 0!==e);if(!r)throw new Error("Invalid icon name: "+t);if(!(e=r.prefix||e))throw new Error("Icon name must contain a prefix: "+t);let i=ag.get(e);if(!i){var o=sg.get(e);if(!o)throw new Error("Icon set not found: "+r.prefix);try{i={...await o(),prefix:e},ag.set(e,i)}catch(t){throw h.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(o=Qp(i,r.name))return o;throw new Error("Icon not found: "+t)}),"getRegisteredIconData"),hg=i((async t=>{try{return await lg(t),!0}catch{return!1}}),"isIconAvailable"),cg=i((async(t,e,r)=>{let i;try{i=await lg(t,e?.fallbackPrefix)}catch(t){h.error(t),i=og}return t=function(t,e){t={...Hp,...t},e={...Gp,...e};const r={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,e].forEach((t=>{var e=[],o=t.hFlip,a=t.vFlip;let s,n=t.rotate;switch(o?a?n+=2:(e.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),e.push("scale(-1 1)"),r.top=r.left=0):a&&(e.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),e.push("scale(1 -1)"),r.top=r.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4){case 1:s=r.height/2+r.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:s=r.width/2+r.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}n%2==1&&(r.left!==r.top&&(s=r.left,r.left=r.top,r.top=s),r.width!==r.height)&&(s=r.width,r.width=r.height,r.height=s),e.length&&(i=function(t,e,r){return t=function(t,e="defs"){let r="";for(var i=t.indexOf("<"+e);0<=i;){var o=t.indexOf(">",i),a=t.indexOf("</"+e);if(-1===o||-1===a)break;var 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),function(t,e){return t?"<defs>"+t+"</defs>"+e:e}(t.defs,e+t.content+r)}(i,'<g transform="'+e.join(" ")+'">',"</g>"))})),t=e.width,e=e.height;var o=r.width,a=r.height;let s,n;null===t?(n=null===e?"1em":"auto"===e?a:e,s=tg(n,o/a)):(s="auto"===t?o:t,n=null===e?tg(s,a/o):"auto"===e?a:e);const l={};return t=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(l[t]=e.toString())},t("width",s),t("height",n),e=[r.left,r.top,o,a],l.viewBox=e.join(" "),{attributes:l,viewBox:e,body:i}}(i,e),e=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>"}(ig(t.body),{...t.attributes,...r}),_r(e,rr())}),"getIconSVG");function dg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ug={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function pg(t){ug=t}var gg={exec:()=>null};function fg(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(mg.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var yg=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),mg={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")},Cg=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xg=/(?:[*+-]|\d{1,9}[.)])/,bg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kg=fg(bg).replace(/bull/g,xg).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(),wg=fg(bg).replace(/bull/g,xg).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(),Tg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Sg=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vg=fg(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sg).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Bg=fg(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xg).getRegex(),_g="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",Fg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Lg=fg("^ {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",Fg).replace("tag",_g).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Mg=fg(Tg).replace("hr",Cg).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",_g).getRegex(),Ag={blockquote:fg(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Mg).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:vg,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Cg,html:Lg,lheading:kg,list:Bg,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Mg,table:gg,text:/^[^\n]+/},Eg=fg("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cg).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",_g).getRegex(),Og={...Ag,lheading:wg,table:Eg,paragraph:fg(Tg).replace("hr",Cg).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Eg).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",_g).getRegex()},$g={...Ag,html:fg("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Fg).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:gg,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fg(Tg).replace("hr",Cg).replace("heading"," *#{1,6} *[^\n]").replace("lheading",kg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ig=/^( {2,}|\\)\n(?!\s*$)/,Dg=/[\p{P}\p{S}]/u,qg=/[\s\p{P}\p{S}]/u,Pg=/[^\s\p{P}\p{S}]/u,zg=fg(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,qg).getRegex(),Rg=/(?!~)[\p{P}\p{S}]/u,Ng=fg(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yg?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Wg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,jg=fg(Wg,"u").replace(/punct/g,Dg).getRegex(),Hg=fg(Wg,"u").replace(/punct/g,Rg).getRegex(),Ug="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Yg=fg(Ug,"gu").replace(/notPunctSpace/g,Pg).replace(/punctSpace/g,qg).replace(/punct/g,Dg).getRegex(),Gg=fg(Ug,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Rg).getRegex(),Xg=fg("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pg).replace(/punctSpace/g,qg).replace(/punct/g,Dg).getRegex(),Vg=fg(/\\(punct)/,"gu").replace(/punct/g,Dg).getRegex(),Zg=fg(/^<(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(),Qg=fg(Fg).replace("(?:--\x3e|$)","--\x3e").getRegex(),Kg=fg("^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",Qg).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Jg=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,tf=fg(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Jg).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ef=fg(/^!?\[(label)\]\[(ref)\]/).replace("label",Jg).replace("ref",Sg).getRegex(),rf=fg(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sg).getRegex(),of=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,af={_backpedal:gg,anyPunctuation:Vg,autolink:Zg,blockSkip:Ng,br:Ig,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:gg,emStrongLDelim:jg,emStrongRDelimAst:Yg,emStrongRDelimUnd:Xg,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:tf,nolink:rf,punctuation:zg,reflink:ef,reflinkSearch:fg("reflink|nolink(?!\\()","g").replace("reflink",ef).replace("nolink",rf).getRegex(),tag:Kg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:gg},sf={...af,link:fg(/^!?\[(label)\]\((.*?)\)/).replace("label",Jg).getRegex(),reflink:fg(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Jg).getRegex()},nf={...af,emStrongRDelimAst:Gg,emStrongLDelim:Hg,url:fg(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",of).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:fg(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",of).getRegex()},lf={...nf,br:fg(Ig).replace("{2,}","*").getRegex(),text:fg(nf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},hf={normal:Ag,gfm:Og,pedantic:$g},cf={normal:af,gfm:nf,breaks:lf,pedantic:sf},df={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uf=t=>df[t];function pf(t,e){if(e){if(mg.escapeTest.test(t))return t.replace(mg.escapeReplace,uf)}else if(mg.escapeTestNoEncode.test(t))return t.replace(mg.escapeReplaceNoEncode,uf);return t}function gf(t){try{t=encodeURI(t).replace(mg.percentDecode,"%")}catch{return null}return t}function ff(t,e){let r=t.replace(mg.findPipe,((t,e,r)=>{let i=!1,o=e;for(;0<=--o&&"\\"===r[o];)i=!i;return i?"|":" |"})),i=r.split(mg.splitPipe),o=0;if(i[0].trim()||i.shift(),0<i.length&&!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(mg.slashPipe,"|");return i}function yf(t,e,r){var i=t.length;if(0===i)return"";let o=0;for(;o<i;){var a=t.charAt(i-o-1);if((a!==e||r)&&(a===e||!r))break;o++}return t.slice(0,i-o)}function mf(t,e,r,i,o){var a=e.href;e=e.title||null,o=t[1].replace(o.other.outputLinkReplace,"$1"),i.state.inLink=!0,t={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:a,title:e,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,t}var Cf=class{options;rules;lexer;constructor(t){this.options=t||ug}space(t){if((t=this.rules.block.newline.exec(t))&&0<t[0].length)return{type:"space",raw:t[0]}}code(t){var e;if(t=this.rules.block.code.exec(t))return e=t[0].replace(this.rules.other.codeRemoveIndent,""),{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:yf(e,"\n")}}fences(t){var e,r;if(t=this.rules.block.fences.exec(t))return r=function(t,e,r){if(null===(t=t.match(r.other.indentCodeCompensation)))return e;let i=t[1];return e.split("\n").map((t=>{var e=t.match(r.other.beginningSpace);return null!==e&&([e]=e,e.length>=i.length)?t.slice(i.length):t})).join("\n")}(e=t[0],t[3]||"",this.rules),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(t){var e;if(t=this.rules.block.heading.exec(t)){let r=t[2].trim();return this.rules.other.endingHash.test(r)&&(e=yf(r,"#"),!this.options.pedantic&&e&&!this.rules.other.endingSpaceChar.test(e)||(r=e.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){if(t=this.rules.block.hr.exec(t))return{type:"hr",raw:yf(t[0],"\n")}}blockquote(t){if(t=this.rules.block.blockquote.exec(t)){let a=yf(t[0],"\n").split("\n"),s="",n="",l=[];for(;0<a.length;){let t,h=!1,c=[];for(t=0;t<a.length;t++)if(this.rules.other.blockquoteStart.test(a[t]))c.push(a[t]),h=!0;else{if(h)break;c.push(a[t])}a=a.slice(t);var e=(r=c.join("\n")).replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,""),r=(s=s?s+"\n"+r:r,n=n?n+"\n"+e:e,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(e,l,!0),this.lexer.state.top=r,0===a.length)break;var i;e=l.at(-1);if("code"===e?.type)break;if("blockquote"===e?.type){var o=(r=e).raw+"\n"+a.join("\n");o=this.blockquote(o);l[l.length-1]=o,s=s.substring(0,s.length-r.raw.length)+o.raw,n=n.substring(0,n.length-r.text.length)+o.text;break}"list"===e?.type&&(o=(r=e).raw+"\n"+a.join("\n"),i=this.list(o),l[l.length-1]=i,s=s.substring(0,s.length-e.raw.length)+i.raw,n=n.substring(0,n.length-r.raw.length)+i.raw,a=o.substring(l.at(-1).raw.length).split("\n"))}return{type:"blockquote",raw:s,tokens:l,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let h=e[1].trim(),c=1<h.length,d={type:"list",raw:"",ordered:c,start:c?+h.slice(0,-1):"",loose:!1,items:[]},u=(h=c?"\\d{1,9}\\"+h.slice(-1):"\\"+h,this.options.pedantic&&(h=c?h:"[*+-]"),this.rules.other.listItemRegex(h)),p=!1;for(;t;){let n=!1,l="",h="";if(!(e=u.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let c=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),g=t.split("\n",1)[0],f=!c.trim(),y=0;if(this.options.pedantic?(y=2,h=c.trimStart()):f?y=e[1].length+1:(y=4<(y=e[2].search(this.rules.other.nonSpaceChar))?1:y,h=c.slice(y),y+=e[1].length),f&&this.rules.other.blankLine.test(g)&&(l+=g+"\n",t=t.substring(g.length+1),n=!0),!n)for(var r=this.rules.other.nextBulletRegex(y),i=this.rules.other.hrRegex(y),o=this.rules.other.fencesBeginRegex(y),a=this.rules.other.headingBeginRegex(y),s=this.rules.other.htmlBeginRegex(y);t;){let e,n=t.split("\n",1)[0];if(g=n,e=this.options.pedantic?g=g.replace(this.rules.other.listReplaceNesting," "):g.replace(this.rules.other.tabCharGlobal," "),o.test(g)||a.test(g)||s.test(g)||r.test(g)||i.test(g))break;if(e.search(this.rules.other.nonSpaceChar)>=y||!g.trim())h+="\n"+e.slice(y);else{if(f||4<=c.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||o.test(c)||a.test(c)||i.test(c))break;h+="\n"+g}f||g.trim()||(f=!0),l+=n+"\n",t=t.substring(n.length+1),c=e.slice(y)}d.loose||(p?d.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(p=!0));let m,C=null;this.options.gfm&&(C=this.rules.other.listIsTask.exec(h))&&(m="[ ] "!==C[0],h=h.replace(this.rules.other.listReplaceTask,"")),d.items.push({type:"list_item",raw:l,task:!!C,checked:m,loose:!1,text:h,tokens:[]}),d.raw+=l}var n,l=d.items.at(-1);if(l){l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd(),d.raw=d.raw.trimEnd();for(let t=0;t<d.items.length;t++)this.lexer.state.top=!1,d.items[t].tokens=this.lexer.blockTokens(d.items[t].text,[]),d.loose||(n=0<(n=d.items[t].tokens.filter((t=>"space"===t.type))).length&&n.some((t=>this.rules.other.anyLine.test(t.raw))),d.loose=n);if(d.loose)for(let t=0;t<d.items.length;t++)d.items[t].loose=!0;return d}}}html(t){if(t=this.rules.block.html.exec(t))return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(t){var e,r,i;if(t=this.rules.block.def.exec(t))return e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:r,title:i}}table(t){if((t=this.rules.block.table.exec(t))&&this.rules.other.tableDelimiter.test(t[2])){let i=ff(t[1]),o=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===o.length){for(var e of o)this.rules.other.tableAlignRight.test(e)?s.align.push("right"):this.rules.other.tableAlignCenter.test(e)?s.align.push("center"):this.rules.other.tableAlignLeft.test(e)?s.align.push("left"):s.align.push(null);for(let t=0;t<i.length;t++)s.header.push({text:i[t],tokens:this.lexer.inline(i[t]),header:!0,align:s.align[t]});for(var r of a)s.rows.push(ff(r,s.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:s.align[e]}))));return s}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:t[1]}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(t){if(t=this.rules.inline.link.exec(t)){var e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;var r=yf(e.slice(0,-1),"\\");if((e.length-r.length)%2==0)return}else{var i;r=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<0)return i;return 0<r?-2:-1}(t[2],"()");if(-2===r)return;-1<r&&(i=(0===t[0].indexOf("!")?5:4)+t[1].length+r,t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,i).trim(),t[3]="")}let o=t[2],a="";return this.options.pedantic?(r=this.rules.other.pedanticHrefTitle.exec(o))&&(o=r[1],a=r[3]):a=t[3]?t[3].slice(1,-1):"",o=o.trim(),mf(t,{href:(o=this.rules.other.startAngleBracket.test(o)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?o.slice(1):o.slice(1,-1):o)&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(t,e){let r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?mf(r,t,r[0],this.lexer,this.rules):{type:"text",raw:e=r[0].charAt(0),text:e}}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,s,n=[...i[0]].length-1,l=n,h=0,c="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+n);null!=(i=c.exec(e));){var o,a;if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6])if(s=[...r].length,i[3]||i[4])l+=s;else if((i[5]||i[6])&&n%3&&!((n+s)%3))h+=s;else if(!(0<(l-=s)))return s=Math.min(s,s+l+h),o=[...i[0]][0].length,o=t.slice(0,n+i.index+o+s),Math.min(n,s)%2?(a=o.slice(1,-1),{type:"em",raw:o,text:a,tokens:this.lexer.inlineTokens(a)}):(a=o.slice(2,-2),{type:"strong",raw:o,text:a,tokens:this.lexer.inlineTokens(a)})}}}codespan(t){if(t=this.rules.inline.code.exec(t)){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),i=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&i&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(t){if(t=this.rules.inline.autolink.exec(t)){let e,r;return r="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(t){var e,r;if(e=this.rules.inline.url.exec(t)){let t,i;if("@"===e[2])t=e[0],i="mailto:"+t;else{for(;r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"",r!==e[0];);t=e[0],i="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock,{type:"text",raw:t[0],text:t[0],escaped:e}}},xf=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ug,this.options.tokenizer=this.options.tokenizer||new Cf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={other:mg,block:hf.normal,inline:cf.normal},this.options.pedantic?(t.block=hf.pedantic,t.inline=cf.pedantic):this.options.gfm&&(t.block=hf.gfm,this.options.breaks?t.inline=cf.breaks:t.inline=cf.gfm),this.tokenizer.rules=t}static get rules(){return{block:hf,inline:cf}}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(mg.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){var 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(mg.tabCharGlobal," ").replace(mg.spaceLine,""));t;){let s;if(!this.options.extensions?.block?.some((r=>!!(s=r.call({lexer:this},t,e))&&(t=t.substring(s.raw.length),e.push(s),!0))))if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);var i=e.at(-1);1===s.raw.length&&void 0!==i?i.raw+="\n":e.push(s)}else if(s=this.tokenizer.code(t))t=t.substring(s.raw.length),i=e.at(-1),"paragraph"===i?.type||"text"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+s.raw,i.text+="\n"+s.text,this.inlineQueue.at(-1).src=i.text):e.push(s);else if(s=this.tokenizer.fences(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.heading(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.hr(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.blockquote(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.list(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.html(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);var o=e.at(-1);"paragraph"===o?.type||"text"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+s.raw,o.text+="\n"+s.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},e.push(s))}else if(s=this.tokenizer.table(t))t=t.substring(s.raw.length),e.push(s);else if(s=this.tokenizer.lheading(t))t=t.substring(s.raw.length),e.push(s);else{let i=t;if(this.options.extensions?.startBlock){let e,r=1/0,o=t.slice(1);this.options.extensions.startBlock.forEach((t=>{"number"==typeof(e=t.call({lexer:this},o))&&0<=e&&(r=Math.min(r,e))})),r<1/0&&0<=r&&(i=t.substring(0,r+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i)))o=e.at(-1),r&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+s.raw,o.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(s),r=i.length!==t.length,t=t.substring(s.raw.length);else if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);var a=e.at(-1);"text"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+s.raw,a.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(s)}else if(t){if(a="Infinite loop on byte: "+t.charCodeAt(0),this.options.silent){console.error(a);break}throw new Error(a)}}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r=t,i=null;if(this.tokens.links){var o=Object.keys(this.tokens.links);if(0<o.length)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(r));)o.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(var a;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(r));)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,n="";for(;t;){let i;if(s||(n=""),s=!1,!this.options.extensions?.inline?.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0))))if(i=this.tokenizer.escape(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.tag(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.link(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(i.raw.length);var l=e.at(-1);"text"===i.type&&"text"===l?.type?(l.raw+=i.raw,l.text+=i.text):e.push(i)}else if(i=this.tokenizer.emStrong(t,r,n))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.codespan(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.br(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.del(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.autolink(t))t=t.substring(i.raw.length),e.push(i);else if(!this.state.inLink&&(i=this.tokenizer.url(t)))t=t.substring(i.raw.length),e.push(i);else{let r=t;if(this.options.extensions?.startInline){let e,i=1/0,o=t.slice(1);this.options.extensions.startInline.forEach((t=>{"number"==typeof(e=t.call({lexer:this},o))&&0<=e&&(i=Math.min(i,e))})),i<1/0&&0<=i&&(r=t.substring(0,i+1))}if(i=this.tokenizer.inlineText(r))t=t.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(n=i.raw.slice(-1)),s=!0,l=e.at(-1),"text"===l?.type?(l.raw+=i.raw,l.text+=i.text):e.push(i);else if(t){var h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}}return e}},bf=class{options;parser;constructor(t){this.options=t||ug}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(mg.notSpaceStart)?.[0],t=t.replace(mg.endingNewline,"")+"\n",e?'<pre><code class="language-'+pf(e)+'">'+(r?t:pf(t,!0))+"</code></pre>\n":"<pre><code>"+(r?t:pf(t,!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++){var o=t.items[e];i+=this.listitem(o)}var a=e?"ol":"ul";return"<"+a+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+a+">\n"}listitem(t){let e="";var r;return t.task&&(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&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+pf(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+" "),`<li>${e+=this.parser.parse(t.tokens,!!t.loose)}</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++){var o=t.rows[e];r="";for(let t=0;t<o.length;t++)r+=this.tablecell(o[t]);i+=this.tablerow({text:r})}return"<table>\n<thead>\n"+e+"</thead>\n"+(i=i&&`<tbody>${i}</tbody>`)+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){var 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>${pf(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){r=this.parser.parseInline(r);var i=gf(t);if(null===i)return r;let o='<a href="'+(t=i)+'"';return e&&(o+=' title="'+pf(e)+'"'),o+">"+r+"</a>"}image({href:t,title:e,text:r,tokens:i}){if(i&&(r=this.parser.parseInline(i,this.parser.textRenderer)),null===(i=gf(t)))return pf(r);let o=`<img src="${t=i}" alt="${r}"`;return e&&(o+=` title="${pf(e)}"`),o+">"}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:pf(t.text)}},kf=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""}},wf=class t{options;renderer;textRenderer;constructor(t){this.options=t||ug,this.options.renderer=this.options.renderer||new bf,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new kf}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 l=0;l<t.length;l++){var i=t[l];if(this.options.extensions?.renderers?.[i.type]){var o=i,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==a||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=a||"";continue}}var s=i;switch(s.type){case"space":r+=this.renderer.space(s);continue;case"hr":r+=this.renderer.hr(s);continue;case"heading":r+=this.renderer.heading(s);continue;case"code":r+=this.renderer.code(s);continue;case"table":r+=this.renderer.table(s);continue;case"blockquote":r+=this.renderer.blockquote(s);continue;case"list":r+=this.renderer.list(s);continue;case"html":r+=this.renderer.html(s);continue;case"def":r+=this.renderer.def(s);continue;case"paragraph":r+=this.renderer.paragraph(s);continue;case"text":{let i=s,o=this.renderer.text(i);for(;l+1<t.length&&"text"===t[l+1].type;)i=t[++l],o+="\n"+this.renderer.text(i);r+=e?this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):o;continue}default:var n='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}return r}parseInline(t,e=this.renderer){let r="";for(let n=0;n<t.length;n++){var i=t[n];if(this.options.extensions?.renderers?.[i.type]){var o=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==o||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=o||"";continue}}var a=i;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:var s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}return r}},Tf=class{options;block;constructor(t){this.options=t||ug}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?xf.lex:xf.lexInline}provideParser(){return this.block?wf.parse:wf.parseInline}},Sf=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=wf;Renderer=bf;TextRenderer=kf;Lexer=xf;Tokenizer=Cf;Hooks=Tf;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(var i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":var o,a,s=i;for(o of s.header)r=r.concat(this.walkTokens(o.tokens,e));for(a of s.rows)for(var n of a)r=r.concat(this.walkTokens(n.tokens,e));break;case"list":s=i,r=r.concat(this.walkTokens(s.items,e));break;default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach((i=>{i=t[i].flat(1/0),r=r.concat(this.walkTokens(i,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=>{var 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?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'");var 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 bf(this.defaults);for(var i in t.renderer){if(!(i in e))throw new Error(`renderer '${i}' does not exist`);if(!["options","parser"].includes(i)){let r=i,o=t.renderer[r],a=e[r];e[r]=(...t)=>{let r=o.apply(e,t);return(r=!1===r?a.apply(e,t):r)||""}}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Cf(this.defaults);for(var o in t.tokenizer){if(!(o in e))throw new Error(`tokenizer '${o}' does not exist`);if(!["options","rules","lexer"].includes(o)){let r=o,i=t.tokenizer[r],a=e[r];e[r]=(...t)=>{let r=i.apply(e,t);return!1===r?a.apply(e,t):r}}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Tf;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(!["options","block"].includes(r)){let i=r,o=t.hooks[i],a=e[i];Tf.passThroughHooks.has(r)?e[i]=t=>{var i;return this.defaults.async&&Tf.passThroughHooksRespectAsync.has(r)?(async()=>{var r=await o.call(e,t);return a.call(e,r)})():(i=o.call(e,t),a.call(e,i))}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r?await a.apply(e,t):r})();let r=o.apply(e,t);return!1===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.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 xf.lex(t,e??this.defaults)}parser(t,e){return wf.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("u"<typeof e||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).hooks.block=t),o.async)return(async()=>{var r=o.hooks?await o.hooks.preprocess(e):e;r=await(o.hooks?await o.hooks.provideLexer():t?xf.lex:xf.lexInline)(r,o),r=o.hooks?await o.hooks.processAllTokens(r):r,o.walkTokens&&await Promise.all(this.walkTokens(r,o.walkTokens)),r=await(o.hooks?await o.hooks.provideParser():t?wf.parse:wf.parseInline)(r,o);return o.hooks?await o.hooks.postprocess(r):r})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?xf.lex:xf.lexInline)(e,o),i=(o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens),(o.hooks?o.hooks.provideParser():t?wf.parse:wf.parseInline)(r,o));return i=o.hooks?o.hooks.postprocess(i):i}catch(r){return a(r)}}}onError(t,e){return r=>{var i;if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t)return i="<p>An error occurred:</p><pre>"+pf(r.message+"",!0)+"</pre>",e?Promise.resolve(i):i;if(e)return Promise.reject(r);throw r}}};function vf(t,e){return Sf.parse(t,e)}function Bf(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i,o=Array.from("string"==typeof t?[t]:t),a=(o[o.length-1]=o[o.length-1].replace(/\r?\n([\t ]*)$/,""),o.reduce((function(t,e){return(e=e.match(/\n([\t ]+|(?!\s).)/g))?t.concat(e.map((function(t){return null!=(t=null==(t=t.match(/[\t ]/g))?void 0:t.length)?t:0}))):t}),[])),s=(a.length&&(i=new RegExp("\n[\t ]{".concat(Math.min.apply(Math,a),"}"),"g"),o=o.map((function(t){return t.replace(i,"\n")}))),o[0]=o[0].replace(/^\r?\n/,""),o[0]);return e.forEach((function(t,e){var r=(i=s.match(/(?:^|\n)( *)$/))?i[1]:"",i=t;"string"==typeof t&&t.includes("\n")&&(i=String(t).split("\n").map((function(t,e){return 0===e?t:"".concat(r).concat(t)})).join("\n")),s+=i+o[e+1]})),s}function _f(t,{}){return Bf(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"))}function Ff(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map((t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((t=>({content:t,type:"normal"})))??[]))}function Lf(t,e={}){t=_f(t,e),e=vf.lexer(t);const r=[[]];let o=0;function a(t,e="normal"){"text"===t.type?t.text.split("\n").forEach(((t,i)=>{0!==i&&(o++,r.push([])),t.split(" ").forEach((t=>{(t=t.replace(/&#39;/g,"'"))&&r[o].push({content:t,type:e})}))})):"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{a(e,t.type)})):"html"===t.type&&r[o].push({content:t.text,type:"normal"})}return i(a,"processNode"),e.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{a(t)})):"html"===t.type?r[o].push({content:t.text,type:"normal"}):r[o].push({content:t.raw,type:"normal"})})),r}function Mf(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Af(t,{markdownAutoWrap:e}={}){function r(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(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:(h.warn("Unsupported markdown: "+t.type),t.raw)}return t=vf.lexer(t),i(r,"output"),t.map(r).join("")}function Ef(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function Of(t,e){return $f(t,[],Ef(e.content),e.type)}function $f(t,e,r,i){var o,a,s;return 0===r.length?[{content:e.join(""),type:i},{content:"",type:i}]:([o,...a]=r,t([{content:(s=[...e,o]).join(""),type:i}])?$f(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}]))}function If(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return Df(t,e)}function Df(t,e,r=[],i=[]){if(0===t.length)return 0<i.length&&r.push(i),0<r.length?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());var a=t.shift()??{content:" ",type:"normal"},s=[...i];return""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s)?Df(t,e,r,s):(0<i.length?(r.push(i),t.unshift(a)):a.content&&([s,i]=Of(e,a),r.push([s]),i.content)&&t.unshift(i),Df(t,e,r))}function qf(t,e){e&&t.attr("style",e)}vf.options=vf.setOptions=function(t){return Sf.setOptions(t),vf.defaults=Sf.defaults,pg(vf.defaults),vf},vf.getDefaults=dg,vf.defaults=ug,vf.use=function(...t){return Sf.use(...t),vf.defaults=Sf.defaults,pg(vf.defaults),vf},vf.walkTokens=function(t,e){return Sf.walkTokens(t,e)},vf.parseInline=Sf.parseInline,vf.Parser=wf,vf.parser=wf.parse,vf.Renderer=bf,vf.TextRenderer=kf,vf.Lexer=xf,vf.lexer=xf.lex,vf.Tokenizer=Cf,vf.Hooks=Tf,(vf.parse=vf).options,vf.setOptions,vf.use,vf.walkTokens,vf.parseInline,wf.parse,xf.lex,i(_f,"preprocessMarkdown"),i(Ff,"nonMarkdownToLines"),i(Lf,"markdownToLines"),i(Mf,"nonMarkdownToHTML"),i(Af,"markdownToHTML"),i(Ef,"splitTextToChars"),i(Of,"splitWordToFitWidth"),i($f,"splitWordToFitWidthRecursion"),i(If,"splitLineToFitWidth"),i(Df,"splitLineToFitWidthRecursion"),i(qf,"applyStyle");async function Pf(t,e,r,i,o=!1,a=rr()){var s=((t=t.append("foreignObject")).attr("width",Math.min(10*r,16384)+"px"),t.attr("height",Math.min(10*r,16384)+"px"),t.append("xhtml:div")),n=(a=Wr(e.label)?await Ur(e.label.replace(Yr.lineBreakRegex,"\n"),a):_r(e.label,a),e.isNode?"nodeLabel":"edgeLabel"),l=s.append("span");return(a=(l.html(a),qf(l,e.labelStyle),l.attr("class",n+" "+i),qf(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(s.style("max-width",r+"px"),s.style("text-align","center")),s.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&s.attr("class","labelBkg"),s.node().getBoundingClientRect())).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),a=s.node().getBoundingClientRect()),t.node()}function zf(t,e,r,i=!1){return t=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em"),i&&t.attr("text-anchor","middle"),t}function Rf(t,e,r){return Hf(e=zf(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function Nf(t,e,r){return Hf(e=zf(t=t.append("text"),1,e),[{content:r,type:"normal"}]),r=e.node()?.getBoundingClientRect(),r&&t.remove(),r}function Wf(t,e,r,o=!1,a=!1){const s=e.append("g");e=s.insert("rect").attr("class","background").attr("style","stroke: none");var n=s.append("text").attr("y","-10.1");a&&n.attr("text-anchor","middle");let l=0;for(const e of r){var h=i((e=>Rf(s,1.1,e)<=t),"checkWidth");for(const t of h(e)?[e]:If(e,h))Hf(zf(n,l,1.1,a),t),l++}return(o?(r=n.node().getBBox(),e.attr("x",r.x-2).attr("y",r.y-2).attr("width",r.width+4).attr("height",r.height+4),s):n).node()}function jf(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 Hf(t,e){t.text(""),e.forEach(((e,r)=>{var 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(jf(e.content)):i.text(" "+jf(e.content))}))}async function Uf(t,e={}){const r=[],i=(t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,((t,i,o)=>(r.push((async()=>{var r=i+":"+o;return await hg(r)?cg(r,void 0,{class:"label-icon"}):`<i class='${_r(t,e).replace(":"," ")}'></i>`})()),t))),await Promise.all(r));return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(()=>i.shift()??""))}i(Pf,"addHtmlSpan"),i(zf,"createTspan"),i(Rf,"computeWidthOfText"),i(Nf,"computeDimensionOfText"),i(Wf,"createFormattedText"),i(jf,"decodeHTMLEntities"),i(Hf,"updateTextContentAndStyles"),i(Uf,"replaceIconSubstring");var Yf=i((async(t,e="",{style:r="",isTitle:i=!1,classes:o="",useHtmlLabels:a=!0,markdown:s=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},d)=>{var u;return h.debug("XYZ createText",e,r,i,o,a,n,"addSvgBackground: ",c),a?(a=s?Af(e,d):Mf(e),a=await Uf(Dp(a),d),u=e.replace(/\\\\/g,"\\"),await Pf(t,{isNode:n,label:Wr(e)?u:a,labelStyle:r.replace("fill:","color:")},l,o,c,d)):(u=Dp(e.replace(/<br\s*\/?>/g,"<br/>")),a=Wf(l,t,s?Lf(u.replace("<br>","<br/>"),d):Ff(u),!!e&&c,!n),n?(o=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),Ho(a).attr("style",o)):(l=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),Ho(a).select("rect").attr("style",l.replace(/background:/g,"fill:")),t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),Ho(a).select("text").attr("style",t)),i?Ho(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Ho(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a)}),"createText");function Gf(t,e,r){if(t&&t.length){var[i,o]=e,a=(e=Math.PI/180*r,Math.cos(e)),s=Math.sin(e);for(const e of t){const[t,r]=e;e[0]=(t-i)*a-(r-o)*s+i,e[1]=(t-i)*s+(r-o)*a+o}}}function Xf(t,e){return t[0]===e[0]&&t[1]===e[1]}function Vf(t,e,r,i=1){var o=r,a=(r=Math.max(e,.1),e=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,[0,0]);if(o)for(const t of e)Gf(t,a,o);if(t=function(t,e,r){var i=[];for(const e of t){const t=[...e];Xf(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),2<t.length&&i.push(t)}var o=[],a=(e=Math.max(e,.1),[]);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: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){let t=[],i=a[0].ymin,s=0;for(;t.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>i);t++)e=t;a.splice(0,e+1).forEach((e=>{t.push({s:i,edge:e})}))}if((t=t.filter((t=>!(t.edge.ymax<=i)))).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||s%e==0)&&1<t.length)for(let e=0;e<t.length;e+=2){const r=e+1;if(r>=t.length)break;const a=t[e].edge,s=t[r].edge;o.push([[Math.round(a.x),i],[Math.round(s.x),i]])}i+=r,t.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),s++}}return o}(e,r,i),o){for(const t of e)Gf(t,a,-o);{r=a,i=-o;const e=[];t.forEach((t=>e.push(...t))),Gf(e,r,i)}}return t}function Zf(t,e){var r=e.hachureAngle+90;let i=e.hachureGap,o=(i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=e.roughness&&.7<((null==(e=e.randomizer)?void 0:e.next())||Math.random())&&(o=i),Vf(t,i,r,o||1)}class Qf{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=Zf(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var 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 Kf(t){var e=t[0];t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}class Jf extends Qf{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var i=Zf(t,Object.assign({},e,{hachureGap:r})),o=(t=Math.PI/180*e.hachureAngle,[]),a=.5*r*Math.cos(t),s=.5*r*Math.sin(t);for(const[t,e]of i)Kf([t,e])&&o.push([[t[0]-a,t[1]+s],[...e]],[[t[0]+a,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(o,e)}}}class ty extends Qf{fillPolygons(t,e){var r=this._fillPolygons(t,e);e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}}class ey{constructor(t){this.helper=t}fillPolygons(t,e){return t=Zf(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){var r=[];let i=e.hachureGap,o=(i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1),e.fillWeight);o<0&&(o=e.strokeWidth/2);var a=i/4;for(const s of t){const t=Kf(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 ry{constructor(t){this.helper=t}fillPolygons(t,e){return t=Zf(t,e),{type:"fillSketch",ops:this.dashedLine(t,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=Kf(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]);var 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 iy{constructor(t){this.helper=t}fillPolygons(t,e){var r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset;t=Zf(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(t,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach((t=>{const o=Kf(t),a=Math.round(o/(2*e));let s=t[0],n=t[1];s[0]>n[0]&&(s=t[1],n=t[0]);var 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 oy={};class ay{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const sy=0,ny=1,ly=2,hy={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 cy(t,e){return t.type===e}function dy(t){const e=[],r=function(t){for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:sy,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:ny,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:ly,text:""},e}(t);let i="BOD",o=0,a=r[o];for(;!cy(a,ly);){let n=0;var s=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return dy("M0,0"+t);o++,n=hy[a.text],i=a.text}else cy(a,ny)?n=hy[i]:(o++,n=hy[a.text],i=a.text);if(!(o+n<r.length))throw new Error("Path data ended short");for(let t=o;t<o+n;t++){const e=r[t];if(!cy(e,ny))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof hy[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),o+=n,a=r[o],"m"===(i="M"===i?"L":i)&&(i="l")}}return e}function uy(t){let e=0,r=0,i=0,o=0;var a,s,n=[];for({key:a,data:s}of t)switch(a){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,o]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":n.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],n.push({key:"L",data:[e,r]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],n.push({key:"V",data:[r]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));n.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],n.push({key:"T",data:[e,r]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=i,r=o}return n}function py(t){const e=[];let r="",i=0,o=0,a=0,s=0,n=0,l=0;for(var{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;a="C"===r||"S"===r?(t=i+(i-n),o+(o-l)):(t=i,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;h="Q"===r||"T"===r?(s=i+(i-n),o+(o-l)):(s=i,o);var 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||(fy(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 gy(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function fy(t,e,r,i,o,a,s,n,l,h){var c=Math.PI*s/180;let d=[],u=0,p=0,g=0,f=0;if(h)[u,p,g,f]=h;else{[t,e]=gy(t,e,-c),[r,i]=gy(r,i,-c);const s=(t-r)/2,h=(e-i)/2;var y=s*s/(o*o)+h*h/(a*a);1<y&&(o*=y=Math.sqrt(y),a*=y);const d=o*o,m=a*a,C=d*m-d*h*h-m*s*s,x=d*h*h+m*s*s,b=(n===l?-1:1)*Math.sqrt(Math.abs(C/x));g=b*o*h/a+(t+r)/2,f=b*-a*s/o+(e+i)/2,u=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((i-f)/a).toFixed(9))),t<g&&(u=Math.PI-u),r<g&&(p=Math.PI-p),u<0&&(u=2*Math.PI+u),p<0&&(p=2*Math.PI+p),l&&u>p&&(u-=2*Math.PI),!l&&p>u&&(p-=2*Math.PI)}let m=p-u;if(Math.abs(m)>120*Math.PI/180){const t=p,e=r,n=i;p=l&&p>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,d=fy(r=g+o*Math.cos(p),i=f+a*Math.sin(p),e,n,o,a,s,0,l,[p,t,g,f])}m=p-u;const C=Math.cos(u),x=Math.sin(u),b=Math.cos(p),k=Math.sin(p),w=Math.tan(m/4),T=4/3*o*w,S=4/3*a*w,v=[t,e],B=[t+T*x,e-S*C],_=[r+T*k,i-S*b],F=[r,i];if(B[0]=2*v[0]-B[0],B[1]=2*v[1]-B[1],h)return[B,_,F].concat(d);{d=[B,_,F].concat(d);const t=[];for(let e=0;e<d.length;e+=3){const r=gy(d[e][0],d[e][1],c),i=gy(d[e+1][0],d[e+1][1],c),o=gy(d[e+2][0],d[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const yy={randOffset:function(t,e){return Ly(t,e)},randOffsetWithRange:function(t,e,r){return Fy(t,e,r)},ellipse:function(t,e,r,i,o){return ky(t,e,o,by(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return My(t,e,r,i,o,!0)}};function my(t,e,r,i,o){return{type:"path",ops:My(t,e,r,i,o)}}function Cy(t,e,r){var i=(t||[]).length;if(2<i){var o=[];for(let e=0;e<i-1;e++)o.push(...My(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...My(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?my(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function xy(t,e){if(t.length){var r="number"==typeof t[0][0]?[t]:t,i=Ey(r[0],1+.2*e.roughness,e),o=e.disableMultiStroke?[]:Ey(r[0],1.5*(1+.22*e.roughness),By(e));for(let t=1;t<r.length;t++){var a=r[t];if(a.length){const t=Ey(a,1+.2*e.roughness,e),r=e.disableMultiStroke?[]:Ey(a,1.5*(1+.22*e.roughness),By(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 by(t,e,r){var i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=(i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),i=2*Math.PI/i,t=Math.abs(t/2),e=Math.abs(e/2),1-r.curveFitting);return{increment:i,rx:t+=Ly(t*o,r),ry:e+=Ly(e*o,r)}}function ky(t,e,r,i){const[o,a]=$y(i.increment,t,e,i.rx,i.ry,1,i.increment*Fy(.1,Fy(.4,1,r),r),r);let s=Oy(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=$y(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=Oy(o,null,r);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function wy(t,e,r,i,o,a,s,n,l){var h=t;r=Math.abs(r/2),i=Math.abs(i/2);r+=Ly(.01*r,l),i+=Ly(.01*i,l);let c=o,d=a;for(;c<0;)c+=2*Math.PI,d+=2*Math.PI;if(d-c>2*Math.PI&&(c=0,d=2*Math.PI),t=2*Math.PI/l.curveStepCount,a=Iy(o=Math.min(t/2,(d-c)/2),h,e,r,i,c,d,1,l),!l.disableMultiStroke){const t=Iy(o,h,e,r,i,c,d,1.5,l);a.push(...t)}return s&&(n?a.push(...My(h,e,h+r*Math.cos(c),e+i*Math.sin(c),l),...My(h,e,h+r*Math.cos(d),e+i*Math.sin(d),l)):a.push({op:"lineTo",data:[h,e]},{op:"lineTo",data:[h+r*Math.cos(c),e+i*Math.sin(c)]})),{type:"path",ops:a}}function Ty(t,e){const r=py(uy(dy(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(...My(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(...Dy(t,r,o,n,l,h,a,e)),a=[l,h];break}case"Z":i.push(...My(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function Sy(t,e){var r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(2<o){r.push({op:"move",data:[i[0][0]+Ly(t,e),i[0][1]+Ly(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+Ly(t,e),i[a][1]+Ly(t,e)]})}}return{type:"fillPath",ops:r}}function vy(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!oy[r])switch(r){case"zigzag":oy[r]||(oy[r]=new Jf(e));break;case"cross-hatch":oy[r]||(oy[r]=new ty(e));break;case"dots":oy[r]||(oy[r]=new ey(e));break;case"dashed":oy[r]||(oy[r]=new ry(e));break;case"zigzag-line":oy[r]||(oy[r]=new iy(e));break;default:r="hachure",oy[r]||(oy[r]=new Qf(e))}return oy[r]}(e,yy).fillPolygons(t,e)}function By(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function _y(t){return t.randomizer||(t.randomizer=new ay(t.seed||0)),t.randomizer.next()}function Fy(t,e,r,i=1){return r.roughness*i*(_y(r)*(e-t)+t)}function Ly(t,e,r=1){return Fy(-t,t,e,r)}function My(t,e,r,i,o,a=!1){a=a?o.disableMultiStrokeFill:o.disableMultiStroke;var s=Ay(t,e,r,i,o,!0,!1);return a?s:(a=Ay(t,e,r,i,o,!0,!0),s.concat(a))}function Ay(t,e,r,i,o,a,s){var n=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(n);let h,c=(h=l<200?1:500<l?.4:-.0016668*l+1.233334,o.maxRandomnessOffset||0);const d=(c=c*c*100>n?l/10:c)/2,u=.2+.2*_y(o);n=o.bowing*o.maxRandomnessOffset*(i-e)/200,l=o.bowing*o.maxRandomnessOffset*(t-r)/200,n=Ly(n,o,h),l=Ly(l,o,h);var p=[],g=()=>Ly(d,o,h),f=()=>Ly(c,o,h),y=o.preserveVertices;return a&&p.push(s?{op:"move",data:[t+(y?0:g()),e+(y?0:g())]}:{op:"move",data:[t+(y?0:Ly(c,o,h)),e+(y?0:Ly(c,o,h))]}),p.push(s?{op:"bcurveTo",data:[n+t+(r-t)*u+g(),l+e+(i-e)*u+g(),n+t+2*(r-t)*u+g(),l+e+2*(i-e)*u+g(),r+(y?0:g()),i+(y?0:g())]}:{op:"bcurveTo",data:[n+t+(r-t)*u+f(),l+e+(i-e)*u+f(),n+t+2*(r-t)*u+f(),l+e+2*(i-e)*u+f(),r+(y?0:f()),i+(y?0:f())]}),p}function Ey(t,e,r){if(!t.length)return[];var i=[];i.push([t[0][0]+Ly(e,r),t[0][1]+Ly(e,r)]),i.push([t[0][0]+Ly(e,r),t[0][1]+Ly(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+Ly(e,r),t[o][1]+Ly(e,r)]),o===t.length-1&&i.push([t[o][0]+Ly(e,r),t[o][1]+Ly(e,r)]);return Oy(i,null,r)}function Oy(t,e,r){var i=t.length,o=[];if(3<i){var a=[],s=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];a[0]=[r[0],r[1]],a[1]=[r[0]+(s*t[e+1][0]-s*t[e-1][0])/6,r[1]+(s*t[e+1][1]-s*t[e-1][1])/6],a[2]=[t[e+1][0]+(s*t[e][0]-s*t[e+2][0])/6,t[e+1][1]+(s*t[e][1]-s*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+Ly(t,r),e[1]+Ly(t,r)]})}}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(...Ay(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return o}function $y(t,e,r,i,o,a,s,n){var 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{var c=Ly(.5,n)-Math.PI/2,d=(h.push([Ly(a,n)+e+.9*i*Math.cos(c-t),Ly(a,n)+r+.9*o*Math.sin(c-t)]),2*Math.PI+c-.01);for(let s=c;s<d;s+=t){const t=[Ly(a,n)+e+i*Math.cos(s),Ly(a,n)+r+o*Math.sin(s)];l.push(t),h.push(t)}h.push([Ly(a,n)+e+i*Math.cos(c+2*Math.PI+.5*s),Ly(a,n)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([Ly(a,n)+e+.98*i*Math.cos(c+s),Ly(a,n)+r+.98*o*Math.sin(c+s)]),h.push([Ly(a,n)+e+.9*i*Math.cos(c+.5*s),Ly(a,n)+r+.9*o*Math.sin(c+.5*s)])}return[h,l]}function Iy(t,e,r,i,o,a,s,n,l){a+=Ly(.1,l);var h=[];h.push([Ly(n,l)+e+.9*i*Math.cos(a-t),Ly(n,l)+r+.9*o*Math.sin(a-t)]);for(let c=a;c<=s;c+=t)h.push([Ly(n,l)+e+i*Math.cos(c),Ly(n,l)+r+o*Math.sin(c)]);return h.push([e+i*Math.cos(s),r+o*Math.sin(s)]),h.push([e+i*Math.cos(s),r+o*Math.sin(s)]),Oy(h,null,l)}function Dy(t,e,r,i,o,a,s,n){var l,h=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3],d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let p=0;p<d;p++)0===p?h.push({op:"move",data:[s[0],s[1]]}):h.push({op:"move",data:[s[0]+(u?0:Ly(c[0],n)),s[1]+(u?0:Ly(c[0],n))]}),l=u?[o,a]:[o+Ly(c[p],n),a+Ly(c[p],n)],h.push({op:"bcurveTo",data:[t+Ly(c[p],n),e+Ly(c[p],n),r+Ly(c[p],n),i+Ly(c[p],n),l[0],l[1]]});return h}function qy(t){return[...t]}function Py(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");var i=[];if(3===r)i.push(qy(t[0]),qy(t[1]),qy(t[2]),qy(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]);var o=[],a=1-e;i.push(qy(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 zy(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Ry(t,e,r){var i=zy(e,r);return 0===i?zy(t,e):(i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i,zy(t,Ny(e,r,i=Math.max(0,Math.min(1,i)))))}function Ny(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function Wy(t,e,r,i){var o,a,s=i||[];if(function(){var 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],n=(s*=s,3*i[1]-2*r[1]-a[1]);return n*=n,i=3*o[0]-2*a[0]-r[0],i*=i,o=3*o[1]-2*a[1]-r[1],s<i&&(s=i),n<(o*=o)&&(n=o),s+n}()<r){const r=t[e+0];(!s.length||(o=s[s.length-1],a=r,1<Math.sqrt(zy(o,a))))&&s.push(r),s.push(t[e+3])}else{const i=t[e+0],o=t[e+1],a=t[e+2],n=t[e+3],l=Ny(i,o,.5),h=Ny(o,a,.5),c=Ny(a,n,.5),d=Ny(l,h,.5),u=Ny(h,c,.5),p=Ny(d,u,.5);Wy([i,l,d,p],0,r,s),Wy([p,u,c,n],0,r,s)}return s}function jy(t,e){return Hy(t,0,t.length,e)}function Hy(t,e,r,i,o){o=o||[];var a=t[e],s=t[r-1];let n=0,l=1;for(let i=e+1;i<r-1;++i){const e=Ry(t[i],a,s);e>n&&(n=e,l=i)}return Math.sqrt(n)>i?(Hy(t,e,l+1,i,o),Hy(t,l,r,i,o)):(o.length||o.push(a),o.push(s)),o}function Uy(t,e=.15,r){var i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)Wy(t,3*r,e,i);return r&&0<r?Hy(i,0,i.length,r):i}const Yy="none";class Gy{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){return o=this._o(o),this._d("line",[my(t,e,r,i,o)],o)}rectangle(t,e,r,i,o){var a=this._o(o),s=[];o=function(t,e,r,i,o){return Cy([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,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(Sy([o],a)):s.push(vy([o],a))}return a.stroke!==Yy&&s.push(o),this._d("rectangle",s,a)}ellipse(t,e,r,i,o){var a=[];r=ky(t,e,o=this._o(o),i=by(r,i,o));if(o.fill)if("solid"===o.fillStyle){const r=ky(t,e,o,i).opset;r.type="fillPath",a.push(r)}else a.push(vy([r.estimatedPoints],o));return o.stroke!==Yy&&a.push(r.opset),this._d("ellipse",a,o)}circle(t,e,r,i){return(t=this.ellipse(t,e,r,r,i)).shape="circle",t}linearPath(t,e){return e=this._o(e),this._d("linearPath",[Cy(t,!1,e)],e)}arc(t,e,r,i,o,a,s=!1,n){var l=this._o(n),h=[];n=wy(t,e,r,i,o,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l),n=wy(t,e,r,i,o,a,s.disableMultiStroke=!0,!1,s);n.type="fillPath",h.push(n)}else h.push(function(i,o,a,s){var n=t,l=e,h=Math.abs(r/2),c=Math.abs(i/2);h+=Ly(.01*h,s),c+=Ly(.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);var 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]),vy([g],s)}(i,o,a,l));return l.stroke!==Yy&&h.push(n),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=xy(t,r);if(r.fill&&r.fill!==Yy)if("solid"===r.fillStyle){const e=xy(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(...Uy(Py([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Uy(Py(i),10,(1+r.roughness)/2))}e.length&&i.push(vy([e],r))}return r.stroke!==Yy&&i.push(o),this._d("curve",i,r)}polygon(t,e){var r=[],i=Cy(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(Sy([t],e)):r.push(vy([t],e))),e.stroke!==Yy&&r.push(i),this._d("polygon",r,e)}path(t,e){const r=this._o(e),i=[];if(t){t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");e=r.fill&&"transparent"!==r.fill&&r.fill!==Yy;var o=r.stroke!==Yy,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=py(uy(dy(t))),o=[];let a=[],s=[0,0],n=[];const l=()=>{4<=n.length&&a.push(...Uy(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;var c=[];for(const t of o){const e=jy(t,r);e.length&&c.push(e)}return c}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),n=Ty(t,r);if(e)if("solid"===r.fillStyle)if(1===s.length){const e=Ty(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(Sy(s,r));else i.push(vy(s,r));o&&(a?s.forEach((t=>{i.push(Cy(t,!1,r))})):i.push(n))}return this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&0<=e?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){var 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:Yy};break;case"fillPath":e={d:this.opsToPath(t),stroke:Yy,strokeWidth:0,fill:r.fill||Yy};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||Yy,strokeWidth:r,fill:Yy}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class Xy{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Gy(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&&0<=r?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){return t=this.gen.line(t,e,r,i,o),this.draw(t),t}rectangle(t,e,r,i,o){return t=this.gen.rectangle(t,e,r,i,o),this.draw(t),t}ellipse(t,e,r,i,o){return t=this.gen.ellipse(t,e,r,i,o),this.draw(t),t}circle(t,e,r,i){return t=this.gen.circle(t,e,r,i),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,i,o,a,s=!1,n){return t=this.gen.arc(t,e,r,i,o,a,s,n),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}}const Vy="http://www.w3.org/2000/svg";class Zy{constructor(t,e){this.svg=t,this.gen=new Gy(e)}draw(t){var e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Vy,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":(e=i.createElementNS(Vy,"path")).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(Vy,"path")).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;return i<0&&(i=r.strokeWidth/2),(t=t.createElementNS(Vy,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",i+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}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){return t=this.gen.line(t,e,r,i,o),this.draw(t)}rectangle(t,e,r,i,o){return t=this.gen.rectangle(t,e,r,i,o),this.draw(t)}ellipse(t,e,r,i,o){return t=this.gen.ellipse(t,e,r,i,o),this.draw(t)}circle(t,e,r,i){return t=this.gen.circle(t,e,r,i),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,i,o,a,s=!1,n){return t=this.gen.arc(t,e,r,i,o,a,s,n),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}}var Qy={canvas:(t,e)=>new Xy(t,e),svg:(t,e)=>new Zy(t,e),generator:t=>new Gy(t),newSeed:()=>Gy.newSeed()},Ky=i((async(t,e,r)=>{let i;var o=e.useHtmlLabels||Ye(yi()?.htmlLabels);t=(r=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id))).insert("g").attr("class","label").attr("style",Pp(e.labelStyle));let a;a=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];var s=!!e.icon||!!e.img,n="markdown"===e.labelType;let l=(s=await Yf(t,_r(Dp(a),yi()),{useHtmlLabels:o,width:e.width||yi().flowchart?.wrappingWidth,classes:n?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:s,markdown:n},yi())).getBBox();var h;n=(e?.padding??0)/2;return o&&(h=s.children[0],s=Ho(s),await Np(h,a),l=h.getBoundingClientRect(),s.attr("width",l.width),s.attr("height",l.height)),o?t.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):t.attr("transform","translate(0, "+-l.height/2+")"),e.centerLabel&&t.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),t.insert("rect",":first-child"),{shapeSvg:r,bbox:l,halfPadding:n,label:t}}),"labelHelper"),Jy=i((async(t,e,r)=>{var i=r.useHtmlLabels??dr(yi()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||"");let a=(e=await Yf(o,_r(Dp(e),yi()),{useHtmlLabels:i,width:r.width||yi()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img})).getBBox();var s,n=r.padding/2;return dr(yi())&&(s=e.children[0],e=Ho(e),a=s.getBoundingClientRect(),e.attr("width",a.width),e.attr("height",a.height)),i?o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):o.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:a,halfPadding:n,label:o}}),"insertLabel"),tm=i(((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height}),"updateNodeBounds"),em=i(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function rm(t){return t=t.map(((t,e)=>(0===e?"M":"L")+t.x+","+t.y)),t.push("Z"),t.join(" ")}function im(t,e,r,i,o,a){var s=[],n=r-t,l=2*Math.PI/(n/a),h=e+(i-e)/2;for(let e=0;e<=50;e++){var c=t+e/50*n,d=h+o*Math.sin(l*(c-t));s.push({x:c,y:d})}return s}function om(t,e,r,i,o,a){var s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){var h=n+o*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:-c,y:-h})}return s}function am(t){t=Array.from(t.childNodes).filter((t=>"path"===t.tagName));const e=document.createElementNS("http://www.w3.org/2000/svg","path");var r=t.map((t=>t.getAttribute("d"))).filter((t=>null!==t)).join(" "),o=(r=(e.setAttribute("d",r),t.find((t=>"none"!==t.getAttribute("fill")))),t=t.find((t=>"none"!==t.getAttribute("stroke"))),i(((t,e)=>t?.getAttribute(e)??void 0),"getAttr"));r&&(r={fill:o(r,"fill"),"fill-opacity":o(r,"fill-opacity")??"1"},Object.entries(r).forEach((([t,r])=>{r&&e.setAttribute(t,r)}))),t&&(r={stroke:o(t,"stroke"),"stroke-width":o(t,"stroke-width")??"1","stroke-opacity":o(t,"stroke-opacity")??"1"},Object.entries(r).forEach((([t,r])=>{r&&e.setAttribute(t,r)}))),o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(e),o}i(rm,"createPathFromPoints"),i(im,"generateFullSineWavePoints"),i(om,"generateCirclePoints"),i(am,"mergePaths");var sm=i(((t,e)=>{var r,i=t.x,o=t.y,a=e.x-i,s=(e=e.y-o,t.width/2);t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:i+r,y:o+t}}),"intersectRect"),nm=sm,lm=i((async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);e=yi();var s=dr(e);return Yf(t,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},e)}),"createLabel"),hm=lm,cm=i(((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"),dm=i((async(t,e)=>{var r=yi(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:i,clusterBorder:a}=i,{labelStyles:s,nodeStyles:n,borderStyles:l,backgroundStyles:c}=Jd(e),d=(t=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),r=Ye(r.flowchart.htmlLabels),"LR"===e.direction),u=t.insert("g").attr("class","cluster-label swimlane-label");let p=(g=await Yf(u,e.label,{style:e.labelStyle,useHtmlLabels:r,isNode:!0,width:e.width})).getBBox();r&&(r=g.children[0],g=Ho(g),p=r.getBoundingClientRect(),g.attr("width",p.width),g.attr("height",p.height));r=e.padding??0;var g=e.width<=p.width+r?p.width+r:e.width,f=(e.width<=p.width+r?e.diff=(g-e.width)/2-r:e.diff=-r,e.height),y=e.y-f/2,m=e.y+f/2,C=e.x-g/2,x=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:y+f/3,b=d?4:0,k=p.height+2*b;let w,T;if(d){b=C+(d=Math.max(k,p.height+2*b));var S=Math.max(0,g-d);if("handDrawn"===e.look){var v=Qy.svg(t),B=tu(e,{roughness:.7,fill:i,stroke:a,fillWeight:3,seed:o}),_=tu(e,{roughness:.7,fill:"none",stroke:a,seed:o});const r=v.rectangle(C,y,d,f,B),s=(w=t.insert((()=>r),":first-child"),v.rectangle(b,y,S,f,_));T=t.insert((()=>s),":first-child"),w.select("path:nth-child(2)").attr("style",l.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=t.insert("rect",":first-child"),T=t.insert("rect",":first-child"),w.attr("class","swimlane-title").attr("style",n).attr("x",C).attr("y",y).attr("width",d).attr("height",f).attr("fill",i).attr("stroke",a),T.attr("class","swimlane-body").attr("style",n).attr("x",b).attr("y",y).attr("width",S).attr("height",f).attr("fill","none").attr("stroke",a);B=e.y,u.attr("transform",`translate(${C+d/2}, ${B}) rotate(-90) translate(${-p.width/2}, ${-p.height/2})`)}else{if(v=Math.max(0,x-y),b=y+(_=Math.min(k,v)),S=Math.max(0,m-b),C=e.x-g/2,"handDrawn"===e.look){d=Qy.svg(t),B=tu(e,{roughness:.7,fill:i,stroke:a,fillWeight:3,seed:o}),x=tu(e,{roughness:.7,fill:"none",stroke:a,seed:o});const r=d.rectangle(C,y,g,_,B),s=(w=t.insert((()=>r),":first-child"),d.rectangle(C,b,g,S,x));T=t.insert((()=>s),":first-child"),w.select("path:nth-child(2)").attr("style",l.join(";")),w.select("path").attr("style",c.join(";").replace("fill","stroke"))}else w=t.insert("rect",":first-child"),T=t.insert("rect",":first-child"),w.attr("class","swimlane-title").attr("style",n).attr("x",C).attr("y",y).attr("width",g).attr("height",_).attr("fill",i).attr("stroke",a),T.attr("class","swimlane-body").attr("style",n).attr("x",C).attr("y",b).attr("width",g).attr("height",S).attr("fill","none").attr("stroke",a);k=e.x-p.width/2,v=y+(_-p.height)/2,u.attr("transform",`translate(${k}, ${v})`)}return h.trace("Swimlane data ",e,JSON.stringify(e)),s&&(m=u.select("span"))&&m.attr("style",s),e.offsetX=0,e.width=g,e.height=f,e.offsetY=p.height-r/2,e.intersect=function(t){return nm(e,t)},{cluster:t,labelBBox:p}}),"swimlane"),um=i((async(t,e)=>{h.info("Creating subgraph rect for ",e.id,e);var r=yi(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:i,clusterBorder:a}=i,{labelStyles:s,nodeStyles:n,borderStyles:l,backgroundStyles:c}=Jd(e),d=(t=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),dr(r)),u=t.insert("g").attr("class","cluster-label ");let p,g=(p="markdown"===e.labelType?await Yf(u,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}):await hm(u,e.label,e.labelStyle||"",!1,!0)).getBBox();dr(r)&&(d=p.children[0],f=Ho(p),g=d.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));d=e.width<=g.width+e.padding?g.width+e.padding:e.width;var f=(e.width<=g.width+e.padding?e.diff=(d-e.width)/2-e.padding:e.diff=-e.padding,e.height),y=e.x-d/2,m=e.y-f/2;let C;if(h.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){var x=Qy.svg(t),i=tu(e,{roughness:.7,fill:i,stroke:a,fillWeight:3,seed:o});const r=x.path(cm(y,m,d,f,0),i);(C=t.insert((()=>(h.debug("Rough node insert CXC",r),r)),":first-child")).select("path:nth-child(2)").attr("style",l.join(";")),C.select("path").attr("style",c.join(";").replace("fill","stroke"))}else(C=t.insert("rect",":first-child")).attr("style",n).attr("rx",e.rx).attr("ry",e.ry).attr("x",y).attr("y",m).attr("width",d).attr("height",f);return a=Rp(r).subGraphTitleTopMargin,u.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+a})`),s&&(o=u.select("span"))&&o.attr("style",s),x=C.node().getBBox(),e.offsetX=0,e.width=x.width,e.height=x.height,e.offsetY=g.height-e.padding/2,e.intersect=function(t){return nm(e,t)},{cluster:t,labelBBox:g}}),"rect"),pm=i(((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.domId)).insert("rect",":first-child"),i=0*e.padding,o=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none"),o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return nm(e,t)},{cluster:t,labelBBox:{width:0,height:0}}}),"noteGroup"),gm=i((async(t,e)=>{var r=yi(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:i,compositeBackground:a,compositeTitleBackground:s,nodeBorder:n}=i,l=(t=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look)).insert("g",":first-child"),h=t.insert("g").attr("class","cluster-label");let c=t.append("rect");let d=(u=await hm(h,e.label,e.labelStyle,void 0,!0)).getBBox();dr(r)&&(f=u.children[0],u=Ho(u),d=f.getBoundingClientRect(),u.attr("width",d.width),u.attr("height",d.height));var u=(f=0*e.padding)/2,p=(e.width<=d.width+e.padding?d.width+e.padding:e.width)+f,g=(e.width<=d.width+e.padding?e.diff=(p-e.width)/2-e.padding:e.diff=-e.padding,e.height+f),f=e.height+f-d.height-6,y=e.x-p/2,m=e.y-g/2;e.width=p,u=e.y-e.height/2-u+d.height+2;let C;if("handDrawn"===e.look){var x=e.cssClasses.includes("statediagram-cluster-alt"),b=Qy.svg(t);const r=e.rx||e.ry?b.path(cm(y,m,p,g,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:n,seed:o}):b.rectangle(y,m,p,g,{seed:o}),l=(C=t.insert((()=>r),":first-child"),b.rectangle(y,u,p,f,{fill:x?i:a,fillStyle:x?"hachure":"solid",stroke:n,seed:o}));C=t.insert((()=>r),":first-child"),c=t.insert((()=>l))}else(C=l.insert("rect",":first-child")).attr("class","outer").attr("x",y).attr("y",m).attr("width",p).attr("height",g).attr("data-look",e.look),c.attr("class","inner").attr("x",y).attr("y",u).attr("width",p).attr("height",f);return h.attr("transform",`translate(${e.x-d.width/2}, ${1+m-(dr(r)?0:3)})`),s=C.node().getBBox(),e.height=s.height,e.offsetX=0,e.offsetY=d.height-e.padding/2,e.labelBBox=d,e.intersect=function(t){return nm(e,t)},{cluster:t,labelBBox:d}}),"roundedWithTitle"),fm=i((async(t,e)=>{h.info("Creating subgraph rect for ",e.id,e);var r=yi(),{themeVariables:i,handDrawnSeed:o}=r,{clusterBkg:i,clusterBorder:a}=i,{labelStyles:s,nodeStyles:n,borderStyles:l,backgroundStyles:c}=Jd(e),d=(t=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),dr(r)),u=t.insert("g").attr("class","cluster-label ");let p=(d=await Yf(u,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width})).getBBox();dr(r)&&(g=d.children[0],d=Ho(d),p=g.getBoundingClientRect(),d.attr("width",p.width),d.attr("height",p.height));var g=e.width<=p.width+e.padding?p.width+e.padding:e.width,f=(d=(e.width<=p.width+e.padding?e.diff=(g-e.width)/2-e.padding:e.diff=-e.padding,e.height),e.x-g/2),y=e.y-d/2;let m;if(h.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){var C=Qy.svg(t),i=tu(e,{roughness:.7,fill:i,stroke:a,fillWeight:4,seed:o});const r=C.path(cm(f,y,g,d,e.rx),i);(m=t.insert((()=>(h.debug("Rough node insert CXC",r),r)),":first-child")).select("path:nth-child(2)").attr("style",l.join(";")),m.select("path").attr("style",c.join(";").replace("fill","stroke"))}else(m=t.insert("rect",":first-child")).attr("style",n).attr("rx",e.rx).attr("ry",e.ry).attr("x",f).attr("y",y).attr("width",g).attr("height",d);return a=Rp(r).subGraphTitleTopMargin,u.attr("transform",`translate(${e.x-p.width/2}, ${e.y-e.height/2+a})`),s&&(o=u.select("span"))&&o.attr("style",s),C=m.node().getBBox(),e.offsetX=0,e.width=C.width,e.height=C.height,e.offsetY=p.height-e.padding/2,e.intersect=function(t){return nm(e,t)},{cluster:t,labelBBox:p}}),"kanbanSection"),ym=i(((t,e)=>{var{themeVariables:r,handDrawnSeed:i}=yi(),r=r.nodeBorder,o=(t=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look)).insert("g",":first-child"),a=0*e.padding,s=e.width+a,n=(a=(e.diff=-e.padding,e.height+a),e.x-s/2),l=e.y-a/2;let h;if(e.width=s,"handDrawn"===e.look){const e=Qy.svg(t).rectangle(n,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:i});h=t.insert((()=>e),":first-child")}else{h=o.insert("rect",":first-child");let t="outer";e.look,t="divider",h.attr("class",t).attr("x",n).attr("y",l).attr("width",s).attr("height",a).attr("data-look",e.look)}return r=h.node().getBBox(),e.height=r.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return nm(e,t)},{cluster:t,labelBBox:{}}}),"divider"),mm={rect:um,squareRect:um,roundedWithTitle:gm,noteGroup:pm,divider:ym,kanbanSection:fm,swimlane:dm},Cm=new Map,xm=i((async(t,e)=>{var r=e.shape||"rect";r=await mm[r](t,e);return Cm.set(e.id,r),r}),"insertCluster"),bm=i((()=>{Cm=new Map}),"clear");function km(t,e){return t.intersect(e)}i(km,"intersectNode");var wm=km;function Tm(t,e,r,i){var o=t.x,a=(t=t.y,o-i.x),s=t-i.y,n=Math.sqrt(e*e*s*s+r*r*a*a);a=Math.abs(e*r*a/n),i.x<o&&(a=-a),e=Math.abs(e*r*s/n);return{x:o+a,y:t+(e=i.y<t?-e:e)}}i(Tm,"intersectEllipse");var Sm=Tm;function vm(t,e,r){return Sm(t,e,e,r)}i(vm,"intersectCircle");var Bm=vm;function _m(t,e,r,i){var 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;if(!(0!=n&&0!=l&&Fm(n,l)||(n=i.y-r.y,l=r.x-i.x,r=i.x*r.y-r.x*i.y,i=n*t.x+l*t.y+r,t=n*e.x+l*e.y+r,Math.abs(i)<1e-6&&Math.abs(t)<1e-6&&Fm(i,t)||0==(e=o*l-n*a))))return i=Math.abs(e/2),{x:(t=a*r-l*s)<0?(t-i)/e:(t+i)/e,y:(t=n*s-o*r)<0?(t-i)/e:(t+i)/e}}function Fm(t,e){return 0<t*e}i(_m,"intersectLine"),i(Fm,"sameSign");var Lm=_m;function Mm(t,e,r){var i=t.x,o=t.y,a=[];let 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));var l=i-t.width/2-s,h=o-t.height/2-n;for(let i=0;i<e.length;i++){var c=e[i],d=e[i<e.length-1?i+1:0];(c=Lm(t,r,{x:l+c.x,y:h+c.y},{x:l+d.x,y:h+d.y}))&&a.push(c)}return a.length?(1<a.length&&a.sort((function(t,e){var i=t.x-r.x;t=t.y-r.y,i=Math.sqrt(i*i+t*t),t=e.x-r.x,e=e.y-r.y;return i<(t=Math.sqrt(t*t+e*e))?-1:i===t?0:1})),a[0]):t}i(Mm,"intersectPolygon");var Am={node:wm,circle:Bm,ellipse:Sm,polygon:Mm,rect:nm};function Em(t,e){var r=Jd(e).labelStyles;let i=r=(e.labelStyle=r,em(e));r||(i="anchor"),r=t.insert("g").attr("class",i).attr("id",e.domId||e.id);t=e.cssStyles;var o=Qy.svg(r),a=tu(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(a.roughness=0);const s=o.circle(0,0,2,a);return(o=r.insert((()=>s),":first-child")).attr("class","anchor").attr("style",Pp(t)),tm(e,o),e.intersect=function(t){return h.info("Circle intersect",e,1,t),Am.circle(e,1,t)},r}function Om(t,e,r,i,o,a,s){var n=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t);if(1<(c=Math.sqrt(((r-t)/2/o)**2+((i-e)/2/a)**2)))throw new Error("The given radii are too small to create an arc between the points.");var c,d=n+(c=Math.sqrt(1-c**2))*a*Math.sin(h)*(s?-1:1),u=l-c*o*Math.cos(h)*(s?-1:1),p=Math.atan2((e-u)/a,(t-d)/o);let g=Math.atan2((i-u)/a,(r-d)/o)-p;s&&g<0&&(g+=2*Math.PI),!s&&0<g&&(g-=2*Math.PI);var f=[];for(let t=0;t<20;t++){var y=p+t/19*g,m=d+o*Math.cos(y);y=u+a*Math.sin(y);f.push({x:m,y:y})}return f}function $m(t,e,r){var[e,r]=[e,r].sort(((t,e)=>e-t));return r*(1-Math.sqrt(1-(t/e/2)**2))}async function Im(t,e){var{labelStyles:r,nodeStyles:o}=Jd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r);const s="neo"===e.look?12:r;r=i((t=>t+s),"calcTotalHeight");var n=i((t=>{var e=t/2;return[e/(2.5+t/50),e]}),"calcEllipseRadius"),{shapeSvg:t,bbox:l}=await Ky(t,e,em(e)),r=r(e?.height||l.height),[n,h]=n(r),c=$m(r,n,h),l=(e?.width||l.width)+2*a+c-c;a=r,c=e.cssStyles;const d=[{x:l/2,y:-a/2},{x:-l/2,y:-a/2},...Om(-l/2,-a/2,-l/2,a/2,n,h,!1),{x:l/2,y:a/2},...Om(l/2,a/2,l/2,-a/2,n,h,!0)];r=Qy.svg(t),l=tu(e,{}),"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),a=rm(d);const u=r.path(a,l);return(h=t.insert((()=>u),":first-child")).attr("class","basic label-container outer-path"),c&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",c),o&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",o),h.attr("transform",`translate(${n/2}, 0)`),tm(e,h),e.intersect=function(t){return Am.polygon(e,d,t)},t}function Dm(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+")")}i(Em,"anchor"),i(Om,"generateArcPoints"),i($m,"calculateArcSagitta"),i(Im,"bowTieRect"),i(Dm,"insertPolygonShape");async function qm(t,e){var r,i,{labelStyles:i,nodeStyles:o}=Jd(e),a=(i=(e.labelStyle=i,e.padding??0),"neo"===e.look?28:i),{shapeSvg:t,bbox:r}=(i="neo"===e.look?24:i,await Ky(t,e,em(e)));a=(e?.width??r.width)+("neo"===e.look?2*a:a+12);const s=[{x:12,y:i=-(r=(e?.height??r.height)+("neo"===e.look?2*i:i))},{x:a,y:i},{x:a,y:0},{x:0,y:0},{x:0,y:i+12},{x:12,y:i}];let n;if(i=e.cssStyles,"handDrawn"===e.look){var l=Qy.svg(t),h=tu(e,{}),c=rm(s);const o=l.path(c,h);n=t.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${r/2})`),i&&n.attr("style",i)}else n=Dm(t,a,r,s);return o&&n.attr("style",o),tm(e,n),e.intersect=function(t){return Am.polygon(e,s,t)},t}function Pm(t,e){var r=Jd(e).nodeStyles,i=(t=(e.label="",t.insert("g").attr("class",em(e)).attr("id",e.domId??e.id)),e.cssStyles);const o=[{x:0,y:(a=Math.max(28,e.width??0))/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}];var a=Qy.svg(t),s=tu(e,{}),n=("handDrawn"!==e.look&&(s.roughness=0,s.fillStyle="solid"),rm(o));const l=a.path(n,s);return a=t.insert((()=>l),":first-child"),i&&"handDrawn"!==e.look&&a.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&a.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return Am.polygon(e,o,t)},t}async function zm(t,e,r){var{labelStyles:i,nodeStyles:o}=Jd(e),{shapeSvg:i,bbox:t,halfPadding:a}=(e.labelStyle=i,await Ky(t,e,em(e)));r=r?.padding??a;const s="neo"===e.look?t.width/2+32:t.width/2+r;let n;if(a=e.cssStyles,"handDrawn"===e.look){t=Qy.svg(i),r=tu(e,{});const o=t.circle(0,0,2*s,r);(n=i.insert((()=>o),":first-child")).attr("class","basic label-container").attr("style",Pp(a))}else n=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",s).attr("cx",0).attr("cy",0);return tm(e,n),e.calcIntersect=function(t,e){var r=t.width/2;return Am.circle(t,r,e)},e.intersect=function(t){return h.info("Circle intersect",e,s,t),Am.circle(e,s,t)},i}function Rm(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t=2*t)/2*e},${t/2*r} L ${t/2*e},${-t/2*r}\n M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function Nm(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),r=(e.labelStyle=r,e.label="",t.insert("g").attr("class",em(e)).attr("id",e.domId??e.id));const o=Math.max(30,e?.width??0);t=e.cssStyles;var a=Qy.svg(r),s=tu(e,{});"handDrawn"!==e.look&&(s.roughness=0,s.fillStyle="solid");const n=a.circle(0,0,2*o,s);var l=Rm(o);const c=a.path(l,s);return(a=r.insert((()=>n),":first-child")).insert((()=>c)),a.attr("class","outer-path"),t&&"handDrawn"!==e.look&&a.selectAll("path").attr("style",t),i&&"handDrawn"!==e.look&&a.selectAll("path").attr("style",i),tm(e,a),e.intersect=function(t){return h.info("crossedCircle intersect",e,{radius:o,point:t}),Am.circle(e,o,t)},r}function Wm(t,e,r,i=100,o=0,a=180){var s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){var h=n+o*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:-c,y:-h})}return s}async function jm(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,label:o}=(e.labelStyle=r,await Ky(t,e,em(e))),a="neo"===e.look?18:e.padding??0,s="neo"===e.look?12:e.padding??0,n=(a=t.width+a,s=t.height+s,Math.max(5,.1*s)),l=e.cssStyles,h=[...Wm(a/2,-s/2,n,30,-90,0),{x:-a/2-n,y:n},...Wm(a/2+2*n,-n,n,20,-180,-270),...Wm(a/2+2*n,n,n,20,-90,-180),{x:-a/2-n,y:-s/2},...Wm(a/2,s/2,n,20,0,90)];const c=[{x:a/2,y:-s/2-n},{x:-a/2,y:-s/2-n},...Wm(a/2,-s/2,n,20,-90,0),{x:-a/2-n,y:-n},...Wm(a/2+.1*a,-n,n,20,-180,-270),...Wm(a/2+.1*a,n,n,20,-90,-180),{x:-a/2-n,y:s/2},...Wm(a/2,s/2,n,20,0,90),{x:-a/2,y:s/2+n},{x:a/2,y:s/2+n}];var d=Qy.svg(r),u=tu(e,{fill:"none"});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),h=rm(h).replace("Z","");const p=d.path(h,u);h=rm(c);const g=d.path(h,{...u});return(d=r.insert("g",":first-child")).insert((()=>g),":first-child").attr("stroke-opacity",0),d.insert((()=>p),":first-child"),d.attr("class","text"),l&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",i),d.attr("transform",`translate(${n}, 0)`),o.attr("transform",`translate(${-a/2+n-(t.x-(t.left??0))},${-s/2+(e.padding??0)/2-(t.y-(t.top??0))})`),tm(e,d),e.intersect=function(t){return Am.polygon(e,c,t)},r}function Hm(t,e,r,i=100,o=0,a=180){var s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){var h=n+o*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:c,y:h})}return s}async function Um(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,label:o}=(e.labelStyle=r,await Ky(t,e,em(e))),a="neo"===e.look?18:e.padding??0,s="neo"===e.look?12:e.padding??0,n=(a=t.width+("neo"===e.look?2*a:a),s=t.height+("neo"===e.look?2*s:s),Math.max(5,.1*s)),l=e.cssStyles,h=[...Hm(a/2,-s/2,n,20,-90,0),{x:a/2+n,y:-n},...Hm(a/2+2*n,-n,n,20,-180,-270),...Hm(a/2+2*n,n,n,20,-90,-180),{x:a/2+n,y:s/2},...Hm(a/2,s/2,n,20,0,90)];const c=[{x:-a/2,y:-s/2-n},{x:a/2,y:-s/2-n},...Hm(a/2,-s/2,n,20,-90,0),{x:a/2+n,y:-n},...Hm(a/2+2*n,-n,n,20,-180,-270),...Hm(a/2+2*n,n,n,20,-90,-180),{x:a/2+n,y:s/2},...Hm(a/2,s/2,n,20,0,90),{x:a/2,y:s/2+n},{x:-a/2,y:s/2+n}];var d=Qy.svg(r),u=tu(e,{fill:"none"});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),h=rm(h).replace("Z","");const p=d.path(h,u);h=rm(c);const g=d.path(h,{...u});return(d=r.insert("g",":first-child")).insert((()=>g),":first-child").attr("stroke-opacity",0),d.insert((()=>p),":first-child"),d.attr("class","text"),l&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",i),d.attr("transform",`translate(${-n}, 0)`),o.attr("transform",`translate(${-a/2+(e.padding??0)/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)/2-(t.y-(t.top??0))})`),tm(e,d),e.intersect=function(t){return Am.polygon(e,c,t)},r}function Ym(t,e,r,i=100,o=0,a=180){var s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let o=0;o<i;o++){var h=n+o*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:-c,y:-h})}return s}async function Gm(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,label:o}=(e.labelStyle=r,await Ky(t,e,em(e))),a="neo"===e.look?18:e.padding??0,s="neo"===e.look?12:e.padding??0,n=(a=t.width+("neo"===e.look?2*a:a),s=t.height+("neo"===e.look?2*s:s),Math.max(5,.1*s)),l=e.cssStyles,h=[...Ym(a/2,-s/2,n,30,-90,0),{x:-a/2-n,y:n},...Ym(a/2+2*n,-n,n,20,-180,-270),...Ym(a/2+2*n,n,n,20,-90,-180),{x:-a/2-n,y:-s/2},...Ym(a/2,s/2,n,20,0,90)],c=[...Ym(-a/2+n+n/2,-s/2,n,20,-90,-180),{x:a/2-n/2,y:n},...Ym(-a/2-n/2,-n,n,20,0,90),...Ym(-a/2-n/2,n,n,20,-90,0),{x:a/2-n/2,y:-n},...Ym(-a/2+n+n/2,s/2,n,30,-180,-270)];const d=[{x:a/2,y:-s/2-n},{x:-a/2,y:-s/2-n},...Ym(a/2,-s/2,n,20,-90,0),{x:-a/2-n,y:-n},...Ym(a/2+2*n,-n,n,20,-180,-270),...Ym(a/2+2*n,n,n,20,-90,-180),{x:-a/2-n,y:s/2},...Ym(a/2,s/2,n,20,0,90),{x:-a/2,y:s/2+n},{x:a/2-n-n/2,y:s/2+n},...Ym(-a/2+n+n/2,-s/2,n,20,-90,-180),{x:a/2-n/2,y:n},...Ym(-a/2-n/2,-n,n,20,0,90),...Ym(-a/2-n/2,n,n,20,-90,0),{x:a/2-n/2,y:-n},...Ym(-a/2+n+n/2,s/2,n,30,-180,-270)];var u=Qy.svg(r),p=tu(e,{fill:"none"});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),h=rm(h).replace("Z","");const g=u.path(h,p);h=rm(c).replace("Z","");const f=u.path(h,p);c=rm(d);const y=u.path(c,{...p});return(h=r.insert("g",":first-child")).insert((()=>y),":first-child").attr("stroke-opacity",0),h.insert((()=>g),":first-child"),h.insert((()=>f),":first-child"),h.attr("class","text"),l&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",i),h.attr("transform",`translate(${n-n/4}, 0)`),o.attr("transform",`translate(${-a/2+(e.padding??0)/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)/2-(t.y-(t.top??0))})`),tm(e,h),e.intersect=function(t){return Am.polygon(e,d,t)},r}async function Xm(t,e){var r,i,{labelStyles:o,nodeStyles:a}=Jd(e),s=(o=(e.labelStyle=o,e.padding??0),"neo"===e.look?16:o),{shapeSvg:t,bbox:r}=(o="neo"===e.look?12:o,await Ky(t,e,em(e))),o=(s=Math.max(20,1.25*(r.width+2*s),e?.width??0),(r=Math.max(5,r.height+2*o,e?.height??0))/2),n=e.cssStyles,l=Qy.svg(t),h=tu(e,{}),c=r/4;const d=[{x:i=(i=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),s))-o,y:0},{x:c,y:0},{x:0,y:r/2},{x:c,y:r},{x:i,y:r},...om(-i,-r/2,o,50,270,90)];c=rm(d);const u=l.path(c,h);return(i=t.insert((()=>u),":first-child")).attr("class","basic label-container outer-path"),n&&"handDrawn"!==e.look&&i.selectChildren("path").attr("style",n),a&&"handDrawn"!==e.look&&i.selectChildren("path").attr("style",a),i.attr("transform",`translate(${-s/2}, ${-r/2})`),tm(e,i),e.intersect=function(t){return Am.polygon(e,d,t)},t}i(qm,"card"),i(Pm,"choice"),i(zm,"circle"),i(Rm,"createLine"),i(Nm,"crossedCircle"),i(Wm,"generateCirclePoints"),i(jm,"curlyBraceLeft"),i(Hm,"generateCirclePoints"),i(Um,"curlyBraceRight"),i(Ym,"generateCirclePoints"),i(Gm,"curlyBraces"),i(Xm,"curvedTrapezoid");var Vm=i(((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"),Zm=i(((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"),Qm=i(((t,e,r,i,o,a)=>[`M${t-r/2},`+-i/2,`a${o},${a} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function Km(t,e){var r,{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?24:r),{shapeSvg:a,bbox:t,label:s}=(r="neo"===e.look?24:r,(e.width||e.height)&&(a=e.width??0,e.width=(e.width??0)-r,e.width<8&&(e.width=8),e.height=(e.height??0)-o-a/2/(2.5+a/50)*3,e.height<8)&&(e.height=8),await Ky(t,e,em(e)));const n=(r=(e.width||t.width)+r)/2,l=n/(2.5+r/50);let h;o=(e.height||t.height)+o+l;var c=e.cssStyles;if("handDrawn"===e.look){var d=Qy.svg(a),u=Zm(0,0,r,o,n,l),p=Qm(0,l,r,o,n,l),g=tu(e,{});const t=d.path(u,g),i=d.path(p,tu(e,{fill:"none"}));h=a.insert((()=>i),":first-child"),(h=a.insert((()=>t),":first-child")).attr("class","basic label-container"),c&&h.attr("style",c)}else u=Vm(0,0,r,o,n,l),h=a.insert("path",":first-child").attr("d",u).attr("class","basic label-container outer-path").attr("style",Pp(c)).attr("style",i);return h.attr("label-offset-y",l),h.attr("transform",`translate(${-r/2}, ${-(o/2+l)})`),tm(e,h),s.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))}, ${-t.height/2+(e.padding??0)/1.5-(t.y-(t.top??0))})`),e.intersect=function(t){var r=Am.rect(e,t),i=r.x-(e.x??0);if(0!=n&&(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-l)){let o=l*l*(1-i*i/(n*n));0<o&&(o=Math.sqrt(o)),o=l-o,0<t.y-(e.y??0)&&(o=-o),r.y+=o}return r},a}async function Jm(t,e,r){var{labelStyles:i,nodeStyles:o}=Jd(e),{shapeSvg:i,bbox:t}=(e.labelStyle=i,await Ky(t,e,em(e))),a=Math.max(t.width+2*r.labelPaddingX,e?.width||0),s=-a/2,n=-(t=Math.max(t.height+2*r.labelPaddingY,e?.height||0))/2;let l,{rx:h,ry:c}=e;var d=e.cssStyles;if(r?.rx&&r.ry&&(h=r.rx,c=r.ry),"handDrawn"===e.look){r=Qy.svg(i);var u=tu(e,{});const o=h||c?r.path(cm(s,n,a,t,h||0),u):r.rectangle(s,n,a,t,u);(l=i.insert((()=>o),":first-child")).attr("class","basic label-container").attr("style",Pp(d))}else(l=i.insert("rect",":first-child")).attr("class","basic label-container").attr("style",o).attr("rx",Pp(h)).attr("ry",Pp(c)).attr("x",s).attr("y",n).attr("width",a).attr("height",t);return tm(e,l),e.calcIntersect=function(t,e){return Am.rect(t,e)},e.intersect=function(t){return Am.rect(e,t)},i}async function tC(t,e){var{cssClasses:r,labelPaddingX:i,labelPaddingY:o,padding:a,width:s,height:n}=e;t=await Jm(t,e,{rx:0,ry:0,classes:r??"",labelPaddingX:i??2*(a??0),labelPaddingY:o??a??0});if("handDrawn"===e.look){const o=Qy.svg(t),a=tu(e,{});if(i=(r=t.select(".basic.label-container > path:nth-child(2)")).node()){let e=null;i instanceof SVGGraphicsElement&&(e=i.getBBox(),t.insert((()=>o.line(e.x,e.y,e.x+e.width,e.y,a)),".basic.label-container g.label"),t.insert((()=>o.line(e.x,e.y+e.height,e.x+e.width,e.y+e.height,a)),".basic.label-container g.label"),r.remove())}}else o=t.select(".basic.label-container"),a=(Number(o.attr("width"))||s)??0,e=(Number(o.attr("height"))||n)??0,0<a&&0<e&&o.attr("stroke-dasharray",a+" "+e);return t}async function eC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,"neo"===e.look?16:e.padding??0),"neo"===e.look?16:e.padding??0),{shapeSvg:t,bbox:a,label:s}=await Ky(t,e,em(e)),n=(r=a.width+r,.2*(o=a.height+o)),r=-r/2,l=(o=-o/2-n/2,e.cssStyles),h=Qy.svg(t),c=tu(e,{}),d=("handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid"),[{x:r,y:o+n},{x:-r,y:o+n},{x:-r,y:-o},{x:r,y:-o},{x:r,y:o},{x:-r,y:o},{x:-r,y:o+n}]);const u=h.polygon(d.map((t=>[t.x,t.y])),c);return(h=t.insert((()=>u),":first-child")).attr("class","basic label-container outer-path"),l&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",i),s.attr("transform",`translate(${r+(e.padding??0)/2-(a.x-(a.left??0))}, ${o+n+(e.padding??0)/2-(a.y-(a.top??0))})`),tm(e,h),e.intersect=function(t){return Am.rect(e,t)},t}async function rC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o="neo"===e.look?12:5,{shapeSvg:t,bbox:a}=(r=(e.labelStyle=r,e.padding??0),r="neo"===e.look?16:r,await Ky(t,e,em(e)));const s=(e?.width?e?.width/2:a.width/2)+(r??0);let n;a=s-o;var l,c,r=e.cssStyles;return"handDrawn"===e.look?(o=Qy.svg(t),l=tu(e,{roughness:.2,strokeWidth:2.5}),c=tu(e,{roughness:.2,strokeWidth:1.5}),l=o.circle(0,0,2*s,l),o=o.circle(0,0,2*a,c),(n=t.insert("g",":first-child")).attr("class",Pp(e.cssClasses)).attr("style",Pp(r)),n.node()?.appendChild(l),n.node()?.appendChild(o)):(c=(n=t.insert("g",":first-child")).insert("circle",":first-child"),r=n.insert("circle"),n.attr("class","basic label-container").attr("style",i),c.attr("class","outer-circle").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0),r.attr("class","inner-circle").attr("style",i).attr("r",a).attr("cx",0).attr("cy",0)),tm(e,n),e.intersect=function(t){return h.info("DoubleCircle intersect",e,s,t),Am.circle(e,s,t)},t}function iC(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:o}=Jd(e),i=(e.label="",e.labelStyle=i,t.insert("g").attr("class",em(e)).attr("id",e.domId??e.id)),a=(t=e.cssStyles,Qy.svg(i)),s=(r=r.nodeBorder,tu(e,{fillStyle:"solid"}));"handDrawn"!==e.look&&(s.roughness=0);const n=a.circle(0,0,14,s);return(a=i.insert((()=>n),":first-child")).selectAll("path").attr("style",`fill: ${r} !important;`),t&&0<t.length&&"handDrawn"!==e.look&&a.selectAll("path").attr("style",t),o&&"handDrawn"!==e.look&&a.selectAll("path").attr("style",o),tm(e,a),e.intersect=function(t){return h.info("filledCircle intersect",e,{radius:7,point:t}),Am.circle(e,7,t)},i}i(Km,"cylinder"),i(Jm,"drawRect"),i(tC,"datastore"),i(eC,"dividedRectangle"),i(rC,"doublecircle"),i(iC,"filledCircle");async function oC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:t,bbox:o,label:a}=(r=(e.labelStyle=r,e.padding??0),r="neo"===e.look?2*r:r,(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-r-r/2,e.width<10)&&(e.width=10),await Ky(t,e,em(e))),r=(e?.width||o.width)+(r??0),s=e?.height||r+o.height;const n=[{x:0,y:-s},{x:s,y:-s},{x:s/2,y:0}];var l=e.cssStyles,c=Qy.svg(t),d=tu(e,{}),u=("handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid"),rm(n));const p=c.path(u,d);return c=t.insert((()=>p),":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path"),l&&"handDrawn"!==e.look&&c.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&c.selectChildren("path").attr("style",i),e.width=r,e.height=s,tm(e,c),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-s/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.info("Triangle intersect",e,n,t),Am.polygon(e,n,t)},t}function aC(t,e,{dir:r,config:{state:i,themeVariables:o}}){var a=Jd(e).nodeStyles,s=(t=(e.label="",t.insert("g").attr("class",em(e)).attr("id",e.domId??e.id)),e.cssStyles);let n=Math.max(70,e?.width??0),l=Math.max(10,e?.height??0);"LR"===r&&(n=Math.max(10,e?.width??0),l=Math.max(70,e?.height??0));r=-1*n/2;var h=-1*l/2,c=Qy.svg(t);o=tu(e,{stroke:o.lineColor,fill:o.lineColor});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");const d=c.rectangle(r,h,n,l,o);return c=t.insert((()=>d),":first-child"),s&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",a),tm(e,c),r=i?.padding??0,e.width&&e.height&&(e.width+=r/2||0,e.height+=r/2||0),e.intersect=function(t){return Am.rect(e,t)},t}async function sC(t,e){var r,{labelStyles:i,nodeStyles:o}=Jd(e),a=(i=(e.labelStyle=i,"neo"===e.look?16:e.padding??0),"neo"===e.look?12:e.padding??0),{shapeSvg:t,bbox:r}=((e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*i,e.width<15)&&(e.width=15),await Ky(t,e,em(e))),i=(e?.width||Math.max(15,r.width))+2*i;const s=(r=(e?.height||Math.max(10,r.height))+2*a)/2;a=e.cssStyles;var n=Qy.svg(t),l=tu(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const c=[{x:-i/2,y:-r/2},{x:i/2-s,y:-r/2},...om(-i/2+s,0,s,50,90,270),{x:i/2-s,y:r/2},{x:-i/2,y:r/2}];i=rm(c);const d=n.path(i,l);return(r=t.insert((()=>d),":first-child")).attr("class","basic label-container outer-path"),a&&"handDrawn"!==e.look&&r.selectChildren("path").attr("style",a),o&&"handDrawn"!==e.look&&r.selectChildren("path").attr("style",o),tm(e,r),e.intersect=function(t){return h.info("Pill intersect",e,{radius:s,point:t}),Am.polygon(e,c,t)},t}i(oC,"flippedTriangle"),i(aC,"forkJoin"),i(sC,"halfRoundedRectangle");var nC=i(((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 lC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o="neo"===e.look?3.5:4,a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?70:r),r="neo"===e.look?32:r,{shapeSvg:s,bbox:t}=((e.width||e.height)&&(s=e.height??0,e.width=(e?.width??0)-s/o*2-r,e.height=(e.height??0)-a),await Ky(t,e,em(e)));const n=[{x:o=(a=(e?.height||t.height)+a)/o,y:0},{x:(t=(e?.width||t.width)+2*o+r)-o,y:0},{x:t,y:-a/2},{x:t-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}];let l;if(r=e.cssStyles,"handDrawn"===e.look){var h=Qy.svg(s),c=tu(e,{});o=nC(0,0,t,a,o);const i=h.path(o,c);l=s.insert((()=>i),":first-child").attr("transform",`translate(${-t/2}, ${a/2})`),r&&l.attr("style",r)}else l=Dm(s,t,a,n);return i&&l.attr("style",i),e.width=t,e.height=a,tm(e,l),e.intersect=function(t){return Am.polygon(e,n,t)},s}async function hC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),r=(e.label="",e.labelStyle=r,await Ky(t,e,em(e))).shapeSvg,o=(t=Math.max(30,e?.width??0),Math.max(30,e?.height??0)),a=e.cssStyles,s=Qy.svg(r),n=tu(e,{});"handDrawn"!==e.look&&(n.roughness=0,n.fillStyle="solid");const l=[{x:0,y:0},{x:t,y:0},{x:0,y:o},{x:t,y:o}];var c=rm(l);const d=s.path(c,n);return(s=r.insert((()=>d),":first-child")).attr("class","basic label-container outer-path"),a&&"handDrawn"!==e.look&&s.selectChildren("path").attr("style",a),i&&"handDrawn"!==e.look&&s.selectChildren("path").attr("style",i),s.attr("transform",`translate(${-t/2}, ${-o/2})`),tm(e,s),e.intersect=function(t){return h.info("Pill intersect",e,{points:l}),Am.polygon(e,l,t)},r}async function cC(t,e,{config:{themeVariables:r,flowchart:i}}){var o=Jd(e).labelStyles,a=(o=(e.labelStyle=o,e.assetHeight??48),e.assetWidth??48);o=Math.max(o,a),a=i?.wrappingWidth;e.width=Math.max(o,a??0);const{shapeSvg:s,bbox:n,label:l}=await Ky(t,e,"icon-shape default"),c="t"===e.pos,d=o,u=o;i=r.nodeBorder,a=Zd(e).stylesMap,t=-u/2,r=-d/2;const p=e.label?8:0;var g=Qy.svg(s),f=tu(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=g.rectangle(t,r,u,d,f);t=Math.max(u,n.width),r=d+n.height+p;const m=g.rectangle(-t/2,-r/2,t,r,{...f,fill:"transparent",stroke:"none"});var C,x,b;g=s.insert((()=>y),":first-child"),t=s.insert((()=>m));return e.icon&&((f=s.append("g")).html(`<g>${await cg(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`),C=(o=f.node().getBBox()).width,x=o.height,b=o.x,o=o.y,f.attr("transform",`translate(${-C/2-b},${c?n.height/2+p/2-x/2-o:-n.height/2-p/2-x/2-o})`),f.attr("style",`color: ${a.get("stroke")??i};`)),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${c?-r/2:r/2-n.height})`),g.attr("transform",`translate(0,${c?n.height/2+p/2:-n.height/2-p/2})`),tm(e,t),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Am.rect(e,t);var r=e.x??0,i=e.y??0,o=e.height??0;let a=[];return a=c?[{x:r-n.width/2,y:i-o/2},{x:r+n.width/2,y:i-o/2},{x:r+n.width/2,y:i-o/2+n.height+p},{x:r+u/2,y:i-o/2+n.height+p},{x:r+u/2,y:i+o/2},{x:r-u/2,y:i+o/2},{x:r-u/2,y:i-o/2+n.height+p},{x:r-n.width/2,y:i-o/2+n.height+p}]:[{x:r-u/2,y:i-o/2},{x:r+u/2,y:i-o/2},{x:r+u/2,y:i-o/2+d},{x:r+n.width/2,y:i-o/2+d},{x:r+n.width/2/2,y:i+o/2},{x:r-n.width/2,y:i+o/2},{x:r-n.width/2,y:i-o/2+d},{x:r-u/2,y:i-o/2+d}],Am.polygon(e,a,t)},s}async function dC(t,e,{config:{themeVariables:r,flowchart:i}}){var o=Jd(e).labelStyles,a=(o=(e.labelStyle=o,e.assetHeight??48),e.assetWidth??48),{shapeSvg:i,bbox:a,label:t}=(o=Math.max(o,a),a=i?.wrappingWidth,e.width=Math.max(o,a??0),await Ky(t,e,"icon-shape default")),s=e.label?8:0,n="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=Zd(e).stylesMap,d=Qy.svg(i),u=tu(e,{}),p=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),g=(p=(u.stroke=p??l,i.append("g")),o=(l=(e.icon&&p.html(`<g>${await cg(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`),p.node().getBBox())).width,l.height),f=l.x,l=l.y,y=Math.max(o,g)*Math.SQRT2+40;const m=d.circle(0,0,y,u);var C=Math.max(y,a.width);y=y+a.height+s;const x=d.rectangle(-C/2,-y/2,C,y,{...u,fill:"transparent",stroke:"none"});return d=i.insert((()=>m),":first-child"),C=i.insert((()=>x)),p.attr("transform",`translate(${-o/2-f},${n?a.height/2+s/2-g/2-l:-a.height/2-s/2-g/2-l})`),p.attr("style",`color: ${c.get("stroke")??r};`),t.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))},${n?-y/2:y/2-a.height})`),d.attr("transform",`translate(0,${n?a.height/2+s/2:-a.height/2-s/2})`),tm(e,C),e.intersect=function(t){return h.info("iconSquare intersect",e,t),Am.rect(e,t)},i}async function uC(t,e,{config:{themeVariables:r,flowchart:i}}){var o=Jd(e).labelStyles,a=(o=(e.labelStyle=o,e.assetHeight??48),e.assetWidth??48);o=Math.max(o,a),a=i?.wrappingWidth;e.width=Math.max(o,a??0);const{shapeSvg:s,bbox:n,halfPadding:l,label:c}=await Ky(t,e,"icon-shape default"),d="t"===e.pos,u=o+2*l,p=o+2*l;var{nodeBorder:i,mainBkg:a}=r,g=(t=Zd(e).stylesMap,r=-p/2,-u/2);const f=e.label?8:0;var y=Qy.svg(s),m=tu(e,{}),C=("handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid"),t.get("fill"));m.stroke=C??a;const x=y.path(cm(r,g,p,u,5),m);C=Math.max(p,n.width),a=u+n.height+f;const b=y.rectangle(-C/2,-a/2,C,a,{...m,fill:"transparent",stroke:"none"});var k;r=s.insert((()=>x),":first-child").attr("class","icon-shape2"),g=s.insert((()=>b));return e.icon&&((y=s.append("g")).html(`<g>${await cg(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`),m=(C=y.node().getBBox()).width,o=C.height,k=C.x,C=C.y,y.attr("transform",`translate(${-m/2-k},${d?n.height/2+f/2-o/2-C:-n.height/2-f/2-o/2-C})`),y.attr("style",`color: ${t.get("stroke")??i};`)),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${d?-a/2:a/2-n.height})`),r.attr("transform",`translate(0,${d?n.height/2+f/2:-n.height/2-f/2})`),tm(e,g),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Am.rect(e,t);var r=e.x??0,i=e.y??0,o=e.height??0;let a=[];return a=d?[{x:r-n.width/2,y:i-o/2},{x:r+n.width/2,y:i-o/2},{x:r+n.width/2,y:i-o/2+n.height+f},{x:r+p/2,y:i-o/2+n.height+f},{x:r+p/2,y:i+o/2},{x:r-p/2,y:i+o/2},{x:r-p/2,y:i-o/2+n.height+f},{x:r-n.width/2,y:i-o/2+n.height+f}]:[{x:r-p/2,y:i-o/2},{x:r+p/2,y:i-o/2},{x:r+p/2,y:i-o/2+u},{x:r+n.width/2,y:i-o/2+u},{x:r+n.width/2/2,y:i+o/2},{x:r-n.width/2,y:i+o/2},{x:r-n.width/2,y:i-o/2+u},{x:r-p/2,y:i-o/2+u}],Am.polygon(e,a,t)},s}async function pC(t,e,{config:{themeVariables:r,flowchart:i}}){var o=Jd(e).labelStyles,a=(o=(e.labelStyle=o,e.assetHeight??48),e.assetWidth??48);o=Math.max(o,a),a=i?.wrappingWidth;e.width=Math.max(o,a??0);const{shapeSvg:s,bbox:n,halfPadding:l,label:c}=await Ky(t,e,"icon-shape default"),d="t"===e.pos,u=o+2*l,p=o+2*l;var{nodeBorder:i,mainBkg:a}=r,g=(t=Zd(e).stylesMap,r=-p/2,-u/2);const f=e.label?8:0;var y=Qy.svg(s),m=tu(e,{}),C=("handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid"),t.get("fill"));m.stroke=C??a;const x=y.path(cm(r,g,p,u,.1),m);C=Math.max(p,n.width),a=u+n.height+f;const b=y.rectangle(-C/2,-a/2,C,a,{...m,fill:"transparent",stroke:"none"});var k;r=s.insert((()=>x),":first-child"),g=s.insert((()=>b));return e.icon&&((y=s.append("g")).html(`<g>${await cg(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`),m=(C=y.node().getBBox()).width,o=C.height,k=C.x,C=C.y,y.attr("transform",`translate(${-m/2-k},${d?n.height/2+f/2-o/2-C:-n.height/2-f/2-o/2-C})`),y.attr("style",`color: ${t.get("stroke")??i};`)),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${d?-a/2:a/2-n.height})`),r.attr("transform",`translate(0,${d?n.height/2+f/2:-n.height/2-f/2})`),tm(e,g),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Am.rect(e,t);var r=e.x??0,i=e.y??0,o=e.height??0;let a=[];return a=d?[{x:r-n.width/2,y:i-o/2},{x:r+n.width/2,y:i-o/2},{x:r+n.width/2,y:i-o/2+n.height+f},{x:r+p/2,y:i-o/2+n.height+f},{x:r+p/2,y:i+o/2},{x:r-p/2,y:i+o/2},{x:r-p/2,y:i-o/2+n.height+f},{x:r-n.width/2,y:i-o/2+n.height+f}]:[{x:r-p/2,y:i-o/2},{x:r+p/2,y:i-o/2},{x:r+p/2,y:i-o/2+u},{x:r+n.width/2,y:i-o/2+u},{x:r+n.width/2/2,y:i+o/2},{x:r-n.width/2,y:i+o/2},{x:r-n.width/2,y:i-o/2+u},{x:r-p/2,y:i-o/2+u}],Am.polygon(e,a,t)},s}async function gC(t,e,{config:{flowchart:r}}){var i=((o=new Image).src=e?.img??"",await o.decode(),Number(o.naturalWidth.toString().replace("px",""))),o=Number(o.naturalHeight.toString().replace("px","")),a=(e.imageAspectRatio=i/o,Jd(e)).labelStyles;e.labelStyle=a,a=r?.wrappingWidth,e.defaultWidth=r?.wrappingWidth,r=Math.max(e.label?a??0:0,e?.assetWidth??i);const s="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:r,n="on"===e.constraint?s/e.imageAspectRatio:e?.assetHeight??o,{shapeSvg:l,bbox:c,label:d}=(e.width=Math.max(s,a??0),await Ky(t,e,"image-shape default")),u="t"===e.pos;i=-s/2,r=-n/2;const p=e.label?8:0;o=Qy.svg(l),a=tu(e,{}),"handDrawn"!==e.look&&(a.roughness=0,a.fillStyle="solid");const g=o.rectangle(i,r,s,n,a);t=Math.max(s,c.width),i=n+c.height+p;const f=o.rectangle(-t/2,-i/2,t,i,{...a,fill:"none",stroke:"none"});return r=l.insert((()=>g),":first-child"),o=l.insert((()=>f)),e.img&&((t=l.append("image")).attr("href",e.img),t.attr("width",s),t.attr("height",n),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-s/2},${u?i/2-n:-i/2})`)),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${u?-n/2-c.height/2-p/2:n/2-c.height/2+p/2})`),r.attr("transform",`translate(0,${u?c.height/2+p/2:-c.height/2-p/2})`),tm(e,o),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Am.rect(e,t);var r=e.x??0,i=e.y??0,o=e.height??0;let a=[];return 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+p},{x:r+s/2,y:i-o/2+c.height+p},{x:r+s/2,y:i+o/2},{x:r-s/2,y:i+o/2},{x:r-s/2,y:i-o/2+c.height+p},{x:r-c.width/2,y:i-o/2+c.height+p}]:[{x:r-s/2,y:i-o/2},{x:r+s/2,y:i-o/2},{x:r+s/2,y:i-o/2+n},{x:r+c.width/2,y:i-o/2+n},{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+n},{x:r-s/2,y:i-o/2+n}],Am.polygon(e,a,t)},l}async function fC(t,e){var r,i,{labelStyles:r,nodeStyles:o}=Jd(e),a=r=(e.labelStyle=r,e.padding??0),{shapeSvg:t,bbox:i}=(r="neo"===e.look?2*r:r,await Ky(t,e,em(e)));const s=[{x:0,y:0},{x:r=Math.max(i.width+2*(r??0),e?.width??0),y:0},{x:r+3*(i=Math.max(i.height+2*(a??0),e?.height??0))/6,y:-i},{x:-3*i/6,y:-i}];let n;if(a=e.cssStyles,"handDrawn"===e.look){var l=Qy.svg(t),h=tu(e,{}),c=rm(s);const o=l.path(c,h);n=t.insert((()=>o),":first-child").attr("transform",`translate(${-r/2}, ${i/2})`),a&&n.attr("style",a)}else n=Dm(t,r,i,s);return o&&n.attr("style",o),e.width=r,e.height=i,tm(e,n),e.intersect=function(t){return Am.polygon(e,s,t)},t}async function yC(t,e){var{shapeSvg:t,bbox:r,label:i}=await Ky(t,e,"label"),o=t.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),tm(e,o),e.intersect=function(t){return Am.rect(e,t)},t}async function mC(t,e){var r,{labelStyles:i,nodeStyles:o}=Jd(e),a=i=(e.labelStyle=i,e.padding??0),i="neo"===e.look?2*i:i,{shapeSvg:t,bbox:r}=await Ky(t,e,em(e));a=(e?.height??r.height)+a;const s=[{x:0,y:0},{x:(r=(e?.width??r.width)+i)+3*a/6,y:0},{x:r,y:-a},{x:-3*a/6,y:-a}];let n;if(i=e.cssStyles,"handDrawn"===e.look){var l=Qy.svg(t),h=tu(e,{}),c=rm(s);const o=l.path(c,h);n=t.insert((()=>o),":first-child").attr("transform",`translate(${-r/2}, ${a/2})`),i&&n.attr("style",i)}else n=Dm(t,r,a,s);return o&&n.attr("style",o),e.width=r,e.height=a,tm(e,n),e.intersect=function(t){return Am.polygon(e,s,t)},t}async function CC(t,e){var r,{labelStyles:i,nodeStyles:o}=Jd(e),a=i=(e.labelStyle=i,e.padding??0),i="neo"===e.look?2*i:i,{shapeSvg:t,bbox:r}=await Ky(t,e,em(e));const s=[{x:-3*(a=(e?.height??r.height)+a)/6,y:0},{x:r=(e?.width??r.width)+i,y:0},{x:r+3*a/6,y:-a},{x:0,y:-a}];let n;if(i=e.cssStyles,"handDrawn"===e.look){var l=Qy.svg(t),h=tu(e,{}),c=rm(s);const o=l.path(c,h);n=t.insert((()=>o),":first-child").attr("transform",`translate(${-r/2}, ${a/2})`),i&&n.attr("style",i)}else n=Dm(t,r,a,s);return o&&n.attr("style",o),e.width=r,e.height=a,tm(e,n),e.intersect=function(t){return Am.polygon(e,s,t)},t}function xC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),r=(e.label="",e.labelStyle=r,t.insert("g").attr("class",em(e)).attr("id",e.domId??e.id)),o=(t=e.cssStyles,Math.max(35,e?.width??0)),a=Math.max(35,e?.height??0);const s=[{x:o,y:0},{x:0,y:a+3.5},{x:o-14,y:a+3.5},{x:0,y:2*a},{x:o,y:a-3.5},{x:14,y:a-3.5}];var n=Qy.svg(r),l=tu(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),rm(s));const d=n.path(c,l);return(n=r.insert((()=>d),":first-child")).attr("class","outer-path"),t&&"handDrawn"!==e.look&&n.selectAll("path").attr("style",t),i&&"handDrawn"!==e.look&&n.selectAll("path").attr("style",i),n.attr("transform",`translate(-${o/2},${-a})`),tm(e,n),e.intersect=function(t){return h.info("lightningBolt intersect",e,t),Am.polygon(e,s,t)},r}i(lC,"hexagon"),i(hC,"hourglass"),i(cC,"icon"),i(dC,"iconCircle"),i(uC,"iconRounded"),i(pC,"iconSquare"),i(gC,"imageSquare"),i(fC,"inv_trapezoid"),i(yC,"labelRect"),i(mC,"lean_left"),i(CC,"lean_right"),i(xC,"lightningBolt");var bC=i(((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"),kC=i(((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"),wC=i(((t,e,r,i,o,a)=>[`M${t-r/2},`+-i/2,`a${o},${a} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD");async function TC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:a,bbox:t,label:s}=(r="neo"===e.look?24:r,(e.width||e.height)&&(a=e.width??0,e.width=(e.width??0)-o,e.width<10&&(e.width=10),e.height=(e.height??0)-r-a/2/(2.5+a/50)*3,e.height<10)&&(e.height=10),await Ky(t,e,em(e)));const n=(o=(e?.width||t.width)+2*o)/2,l=n/(2.5+o/50);var r,h=.1*(r=(e?.height||t.height)+l+2*r);let c;var d=e.cssStyles;if("handDrawn"===e.look){var u=Qy.svg(a),p=kC(0,0,o,r,n,l,h),g=wC(0,l,o,r,n,l),f=tu(e,{});const t=u.path(p,f),i=u.path(g,f);a.insert((()=>i),":first-child").attr("class","line"),(c=a.insert((()=>t),":first-child")).attr("class","basic label-container"),d&&c.attr("style",d)}else p=bC(0,0,o,r,n,l,h),c=a.insert("path",":first-child").attr("d",p).attr("class","basic label-container outer-path").attr("style",Pp(d)).attr("style",i);return c.attr("label-offset-y",l),c.attr("transform",`translate(${-o/2}, ${-(r/2+l)})`),tm(e,c),s.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))}, ${-t.height/2+l-(t.y-(t.top??0))})`),e.intersect=function(t){var r=Am.rect(e,t),i=r.x-(e.x??0);if(0!=n&&(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-l)){let o=l*l*(1-i*i/(n*n));0<o&&(o=Math.sqrt(o)),o=l-o,0<t.y-(e.y??0)&&(o=-o),r.y+=o}return r},a}async function SC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:a,bbox:t,label:s}=(r="neo"===e.look?12:r,(e.width||e.height)&&(a=e.width,e.width=10*(a??0)/11-2*o,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*r,e.height<10)&&(e.height=10),await Ky(t,e,em(e))),r=(o=(e?.width||t.width)+2*(o??0),(e?.height||t.height)+2*(r??0)),n="neo"===e.look?r/4:r/8,l=r+n,h=e.cssStyles,c=Qy.svg(a),d=tu(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=[{x:-o/2-o/2*.1,y:-l/2},{x:-o/2-o/2*.1,y:l/2},...im(-o/2-o/2*.1,l/2,o/2+o/2*.1,l/2,n,.8),{x:o/2+o/2*.1,y:-l/2},{x:-o/2-o/2*.1,y:-l/2},{x:-o/2,y:-l/2},{x:-o/2,y:l/2*1.1},{x:-o/2,y:-l/2}],p=c.polygon(u.map((t=>[t.x,t.y])),d);return(l=a.insert((()=>p),":first-child")).attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&l.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&l.selectAll("path").attr("style",i),l.attr("transform",`translate(0,${-n/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(t.x-(t.left??0))},${-r/2+(e.padding??0)-n/2-(t.y-(t.top??0))})`),tm(e,l),e.intersect=function(t){return Am.polygon(e,u,t)},a}async function vC(t,e){var r,{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),a=(r="neo"===e.look?12:r,"neo"===e.look?10:5),{shapeSvg:t,bbox:s,label:n}=((e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-2*a,10),e.height=Math.max((e?.height??0)-2*r-2*a,10)),await Ky(t,e,em(e))),l=-(o=(e?.width||s.width)+2*o+2*a-2*a)/2,h=-(r=(e?.height||s.height)+2*r+2*a-2*a)/2,c=e.cssStyles,d=Qy.svg(t),u=tu(e,{});const p=[{x:l-a,y:h+a},{x:l-a,y:h+r+a},{x:l+o-a,y:h+r+a},{x:l+o-a,y:h+r},{x:l+o,y:h+r},{x:l+o,y:h+r-a},{x:l+o+a,y:h+r-a},{x:l+o+a,y:h-a},{x:l+a,y:h-a},{x:l+a,y:h},{x:l,y:h},{x:l,y:h+a}];r=[{x:l,y:h+a},{x:l+o-a,y:h+a},{x:l+o-a,y:h+r},{x:l+o,y:h+r},{x:l+o,y:h},{x:l,y:h}],"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),o=rm(p);let g=d.path(o,u);l=rm(r);let f=d.path(l,u);return"handDrawn"!==e.look&&(g=am(g),f=am(f)),(h=t.insert("g",":first-child")).insert((()=>g)),h.insert((()=>f)),h.attr("class","basic label-container outer-path"),c&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",i),n.attr("transform",`translate(${-s.width/2-a-(s.x-(s.left??0))}, ${-s.height/2+a-(s.y-(s.top??0))})`),tm(e,h),e.intersect=function(t){return Am.polygon(e,p,t)},t}async function BC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,label:o}=(e.labelStyle=r,await Ky(t,e,em(e))),a=e.padding??0,s="neo"===e.look?16:a;a="neo"===e.look?12:a;let n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*s,e.height=(e?.height??0)-3*a);s=Math.max(t.width,e?.width??0)+2*s,a=Math.max(t.height,e?.height??0)+3*a;var l="neo"===e.look?a/4:a/8,h=-s/2,c=-(a=a+(n?l/2:-l/2))/2,d=e.cssStyles,u=im(h-10,c+a+10,h+s-10,c+a+10,l,.8),p=u?.[u.length-1];const g=[{x:h-10,y:10+c},{x:h-10,y:c+a+10},...u,{x:h+s-10,y:p.y-10},{x:h+s,y:p.y-10},{x:h+s,y:p.y-20},{x:h+s+10,y:p.y-20},{x:h+s+10,y:c-10},{x:10+h,y:c-10},{x:10+h,y:c},{x:h,y:c},{x:h,y:10+c}];a=[{x:h,y:10+c},{x:h+s-10,y:10+c},{x:h+s-10,y:p.y-10},{x:h+s,y:p.y-10},{x:h+s,y:c},{x:h,y:c}],u=Qy.svg(r),p=tu(e,{}),"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),s=rm(g);const f=u.path(s,p);h=rm(a);const y=u.path(h,p);return(c=r.insert((()=>f),":first-child")).insert((()=>y)),c.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",i),c.attr("transform",`translate(0,${-l/2})`),o.attr("transform",`translate(${-t.width/2-10-(t.x-(t.left??0))}, ${-t.height/2+10-l/2-(t.y-(t.top??0))})`),tm(e,c),e.intersect=function(t){return Am.polygon(e,g,t)},r}async function _C(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:o}=Jd(e),i=(e.labelStyle=i,e.useHtmlLabels||dr(rr())),{shapeSvg:i,bbox:t,label:a}=(i||(e.centerLabel=!0),await Ky(t,e,em(e))),s=Math.max(t.width+2*(e.padding??0),e?.width??0),n=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-s/2,h=-n/2,c=e.cssStyles,d=Qy.svg(i);r=tu(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");const u=d.rectangle(l,h,s,n,r);return(d=i.insert((()=>u),":first-child")).attr("class","basic label-container outer-path"),a.attr("class","label noteLabel"),c&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",c),o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))}, ${-t.height/2-(t.y-(t.top??0))})`),tm(e,d),e.intersect=function(t){return Am.rect(e,t)},i}i(TC,"linedCylinder"),i(SC,"linedWaveEdgedRect"),i(vC,"multiRect"),i(BC,"multiWaveEdgedRectangle"),i(_C,"note");var FC=i(((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 LC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await Ky(t,e,em(e))),o=[{x:(t=t.width+(e.padding??0)+(t.height+(e.padding??0)))/2,y:0},{x:t,y:-t/2},{x:t/2,y:-t},{x:0,y:-t/2}];let a;var s=e.cssStyles;if("handDrawn"===e.look){var n=Qy.svg(r),l=tu(e,{}),h=FC(0,0,t);const i=n.path(h,l);a=r.insert((()=>i),":first-child").attr("transform",`translate(${-t/2+.5}, ${t/2})`),s&&a.attr("style",s)}else(a=Dm(r,t,t,o)).attr("transform",`translate(${-t/2+.5}, ${t/2})`);return i&&a.attr("style",i),tm(e,a),e.calcIntersect=function(t,e){var r=t.width;return{x:(t=Am.polygon(t,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],e)).x-.5,y:t.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},r}async function MC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?21:r??0),{shapeSvg:t,bbox:a,label:s}=(r="neo"===e.look?12:r??0,await Ky(t,e,em(e))),n=(o=-((e?.width??a.width)+("neo"===e.look?2*o:o))/2,(r=-((e?.height??a.height)+("neo"===e.look?2*r:r))/2)/2);const l=[{x:o+n,y:r},{x:o,y:0},{x:o+n,y:-r},{x:-o,y:-r},{x:-o,y:r}];o=e.cssStyles;var r=Qy.svg(t),h=tu(e,{}),c=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),rm(l));const d=r.path(c,h);return(r=t.insert((()=>d),":first-child")).attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&r.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&r.selectAll("path").attr("style",i),r.attr("transform",`translate(${-n/2},0)`),s.attr("transform",`translate(${-n/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),tm(e,r),e.intersect=function(t){return Am.polygon(e,l,t)},t}async function AC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e);let o;e.labelStyle=r,o=e.cssClasses?"node "+e.cssClasses:"node default";t=(r=t.insert("g").attr("class",o).attr("id",e.domId||e.id)).insert("g");var r,a=r.insert("g").attr("class","label").attr("style",i),s=e.description,n=e.label;n=await hm(a,n,e.labelStyle,!0,!0);let l={width:0,height:0};dr(yi())&&(c=n.children[0],d=Ho(n),l=c.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)),h.info("Text 2",s);var c=s||[],d=n.getBBox(),u=(c=(s=await hm(a,Array.isArray(c)?c.join("<br/>"):c,e.labelStyle,!0,!0)).children[0],Ho(s));l=c.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height),c=(e.padding||0)/2,Ho(s).attr("transform","translate( "+(l.width>d.width?0:(d.width-l.width)/2)+", "+(d.height+c+5)+")"),Ho(n).attr("transform","translate( "+(l.width<d.width?0:-(d.width-l.width)/2)+", 0)"),l=a.node().getBBox(),a.attr("transform","translate("+-l.width/2+", "+(-l.height/2-c+3)+")"),u=l.width+(e.padding||0),s=l.height+(e.padding||0),n=-l.width/2-c,a=-l.height/2-c;let p,g;if("handDrawn"===e.look){var f=Qy.svg(r),y=tu(e,{});const t=f.path(cm(n,a,u,s,e.rx||0),y),i=f.line(-l.width/2-c,-l.height/2-c+d.height+c,l.width/2+c,-l.height/2-c+d.height+c,y);g=r.insert((()=>(h.debug("Rough node insert CXC",t),i)),":first-child"),p=r.insert((()=>(h.debug("Rough node insert CXC",t),t)),":first-child")}else p=t.insert("rect",":first-child"),g=t.insert("line"),p.attr("class","outer title-state").attr("style",i).attr("x",-l.width/2-c).attr("y",-l.height/2-c).attr("width",l.width+(e.padding||0)).attr("height",l.height+(e.padding||0)),g.attr("class","divider").attr("x1",-l.width/2-c).attr("x2",l.width/2+c).attr("y1",-l.height/2-c+d.height+c).attr("y2",-l.height/2-c+d.height+c);return tm(e,p),e.intersect=function(t){return Am.rect(e,t)},r}async function EC(t,e,{config:{themeVariables:r}}){return Jm(t,e,{rx:r=r?.radius??5,ry:r,classes:"",labelPaddingX:+(e?.padding??0),labelPaddingY:+(e?.padding??0)})}i(LC,"question"),i(MC,"rect_left_inv_arrow"),i(AC,"rectWithTitle"),i(EC,"roundedRect");async function OC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,"neo"===e.look?16:e.padding??0),"neo"===e.look?12:e.padding??0),{shapeSvg:t,bbox:a,label:s}=await Ky(t,e,em(e)),n=(r=(e?.width??a.width)+2*r+("neo"===e.look?8:16))-8,l=o=(e?.height??a.height)+2*o,r=8-r/2,h=(o=-o/2,e.cssStyles),c=Qy.svg(t),d=tu(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid"),n=[{x:r,y:o},{x:r+n,y:o},{x:r+n,y:o+l},{x:r-8,y:o+l},{x:r-8,y:o},{x:r,y:o},{x:r,y:o+l}];const u=c.polygon(n.map((t=>[t.x,t.y])),d);return(r=t.insert((()=>u),":first-child")).attr("class","basic label-container outer-path").attr("style",Pp(h)),i&&"handDrawn"!==e.look&&r.selectAll("path").attr("style",i),h&&"handDrawn"!==e.look&&r.selectAll("path").attr("style",i),s.attr("transform",`translate(${4-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),tm(e,r),e.intersect=function(t){return Am.rect(e,t)},t}async function $C(t,e){var r,{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:t,bbox:a,label:s}=(r="neo"===e.look?12:r,(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o,10),e.height=Math.max((e?.height??0)/1.5-2*r,10)),await Ky(t,e,em(e))),n=-(o=(e?.width||a.width)+2*o)/2,l=-(r=1.5*((e?.height||a.height)+2*r)/1.5)/2,h=e.cssStyles,c=Qy.svg(t),d=tu(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=[{x:n,y:l},{x:n,y:l+r},{x:n+o,y:l+r},{x:n+o,y:l-r/2}];n=rm(u);const p=c.path(n,d);return(l=t.insert((()=>p),":first-child")).attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&l.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&l.selectChildren("path").attr("style",i),l.attr("transform",`translate(0, ${r/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-r/4+(e.padding??0)-(a.y-(a.top??0))})`),tm(e,l),e.intersect=function(t){return Am.polygon(e,u,t)},t}async function IC(t,e){var r=e.padding??0,i="neo"===e.look?16:2*r;r="neo"===e.look?12:r;return Jm(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:r})}async function DC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?20:r),{shapeSvg:t,bbox:a}=(r="neo"===e.look?12:r,await Ky(t,e,em(e))),r=a.height+("neo"===e.look?2*r:r),a=a.width+r/4+("neo"===e.look?2*o:o),s=(o=r/2,e.cssStyles),n=Qy.svg(t),l=tu(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=[{x:-a/2+o,y:-r/2},{x:a/2-o,y:-r/2},...om(-a/2+o,0,o,50,90,270),{x:a/2-o,y:r/2},...om(a/2-o,0,o,50,270,450)];r=rm(h);const c=n.path(r,l);return(a=t.insert((()=>c),":first-child")).attr("class","basic label-container outer-path"),s&&"handDrawn"!==e.look&&a.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&a.selectChildren("path").attr("style",i),tm(e,a),e.intersect=function(t){return Am.polygon(e,h,t)},t}async function qC(t,e){return Jm(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function PC(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:o}=Jd(e),i=(e.labelStyle=i,e).cssStyles,{lineColor:r,stateBorder:a,nodeBorder:s,nodeShadow:n}=r,l=((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),t.insert("g").attr("class","node default").attr("id",e.domId??e.id)),h=Qy.svg(l),c=tu(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=h.circle(0,0,e.width,{...c,stroke:r,strokeWidth:2});r=a??s,a=5*(e.width??0)/14;const u=h.circle(0,0,a,{...c,fill:r,stroke:r,strokeWidth:2,fillStyle:"solid"});return(s=l.insert((()=>d),":first-child")).insert((()=>u)),"handDrawn"!==e.look&&s.attr("class","outer-path"),i&&s.selectAll("path").attr("style",i),o&&s.selectAll("path").attr("style",o),e.width<25&&n&&"handDrawn"!==e.look&&(h=t.node()?.ownerSVGElement?.id??"",s.attr("style",`filter:url(#${h?h+"-drop-shadow-small":"drop-shadow-small"})`)),tm(e,s),e.intersect=function(t){return Am.circle(e,(e.width??0)/2,t)},l}function zC(t,e,{config:{themeVariables:r}}){var{lineColor:r,nodeShadow:i}=r,o=((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),t.insert("g").attr("class","node default").attr("id",e.domId||e.id));let a;if("handDrawn"===e.look){const t=Qy.svg(o).circle(0,0,e.width,Vd(r));(a=o.insert((()=>t))).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(a=o.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);return e.width<25&&i&&"handDrawn"!==e.look&&(r=t.node()?.ownerSVGElement?.id??"",a.attr("style",`filter:url(#${r?r+"-drop-shadow-small":"drop-shadow-small"})`)),tm(e,a),e.intersect=function(t){return Am.circle(e,(e.width??7)/2,t)},o}i(OC,"shadedProcess"),i($C,"slopedRect"),i(IC,"squareRect"),i(DC,"stadium"),i(qC,"state"),i(PC,"stateEnd"),i(zC,"stateStart");async function RC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e?.padding??8),"neo"===e.look?28:r),{shapeSvg:t,bbox:a}=(r="neo"===e.look?12:r,await Ky(t,e,em(e))),r=(o=(e?.width??a.width)+16+o,a=(e?.height??a.height)+r,o-16),s=a,a=(o=-o/2,-a/2);const n=[{x:0,y:0},{x:r,y:0},{x:r,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:8+r,y:0},{x:8+r,y:-s},{x:-8,y:-s},{x:-8,y:0}];if("handDrawn"===e.look){var l=Qy.svg(t),h=tu(e,{});const i=l.rectangle(o,a,16+r,s,h),n=l.line(o+8,a,o+8,a+s,h),c=l.line(o+8+r,a,o+8+r,a+s,h);t.insert((()=>n),":first-child"),t.insert((()=>c),":first-child"),l=t.insert((()=>i),":first-child"),o=e.cssStyles,l.attr("class","basic label-container").attr("style",Pp(o)),tm(e,l)}else a=Dm(t,r,s,n),i&&a.attr("style",i),tm(e,a);return e.intersect=function(t){return Am.polygon(e,n,t)},t}i(RC,"subroutine");async function NC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:t,bbox:a}=(r="neo"===e.look?12:r,(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*r,10),e.width=Math.max((e?.width??0)-2*o-.2*(e.height+2*r),10)),await Ky(t,e,em(e))),s=.2*(r=(e?.height||a.height)+2*r),n=.2*r,a=(e?.width||a.width)+2*o+s-s,r=(o=r,-a/2),l=-o/2,h=e.cssStyles,c=Qy.svg(t),d=tu(e,{});const u=[{x:r-s/2,y:l},{x:r+a+s/2,y:l},{x:r+a+s/2,y:l+o},{x:r-s/2,y:l+o}];r=[{x:r+a-s/2,y:l+o},{x:r+a+s/2,y:l+o},{x:r+a+s/2,y:l+o-n}],"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid"),a=rm(u);const p=c.path(a,d);s=rm(r);const g=c.path(s,{...d,fillStyle:"solid"});return(l=t.insert((()=>g),":first-child")).insert((()=>p),":first-child"),l.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&l.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&l.selectAll("path").attr("style",i),tm(e,l),e.intersect=function(t){return Am.polygon(e,u,t)},t}async function WC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,label:o}=(e.labelStyle=r,await Ky(t,e,em(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),n=s/8,l=.2*a,h=.2*s,c=s+n,d=e.cssStyles,u=Qy.svg(r),p=tu(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-a/2-a/2*.1,y:c/2},...im(-a/2-a/2*.1,c/2,a/2+a/2*.1,c/2,n,.8),{x:a/2+a/2*.1,y:-c/2},{x:-a/2-a/2*.1,y:-c/2}];h=[{x:(f=-a/2+a/2*.1)+a-l,y:1.3*((c=-c/2-.4*h)+s)},{x:f+a,y:c+s-h},{x:f+a,y:.9*(c+s)},...im(f+a,1.25*(c+s),f+a-l,1.3*(c+s),.02*-s,.5)];var f=rm(g);const y=u.path(f,p);l=rm(h);const m=u.path(l,{...p,fillStyle:"solid"});return(c=r.insert((()=>m),":first-child")).insert((()=>y),":first-child"),c.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",i),c.attr("transform",`translate(0,${-n/2})`),o.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-n/2-(t.y-(t.top??0))})`),tm(e,c),e.intersect=function(t){return Am.polygon(e,g,t)},r}async function jC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await Ky(t,e,em(e))),o=Math.max(t.width+(e.padding??0),e?.width||0),a=-o/2,s=-(t=Math.max(t.height+(e.padding??0),e?.height||0))/2,n=r.insert("rect",":first-child");return n.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",o).attr("height",t),tm(e,n),e.intersect=function(t){return Am.rect(e,t)},r}i(NC,"taggedRect"),i(WC,"taggedWaveEdgedRectangle"),i(jC,"text");var HC=i(((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"),UC=i(((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"),YC=i(((t,e,r,i,o,a)=>[`M${t+r/2},`+-i/2,`a${o},${a} 0,0,0 0,`+i].join(" ")),"createInnerCylinderPathD");async function GC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:o,bbox:t,label:a}=(r=(e.labelStyle=r,e.padding??0),r="neo"===e.look?12:r/2,(e.width||e.height)&&(o=e.height??0,e.height=(e.height??0)-r,e.height<5&&(e.height=5),e.width=(e.width??0)-r-o/2/(2.5+o/50)*3,e.width<10)&&(e.width=10),await Ky(t,e,em(e))),s=(e.height||t.height)+r;const n=s/2,l=n/(2.5+s/50);var r=(e.width||t.width)+l+r,h=e.cssStyles;let c;if("handDrawn"===e.look){var d=Qy.svg(o),u=UC(0,0,r,s,l,n),p=YC(0,0,r,s,l,n);const t=d.path(u,tu(e,{})),i=d.path(p,tu(e,{fill:"none"}));c=o.insert((()=>i),":first-child"),(c=o.insert((()=>t),":first-child")).attr("class","basic label-container"),h&&c.attr("style",h)}else u=HC(0,0,r,s,l,n),(c=o.insert("path",":first-child").attr("d",u).attr("class","basic label-container").attr("style",Pp(h)).attr("style",i)).attr("class","basic label-container outer-path"),h&&c.selectAll("path").attr("style",h),i&&c.selectAll("path").attr("style",i);return c.attr("label-offset-x",l),c.attr("transform",`translate(${-r/2}, ${s/2} )`),a.attr("transform",`translate(${-t.width/2-l-(t.x-(t.left??0))}, ${-t.height/2-(t.y-(t.top??0))})`),tm(e,c),e.intersect=function(t){var r=Am.rect(e,t),i=r.y-(e.y??0);if(0!=n&&(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-l)){let o=l*l*(1-i*i/(n*n));0!=o&&(o=Math.sqrt(Math.abs(o))),o=l-o,0<t.x-(e.x??0)&&(o=-o),r.x+=o}return r},o}async function XC(t,e){var r,{labelStyles:i,nodeStyles:o}=Jd(e),a=(i=(e.labelStyle=i,e.padding??0),e.look,i),i="neo"===e.look?2*i:i,{shapeSvg:t,bbox:r}=await Ky(t,e,em(e));const s=[{x:-3*(a=(e?.height??r.height)+a)/6,y:0},{x:(r=(e?.width??r.width)+i)+3*a/6,y:0},{x:r,y:-a},{x:0,y:-a}];let n;if(i=e.cssStyles,"handDrawn"===e.look){var l=Qy.svg(t),h=tu(e,{}),c=rm(s);const o=l.path(c,h);n=t.insert((()=>o),":first-child").attr("transform",`translate(${-r/2}, ${a/2})`),i&&n.attr("style",i)}else n=Dm(t,r,a,s);return o&&n.attr("style",o),e.width=r,e.height=a,tm(e,n),e.intersect=function(t){return Am.polygon(e,s,t)},t}async function VC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:t,bbox:a}=(r="neo"===e.look?12:r,(e.width||e.height)&&(e.height=(e.height??0)-2*r,e.height<5&&(e.height=5),e.width=(e.width??0)-2*o,e.width<15)&&(e.width=15),await Ky(t,e,em(e))),a=(o=(e?.width||a.width)+2*o,(e?.height||a.height)+2*r),r=e.cssStyles,s=Qy.svg(t),n=tu(e,{});"handDrawn"!==e.look&&(n.roughness=0,n.fillStyle="solid");const l=[{x:-o/2*.8,y:-a/2},{x:o/2*.8,y:-a/2},{x:o/2,y:-a/2*.6},{x:o/2,y:a/2},{x:-o/2,y:a/2},{x:-o/2,y:-a/2*.6}];o=rm(l);const h=s.path(o,n);return(a=t.insert((()=>h),":first-child")).attr("class","basic label-container outer-path"),r&&"handDrawn"!==e.look&&a.selectChildren("path").attr("style",r),i&&"handDrawn"!==e.look&&a.selectChildren("path").attr("style",i),tm(e,a),e.intersect=function(t){return Am.polygon(e,l,t)},t}i(GC,"tiltedCylinder"),i(XC,"trapezoid"),i(VC,"trapezoidalPentagon");async function ZC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:t,bbox:o,label:a}=(r=(e.labelStyle=r,e.padding??0),r="neo"===e.look?2*r:r,(e.width||e.height)&&(e.width=((e?.width??0)-r)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10)&&(e.height=10),await Ky(t,e,em(e))),s=Ye(yi().flowchart?.htmlLabels),r=(e?.width||o.width)+r,n=e?.height||r+o.height;const l=[{x:0,y:0},{x:n,y:0},{x:n/2,y:-n}];var c=e.cssStyles,d=Qy.svg(t),u=tu(e,{}),p=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),rm(l));const g=d.path(p,u);return d=t.insert((()=>g),":first-child").attr("transform",`translate(${-n/2}, ${n/2})`).attr("class","outer-path"),c&&"handDrawn"!==e.look&&d.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&d.selectChildren("path").attr("style",i),e.width=r,e.height=n,tm(e,d),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${n/2-(o.height+(e.padding??0)/(s?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return h.info("Triangle intersect",e,l,t),Am.polygon(e,l,t)},t}async function QC(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r);r="neo"===e.look?12:r;let a=!0;(e.width||e.height)&&(a=!1,e.width=(e?.width??0)-2*o,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*r,e.height<10)&&(e.height=10);var{shapeSvg:t,bbox:s,label:n}=await Ky(t,e,em(e)),r=(o=(e?.width||s.width)+2*(o??0),(e?.height||s.height)+2*(r??0)),l="neo"===e.look?r/4:r/8,h=r+(a?l:-l),c=e.cssStyles,d=0<(d=14-o)?d/2:0,u=Qy.svg(t),p=tu(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-o/2-d,y:h/2},...im(-o/2-d,h/2,o/2+d,h/2,l,.8),{x:o/2+d,y:-h/2},{x:-o/2-d,y:-h/2}];d=rm(g);const f=u.path(d,p);return(h=t.insert((()=>f),":first-child")).attr("class","basic label-container outer-path"),c&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",i),h.attr("transform",`translate(0,${-l/2})`),n.attr("transform",`translate(${-o/2+(e.padding??0)-(s.x-(s.left??0))},${-r/2+(e.padding??0)-l-(s.y-(s.top??0))})`),tm(e,h),e.intersect=function(t){return Am.polygon(e,g,t)},t}async function KC(t,e){var r,{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:a,bbox:t}=(r="neo"===e.look?20:r,(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),a=Math.min(.2*e.height,e.height/4),e.height=Math.ceil(e.height-r-a*(20/9)),e.width=e.width-2*o),await Ky(t,e,em(e))),s=(o=(e?.width||t.width)+2*o,t=(t=(e?.height||t.height)+r)+2*(r=t/8),e.cssStyles),n=Qy.svg(a),l=tu(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=[{x:-o/2,y:t/2},...im(-o/2,t/2,o/2,t/2,r,1),{x:o/2,y:-t/2},...im(o/2,-t/2,-o/2,-t/2,r,-1)];o=rm(h);const c=n.path(o,l);return(t=a.insert((()=>c),":first-child")).attr("class","basic label-container"),s&&"handDrawn"!==e.look&&t.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&t.selectAll("path").attr("style",i),tm(e,t),e.intersect=function(t){return Am.polygon(e,h,t)},a}i(ZC,"triangle"),i(QC,"waveEdgedRectangle"),i(KC,"waveRectangle");var JC=10;async function tx(t,e){var r,{labelStyles:r,nodeStyles:i}=Jd(e),o=(r=(e.labelStyle=r,"neo"===e.look?16:e.padding??0),"neo"===e.look?12:e.padding??0),{shapeSvg:t,bbox:a,label:s}=((e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*r-JC,10),e.height=Math.max((e?.height??0)-2*o-JC,10)),await Ky(t,e,em(e))),n=(r=(e?.width||a.width)+2*r+JC,o=(e?.height||a.height)+2*o+JC,-(r=r-JC)/2),l=-(o=o-JC)/2,h=e.cssStyles,c=Qy.svg(t),d=tu(e,{});const u=[{x:n-JC,y:l-JC},{x:n-JC,y:l+o},{x:n+r,y:l+o},{x:n+r,y:l-JC}];r=`M${n-JC},${l-JC} L${n+r},${l-JC} L${n+r},${l+o} L${n-JC},${l+o} L${n-JC},${l-JC}\n M${n-JC},${l} L${n+r},${l}\n M${n},${l-JC} L${n},`+(l+o),"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const p=c.path(r,d);return(n=t.insert((()=>p),":first-child")).attr("transform","translate(5, 5)"),n.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&n.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&n.selectAll("path").attr("style",i),s.attr("transform",`translate(${-a.width/2+5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),tm(e,n),e.intersect=function(t){return Am.polygon(e,u,t)},t}i(tx,"windowPane");var ex=new Set(["redux-color","redux-dark-color"]),rx=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function ix(t,e){var r=e,{theme:i,themeVariables:o}=(r.alias&&(e.label=r.alias),rr()),{rowEven:a,rowOdd:s,nodeBorder:n,borderColorArray:o}=o,l=("handDrawn"===e.look&&(p=(p=rr().themeVariables).background,await ix(t,{...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none","fill: "+p]})),rr());e.useHtmlLabels=l.htmlLabels;let h=l.er?.diagramPadding??10,c=l.er?.entityPadding??6;var d=e.cssStyles,{labelStyles:u,nodeStyles:p}=Jd(e);if(0===r.attributes.length&&e.label)return D={rx:0,ry:0,labelPaddingX:h,labelPaddingY:1.5*h,classes:""},vp(e.label,l)+2*D.labelPaddingX<l.er.minEntityWidth&&(e.width=l.er.minEntityWidth),D=await Jm(t,e,D),null!=i&&ex.has(i)&&(C=r.colorIndex??0,D.attr("data-color-id","color-"+C%o.length)),Ye(l.htmlLabels)||(A=(C=D.select("text")).node()?.getBBox(),C.attr("transform",`translate(${-A.width/2}, 0)`)),D;l.htmlLabels||(h*=1.25,c*=1.25);let g=em(e);g=g||"node default";var f=t.insert("g").attr("class",g).attr("id",e.domId||e.id);const y=await ox(f,e.label??"",l,0,0,["name"],u);y.height+=c;let m=0;var C=[],x=[];let b=0,k=0,w=0,T=0,S=!0,v=!0;for(const t of r.attributes){var B=await ox(f,t.type,l,0,m,["attribute-type"],u),_=(b=Math.max(b,B.width+h),await ox(f,t.name,l,0,m,["attribute-name"],u)),F=(k=Math.max(k,_.width+h),await ox(f,t.keys.join(),l,0,m,["attribute-keys"],u)),L=(w=Math.max(w,F.width+h),await ox(f,t.comment,l,0,m,["attribute-comment"],u));B=(T=Math.max(T,L.width+h),Math.max(B.height,_.height,F.height,L.height)+c);x.push({yOffset:m,rowHeight:B}),m+=B}let M=4;w<=h&&(S=!1,w=0,M--),T<=h&&(v=!1,T=0,M--);var A=f.node().getBBox(),E=(t=(0<y.width+2*h-(b+k+w+T)&&(D=y.width+2*h-(b+k+w+T),b+=D/M,k+=D/M,0<w&&(w+=D/M),0<T)&&(T+=D/M),b+k+w+T),Qy.svg(f)),O=tu(e,{});"handDrawn"!==e.look&&(O.roughness=0,O.fillStyle="solid");let $=0;0<x.length&&($=x.reduce(((t,e)=>t+(e?.rowHeight??0)),0));var I=Math.max(A.width+2*h,e?.width||0,t),D=Math.max(($??0)+y.height,e?.height||0);const q=-I/2,P=-D/2,z=(f.selectAll("g:not(:first-child)").each(((t,e,r)=>{let i=0,o=0;(e=(r=Ho(r[e])).attr("transform"))&&(e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(e))&&(i=parseFloat(e[1]),o=parseFloat(e[2]),r.attr("class").includes("attribute-name")?i+=b:r.attr("class").includes("attribute-keys")?i+=b+k:r.attr("class").includes("attribute-comment")&&(i+=b+k+w)),r.attr("transform",`translate(${q+h/2+i}, ${o+P+y.height+c/2})`)})),f.select(".name").attr("transform","translate("+-y.width/2+", "+(P+c/2)+")"),null!=i&&ex.has(i)&&(A=r.colorIndex??0,f.attr("data-color-id","color-"+A%o.length)),E.rectangle(q,P,I,D,O));var R,N;t=f.insert((()=>z),":first-child").attr("class","outer-path").attr("style",d.join(""));for([R,N]of(C.push(0),x.entries())){var W=(R+1)%2==0&&0!==N.yOffset;const t=E.rectangle(q,y.height+P+N?.yOffset,I,N?.rowHeight,{...O,fill:W?a:s,stroke:n});f.insert((()=>t),"g.label").attr("style",d.join("")).attr("class","row-rect-"+(W?"even":"odd"))}let j=ax(q,y.height+P,I+q,y.height+P,1e-4),H=E.polygon(j.map((t=>[t.x,t.y])),O);f.insert((()=>H)).attr("class","divider"),j=ax(b+q,y.height+P,b+q,D+P,1e-4),H=E.polygon(j.map((t=>[t.x,t.y])),O),f.insert((()=>H)).attr("class","divider"),S&&(j=ax(r=b+k+q,y.height+P,r,D+P,1e-4),H=E.polygon(j.map((t=>[t.x,t.y])),O),f.insert((()=>H)).attr("class","divider")),v&&(j=ax(A=b+k+w+q,y.height+P,A,D+P,1e-4),H=E.polygon(j.map((t=>[t.x,t.y])),O),f.insert((()=>H)).attr("class","divider"));for(const t of C){var U=y.height+P+t;j=ax(q,U,I+q,U,1e-4),H=E.polygon(j.map((t=>[t.x,t.y])),O),f.insert((()=>H)).attr("class","divider")}return tm(e,t),p&&"handDrawn"!==e.look&&(null!=i&&rx.has(i)?f.selectAll("path"):(o=p.split(";")?.filter((t=>t.includes("stroke")))?.map((t=>""+t)).join("; "),f.selectAll("path").attr("style",o??""),f.selectAll(".row-rect-even path"))).attr("style",p),e.intersect=function(t){return Am.rect(e,t)},f}async function ox(t,e,r,i=0,o=0,a=[],s=""){if(t=t.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${i}, ${o})`).attr("style",s),e!==Dr(e)&&(e=(e=Dr(e)).replaceAll("<","&lt;").replaceAll(">","&gt;")),a=t.node().appendChild(await Yf(t,e,{width:vp(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("&lt;")||e.includes("&gt;")){let t=a.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let n=a.getBBox();return Ye(r.htmlLabels)&&((i=a.children[0]).style.textAlign="start",o=Ho(a),n=i.getBoundingClientRect(),o.attr("width",n.width),o.attr("height",n.height)),n}function ax(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 sx(t,e,r,i,o=r.class.padding??12){var a=i?0:3,s=(i=t.insert("g").attr("class",em(e)).attr("id",e.domId||e.id),t=null,null),n=null,l=null;let h=0,c=0;t=i.insert("g").attr("class","annotation-group text"),0<e.annotations.length&&(await nx(t,{text:`«${e.annotations[0]}»`},0),h=(d=t.node().getBBox()).height),await nx(s=i.insert("g").attr("class","label-group text"),e,0,["font-weight: bolder"]);var d=s.node().getBBox(),u=d.height;n=i.insert("g").attr("class","members-group text");let p=0;for(const t of e.members){p+=await nx(n,t,p,[t.parseClassifier()])+a}(c=n.node().getBBox().height)<=0&&(c=o/2),l=i.insert("g").attr("class","methods-group text");let g=0;for(const t of e.methods){g+=await nx(l,t,g,[t.parseClassifier()])+a}return i.node().getBBox(),null!==t&&(e=t.node().getBBox(),t.attr("transform",`translate(${-e.width/2})`)),s.attr("transform",`translate(${-d.width/2}, ${h})`),i.node().getBBox(),n.attr("transform",`translate(0, ${h+u+2*o})`),i.node().getBBox(),l.attr("transform",`translate(0, ${h+u+(c?c+4*o:2*o)})`),t=i.node().getBBox(),{shapeSvg:i,bbox:t}}async function nx(t,e,r,o=[]){t=t.insert("g").attr("class","label").attr("style",o.join("; "));const a=rr();let s="useHtmlLabels"in e?e.useHtmlLabels:Ye(a.htmlLabels)??!0,n="";n="text"in e?e.text:e.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),Wr(n)&&(s=!0),e=await Yf(t,xi(Dp(n)),{width:vp(n,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let l,h=1;if(s){var c=e.children[0],d=Ho(e),u=(h=c.innerHTML.split("<br>").length,c.innerHTML.includes("</math>")&&(h+=c.innerHTML.split("<mrow>").length-1),c.getElementsByTagName("img"));if(u){const t=""===n.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map((e=>new Promise((r=>{function o(){var i;e.style.display="flex",e.style.flexDirection="column",t?(i=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,i=5*parseInt(i,10)+"px",e.style.minWidth=i,e.style.maxWidth=i):e.style.width="100%",r(e)}i(o,"setupImage"),setTimeout((()=>{e.complete&&o()})),e.addEventListener("error",o),e.addEventListener("load",o)})))))}l=c.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}else o.includes("font-weight: bolder")&&Ho(e).selectAll("tspan").attr("font-weight",""),h=e.children.length,u=e.children[0],""!==e.textContent&&!e.textContent.includes("&gt")||(u.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "!==n[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),l=e.getBBox();return t.attr("transform","translate(0,"+(-l.height/(2*h)+r)+")"),l.height}async function lx(t,e){const r=yi();var i=(i=r.themeVariables).useGradient;const o=r.class.padding??12,a=o,s=e.useHtmlLabels??Ye(r.htmlLabels)??!0,n=e,{shapeSvg:l,bbox:h}=(n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[],await sx(t,e,r,s,a));var{labelStyles:t,nodeStyles:c}=Jd(e),c=(e.labelStyle=t,e.cssStyles=n.styles||"",n.styles?.join(";")||c||"");e.cssStyles||(e.cssStyles=c.replaceAll("!important","").split(";"));const d=0===n.members.length&&0===n.methods.length&&!r.class?.hideEmptyMembersBox;var u=Qy.svg(l),p=tu(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),Math.max(e.width??0,h.width));let f=Math.max(e.height??0,h.height);const y=(e.height??0)>h.height,m=(0===n.members.length&&0===n.methods.length?f+=a:0<n.members.length&&0===n.methods.length&&(f+=2*a),-g/2),C=-f/2;let x=d?2*o:0===n.members.length&&0===n.methods.length?-o:0;y&&(x=2*o);const b=u.rectangle(m-o,C-o-(d?o:0===n.members.length&&0===n.methods.length?-o/2:0),g+2*o,f+2*o+x,p);var k=((g=l.insert((()=>b),":first-child")).attr("class","basic label-container outer-path"),g.node().getBBox());const w=l.select(".annotation-group").node().getBBox().height-(d?o/2:0)||0,T=l.select(".label-group").node().getBBox().height-(d?o/2:0)||0,S=l.select(".members-group").node().getBBox().height-(d?o/2:0)||0,v=(w+T+C+o-(C-o-(d?o:0===n.members.length&&0===n.methods.length?-o/2:0)))/2;if(l.selectAll(".text").each(((t,e,i)=>{let h=0,c=(h=(e=(i=Ho(i[e])).attr("transform"))&&(e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(e))?parseFloat(e[2]):h)+C+o-(d?o:0===n.members.length&&0===n.methods.length?-o/2:0),u=(i.attr("class").includes("methods-group")&&(e=Math.max(S,a/2),c=y?Math.max(v,w+T+e+C+2*a+o)+2*a:w+T+e+C+4*a+o),0===n.members.length&&0===n.methods.length&&r.class?.hideEmptyMembersBox&&(c=0<n.annotations.length?h-a:h),s||(c-=4),m);(i.attr("class").includes("label-group")||i.attr("class").includes("annotation-group"))&&(u=-i.node()?.getBBox().width/2||0,l.selectAll("text").each((function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(u=0)}))),i.attr("transform",`translate(${u}, ${c})`)})),0<n.members.length||0<n.methods.length||d){var B=w+T+C+o;const t=u.line(k.x,B,k.x+k.width,B+.001,p);l.insert((()=>t)).attr("class","divider"+("neo"!==e.look||i?"":" neo-line")).attr("style",c)}if(d||0<n.members.length||0<n.methods.length){B=w+T+S+C+2*a+o;const t=u.line(k.x,y?Math.max(v,B):B,k.x+k.width,(y?Math.max(v,B):B)+.001,p);l.insert((()=>t)).attr("class","divider"+("neo"!==e.look||i?"":" neo-line")).attr("style",c)}return"handDrawn"!==n.look&&l.selectAll("path").attr("style",c),g.select(":nth-child(2)").attr("style",c),l.selectAll(".divider").select("path").attr("style",c),e.labelStyle?l.selectAll("span").attr("style",e.labelStyle):l.selectAll("span").attr("style",c),s||((k=(u=RegExp(/color\s*:\s*([^;]*)/)).exec(c))?(B=k[0].replace("color","fill"),l.selectAll("tspan").attr("style",B)):t&&(p=u.exec(t))&&(i=p[0].replace("color","fill"),l.selectAll("tspan").attr("style",i))),tm(e,g),e.intersect=function(t){return Am.rect(e,t)},l}async function hx(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),r=(e.labelStyle=r,e),o=e,a="verifyMethod"in e,s=em(e),n=yi().themeVariables,{borderColorArray:n,requirementEdgeLabelBackground:l}=n;t=t.insert("g").attr("class",s).attr("id",e.domId??e.id);let h,c=h=a?await cx(t,`&lt;&lt;${r.type}&gt;&gt;`,0,e.labelStyle):await cx(t,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);c+=(s=await cx(t,r.name,c,e.labelStyle+"; font-weight: bold;"))+20,a?(c+=a=await cx(t,r.requirementId?"ID: "+r.requirementId:"",c,e.labelStyle),c+=a=await cx(t,r.text?"Text: "+r.text:"",c,e.labelStyle),c+=a=await cx(t,r.risk?"Risk: "+r.risk:"",c,e.labelStyle),await cx(t,r.verifyMethod?"Verification: "+r.verifyMethod:"",c,e.labelStyle)):(c+=a=await cx(t,o.type?"Type: "+o.type:"",c,e.labelStyle),await cx(t,o.docRef?"Doc Ref: "+o.docRef:"",c,e.labelStyle)),r=(t.node()?.getBBox().width??200)+20;const d=(t.node()?.getBBox().height??200)+20,u=-r/2;a=-d/2,o=Qy.svg(t);var p=tu(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=o.rectangle(u,a,r,d,p);var f=t.insert((()=>g),":first-child");if(f.attr("class","basic label-container outer-path").attr("style",i),n?.length&&(y=e.colorIndex??0,t.attr("data-color-id","color-"+y%n.length)),t.selectAll(".label").each(((t,e,r)=>{var i=(r=Ho(r[e])).attr("transform");let o=0,a=0;i&&(i=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(o=parseFloat(i[1]),a=parseFloat(i[2])),i=a-d/2;let s=10+u;0!==e&&1!==e||(s=o),r.attr("transform",`translate(${s}, ${20+i})`)})),c>h+s+20){var y=a+h+s+20;let i;i="neo"===e.look?(a=[[u,y],[u+r,y],[u+r,y+.001],[u,y+.001]],o.polygon(a,p)):o.line(u,y,u+r,y,p),t.insert((()=>i)).attr("class","divider")}return tm(e,f),e.intersect=function(t){return Am.rect(e,t)},i&&"handDrawn"!==e.look&&(l||n?.length)&&t.selectAll("path").attr("style",i),t}async function cx(t,e,r,i=""){if(""===e)return 0;t=t.insert("g").attr("class","label").attr("style",i);var o=yi(),a=o.htmlLabels??!0;e=await Yf(t,xi(Dp(e)),{width:vp(e,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let s;if(a)o=e.children[0],a=Ho(e),s=o.getBoundingClientRect(),a.attr("width",s.width),a.attr("height",s.height);else{for(const t of e.children[0].children)i&&t.setAttribute("style",i);(s=e.getBBox()).height+=6}return t.attr("transform",`translate(${-s.width/2},${-s.height/2+r})`),s.height}i(ix,"erBox"),i(ox,"addText"),i(ax,"lineToPolygon"),i(sx,"textHelper"),i(nx,"addText"),i(lx,"classBox"),i(hx,"requirementBox"),i(cx,"addText");var dx=i((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 ux(t,e,{config:r}){var{labelStyles:i,nodeStyles:o}=Jd(e),{shapeSvg:t,bbox:a,label:s}=(i=(e.labelStyle=i||"",e.width),e.width=(e.width??200)-10,await Ky(t,e,em(e))),n=e.padding||10;let l,h,c;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(r=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=t.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",r).attr("target","_blank")),r={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},({label:h,bbox:c}=l?await Jy(l,"ticket"in e&&e.ticket||"",r):await Jy(t,"ticket"in e&&e.ticket||"",r));var{label:r,bbox:d}=await Jy(t,"assigned"in e&&e.assigned||"",r),i=(e.width=i,e?.width||0),u=Math.max(c.height,d.height)/2,p=Math.max(a.height+20,e?.height||0)+u,g=-i/2,f=-p/2;let y;s.attr("transform","translate("+(n-i/2)+", "+(-u-a.height/2)+")"),h.attr("transform","translate("+(n-i/2)+", "+(-u+a.height/2)+")"),r.attr("transform","translate("+(n+i/2-d.width-20)+", "+(-u+a.height/2)+")");var{rx:s,ry:r}=e;n=e.cssStyles;if("handDrawn"===e.look){d=Qy.svg(t),u=tu(e,{});const o=s||r?d.path(cm(g,f,i,p,s||0),u):d.rectangle(g,f,i,p,u);(y=t.insert((()=>o),":first-child")).attr("class","basic label-container").attr("style",n||null)}else(y=t.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",s??5).attr("ry",r??5).attr("x",g).attr("y",f).attr("width",i).attr("height",p),(a="priority"in e&&e.priority)&&(d=t.append("line"),u=2+g,n=f+Math.floor((s??0)/2),o=f+p-Math.floor((s??0)/2),d.attr("x1",u).attr("y1",n).attr("x2",u).attr("y2",o).attr("stroke-width","4").attr("stroke",dx(a)));return tm(e,y),e.height=p,e.intersect=function(t){return Am.rect(e,t)},t}async function px(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,halfPadding:o,label:a}=(e.labelStyle=r,await Ky(t,e,em(e))),s=t.width+10*o,o=t.height+8*o,n=.15*s,l=e.cssStyles,c=t.width+20,d=t.height+20;s=Math.max(s,c),c=Math.max(o,d);let u;if(a.attr("transform",`translate(${-t.width/2}, ${-t.height/2})`),o=`M0 0 \n a${n},${n} 1 0,0 ${.25*s},${-1*c*.1}\n a${n},${n} 1 0,0 ${.25*s},0\n a${n},${n} 1 0,0 ${.25*s},0\n a${n},${n} 1 0,0 ${.25*s},${.1*c}\n\n a${n},${n} 1 0,0 ${.15*s},${.33*c}\n a${.8*n},${.8*n} 1 0,0 0,${.34*c}\n a${n},${n} 1 0,0 ${-1*s*.15},${.33*c}\n\n a${n},${n} 1 0,0 ${-1*s*.25},${.15*c}\n a${n},${n} 1 0,0 ${-1*s*.25},0\n a${n},${n} 1 0,0 ${-1*s*.25},0\n a${n},${n} 1 0,0 ${-1*s*.25},${-1*c*.15}\n\n a${n},${n} 1 0,0 ${-1*s*.1},${-1*c*.33}\n a${.8*n},${.8*n} 1 0,0 0,${-1*c*.34}\n a${n},${n} 1 0,0 ${.1*s},${-1*c*.33}\n H0 V0 Z`,"handDrawn"===e.look){d=Qy.svg(r),a=tu(e,{});const t=d.path(o,a);(u=r.insert((()=>t),":first-child")).attr("class","basic label-container").attr("style",Pp(l))}else u=r.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",o);return u.attr("transform",`translate(${-s/2}, ${-c/2})`),tm(e,u),e.calcIntersect=function(t,e){return Am.rect(t,e)},e.intersect=function(t){return h.info("Bang intersect",e,t),Am.rect(e,t)},r}async function gx(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e),{shapeSvg:r,bbox:t,halfPadding:o,label:a}=(e.labelStyle=r,await Ky(t,e,em(e))),s=t.width+2*o,o=t.height+2*o,n=.15*s,l=.25*s,c=.35*s,d=.2*s,u=e.cssStyles;let p;if(l=`M0 0 \n a${n},${n} 0 0,1 ${.25*s},${-1*s*.1}\n a${c},${c} 1 0,1 ${.4*s},${-1*s*.1}\n a${l},${l} 1 0,1 ${.35*s},${.2*s}\n\n a${n},${n} 1 0,1 ${.15*s},${.35*o}\n a${d},${d} 1 0,1 ${-1*s*.15},${.65*o}\n\n a${l},${n} 1 0,1 ${-1*s*.25},${.15*s}\n a${c},${c} 1 0,1 ${-1*s*.5},0\n a${n},${n} 1 0,1 ${-1*s*.25},${-1*s*.15}\n\n a${n},${n} 1 0,1 ${-1*s*.1},${-1*o*.35}\n a${d},${d} 1 0,1 ${.1*s},${-1*o*.65}\n H0 V0 Z`,"handDrawn"===e.look){c=Qy.svg(r),n=tu(e,{});const t=c.path(l,n);(p=r.insert((()=>t),":first-child")).attr("class","basic label-container").attr("style",Pp(u))}else p=r.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",l);return a.attr("transform",`translate(${-t.width/2}, ${-t.height/2})`),p.attr("transform",`translate(${-s/2}, ${-o/2})`),tm(e,p),e.calcIntersect=function(t,e){return Am.rect(t,e)},e.intersect=function(t){return h.info("Cloud intersect",e,t),Am.rect(e,t)},r}async function fx(t,e){var{labelStyles:r,nodeStyles:i}=Jd(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:n}=await Ky(t,e,em(e));var r=a.width+8*s,l=(t=a.height+2*s,"neo"===e.look?`\n M${-r/2} ${t/2-5}\n v${10-t}\n q0,-5 5,-5\n h${r-10}\n q5,0 5,5\n v${t-5}\n H${-r/2}\n Z\n `:`\n M${-r/2} ${t/2-5}\n v${10-t}\n q0,-5 5,-5\n h${r-10}\n q5,0 5,5\n v${t-10}\n q0,5 -5,5\n h${-(r-10)}\n q-5,0 -5,-5\n Z\n `);if(e.domId)return i=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",l),o.append("line").attr("class","node-line-").attr("x1",-r/2).attr("y1",t/2).attr("x2",r/2).attr("y2",t/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append((()=>n.node())),tm(e,i),e.calcIntersect=function(t,e){return Am.rect(t,e)},e.intersect=function(t){return Am.rect(e,t)},o;throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`)}async function yx(t,e){return zm(t,e,{padding:e.padding??0})}i(ux,"kanbanItem"),i(px,"bang"),i(gx,"cloud"),i(fx,"defaultMindmapNode"),i(yx,"mindmapCircle");var mx=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:IC},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:EC},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:DC},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:RC},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Km},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:tC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:zm},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:px},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:gx},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:LC},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:lC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:CC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:mC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:XC},{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:fC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:rC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:jC},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:qm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:OC},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:zC},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:PC},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:aC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:hC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:jm},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Um},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Gm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:xC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:QC},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:sC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:GC},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:TC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Xm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:eC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ZC},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:tx},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:iC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:VC},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:oC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$C},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:BC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:vC},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Im},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Nm},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:WC},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:NC},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:KC},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:MC},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:SC}],Cx=i((()=>{var t=[...Object.entries({state:qC,choice:Pm,note:_C,rectWithTitle:AC,labelRect:yC,iconSquare:pC,iconCircle:dC,icon:cC,iconRounded:uC,imageSquare:gC,anchor:Em,kanbanItem:ux,mindmapCircle:yx,defaultMindmapNode:fx,classBox:lx,erBox:ix,requirementBox:hx}),...mx.flatMap((t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map((e=>[e,t.handler]))))];return Object.fromEntries(t)}),"generateShapeMap"),xx=Cx();function bx(t){return t in xx}i(bx,"isValidShape");var kx=new Map;async function wx(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");var a=e.shape?xx[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",Pp(e.look)),e.tooltip&&o.attr("title",e.tooltip),kx.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}i(wx,"insertNode");var Tx=i(((t,e)=>{kx.set(e.id,t)}),"setNodeElem"),Sx=i((()=>{kx.clear()}),"clear"),vx=i((t=>{var e=kx.get(t.id),r=(h.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),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"),Bx=i(((t,e)=>{var r;return e?"translate("+-t.width/2+", "+-t.height/2+")":(e=t.x??0,r=t.y??0,"translate("+-(e+t.width/2)+", "+-(r+t.height/2)+")")}),"computeLabelTransform"),_x={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},Fx={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Lx(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Mx(t),e=Mx(e);var[t,r]=[t.x,t.y],[e,i]=[e.x,e.y];e-=t,t=i-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}i(Lx,"calculateDeltaAndAngle");var Mx=i((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),Ax=i((t=>({x:i((function(e,r,i){let o=0;var a=Mx(i[0]).x<Mx(i[i.length-1]).x?"left":"right",s=(r=(0===r&&Object.hasOwn(_x,t.arrowTypeStart)?(({angle:s,deltaX:n}=Lx(i[0],i[1])),o=_x[t.arrowTypeStart]*Math.cos(s)*(0<=n?1:-1)):r===i.length-1&&Object.hasOwn(_x,t.arrowTypeEnd)&&(({angle:s,deltaX:n}=Lx(i[i.length-1],i[i.length-2])),o=_x[t.arrowTypeEnd]*Math.cos(s)*(0<=n?1:-1)),Math.abs(Mx(e).x-Mx(i[i.length-1]).x)),Math.abs(Mx(e).y-Mx(i[i.length-1]).y)),n=Math.abs(Mx(e).x-Mx(i[0]).x),l=(i=Math.abs(Mx(e).y-Mx(i[0]).y),_x[t.arrowTypeStart]),h=_x[t.arrowTypeEnd];return r<h&&0<r&&s<h&&(s=h+1-r,o-=s*="right"==a?-1:1),n<l&&0<n&&i<l&&(h=l+1-n,o+=h*="right"==a?-1:1),Mx(e).x+o}),"x"),y:i((function(e,r,i){let o=0;var a=Mx(i[0]).y<Mx(i[i.length-1]).y?"down":"up",s=(r=(0===r&&Object.hasOwn(_x,t.arrowTypeStart)?(({angle:s,deltaY:n}=Lx(i[0],i[1])),o=_x[t.arrowTypeStart]*Math.abs(Math.sin(s))*(0<=n?1:-1)):r===i.length-1&&Object.hasOwn(_x,t.arrowTypeEnd)&&(({angle:s,deltaY:n}=Lx(i[i.length-1],i[i.length-2])),o=_x[t.arrowTypeEnd]*Math.abs(Math.sin(s))*(0<=n?1:-1)),Math.abs(Mx(e).y-Mx(i[i.length-1]).y)),Math.abs(Mx(e).x-Mx(i[i.length-1]).x)),n=Math.abs(Mx(e).y-Mx(i[0]).y),l=(i=Math.abs(Mx(e).x-Mx(i[0]).x),_x[t.arrowTypeStart]),h=_x[t.arrowTypeEnd];return r<h&&0<r&&s<h&&(s=h+1-r,o-=s*="up"==a?-1:1),n<l&&0<n&&i<l&&(h=l+1-n,o+=h*="up"==a?-1:1),Mx(e).y+o}),"y")})),"getLineFunctionsWithOffset"),Ex=i(((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&Ix(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&Ix(t,"end",e.arrowTypeEnd,r,i,o,a,s)}),"addEdgeMarkers"),Ox={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}},$x=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ix=i(((t,e,r,i,o,a,s=!1,n)=>{const l=Ox[r];var c=l&&$x.includes(l.type);l?(o=o+`_${a}-`+l.type+("start"===e?"Start":"End")+(s&&c?"-margin":""),n&&""!==n.trim()?(a=o+"_"+n.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(s=document.getElementById(o))&&((c=s.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach((t=>{t.setAttribute("stroke",n),l.fill&&t.setAttribute("fill",n)})),s.parentNode?.appendChild(c)),t.attr("marker-"+e,`url(${i}#${a})`)):t.attr("marker-"+e,`url(${i}#${o})`)):h.warn("Unknown arrow type: "+r)}),"addEdgeMarker"),Dx=i((t=>"string"==typeof t?t:yi()?.flowchart?.curve),"resolveEdgeCurveType"),qx=new Map,Px=new Map,zx=i((()=>{qx.clear(),Px.clear()}),"clear"),Rx=i((t=>t?"string"==typeof t?t:t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),Nx=i((async(t,e)=>{var r=yi(),i=dr(r),o=Jd(e).labelStyles,a=(o=(e.labelStyle=o,t.insert("g").attr("class","edgeLabel"))).insert("g").attr("class","label").attr("data-id",e.id),s="markdown"===e.labelType;s=await Yf(t,e.label,{style:Rx(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},r);a.node().appendChild(s),h.info("abc82",e,e.labelType);let n,l=s.getBBox(),c=l;if(i?(r=s.children[0],d=Ho(s),l=r.getBoundingClientRect(),c=l,d.attr("width",l.width),d.attr("height",l.height)):(r=Ho(s).select("text").node())&&"function"==typeof r.getBBox&&(c=r.getBBox()),a.attr("transform",Bx(c,i)),qx.set(e.id,o),e.width=l.width,e.height=l.height,e.startLabelLeft){var d=t.insert("g").attr("class","edgeTerminals");r=d.insert("g").attr("class","inner");let s=(n=a=await hm(r,e.startLabelLeft,Rx(e.labelStyle)||"",!1,!1)).getBBox();i&&(o=a.children[0],a=Ho(a),s=o.getBoundingClientRect(),a.attr("width",s.width),a.attr("height",s.height)),r.attr("transform",Bx(s,i)),Px.get(e.id)||Px.set(e.id,{}),Px.get(e.id).startLeft=d,Wx(n,e.startLabelLeft)}if(e.startLabelRight){a=(o=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let s=(n=r=await hm(a,e.startLabelRight,Rx(e.labelStyle)||"",!1,!1)).getBBox();i&&(d=r.children[0],r=Ho(r),s=d.getBoundingClientRect(),r.attr("width",s.width),r.attr("height",s.height)),a.attr("transform",Bx(s,i)),Px.get(e.id)||Px.set(e.id,{}),Px.get(e.id).startRight=o,Wx(n,e.startLabelRight)}if(e.endLabelLeft){r=(d=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let s=(n=a=await hm(d,e.endLabelLeft,Rx(e.labelStyle)||"",!1,!1)).getBBox();i&&(o=a.children[0],a=Ho(a),s=o.getBoundingClientRect(),a.attr("width",s.width),a.attr("height",s.height)),r.attr("transform",Bx(s,i)),Px.get(e.id)||Px.set(e.id,{}),Px.get(e.id).endLeft=d,Wx(n,e.endLabelLeft)}if(e.endLabelRight){a=(o=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let s=(n=r=await hm(o,e.endLabelRight,Rx(e.labelStyle)||"",!1,!1)).getBBox();i&&(d=r.children[0],t=Ho(r),s=d.getBoundingClientRect(),t.attr("width",s.width),t.attr("height",s.height)),a.attr("transform",Bx(s,i)),Px.get(e.id)||Px.set(e.id,{}),Px.get(e.id).endRight=o,Wx(n,e.endLabelRight)}return s}),"insertEdgeLabel");function Wx(t,e){dr(yi())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}i(Wx,"setTerminalWidth");var jx=i(((t,e)=>{h.debug("Moving label abc88 ",t.id,t.label,qx.get(t.id),e);var r=e.updatedPath||e.originalPath,i=yi();i=Rp(i).subGraphTitleTotalMargin;if(t.label){var o=qx.get(t.id);let s=t.x,n=t.y;r&&(a=$p.calcLabelPosition(r),h.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath)&&(s=a.x,n=a.y),o.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){e=Px.get(t.id).startLeft;let i=t.x,o=t.y;r&&(i=(a=$p.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r)).x,o=a.y),e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){o=Px.get(t.id).startRight;let e=t.x,a=t.y;r&&(e=(i=$p.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r)).x,a=i.y),o.attr("transform",`translate(${e}, ${a})`)}if(t.endLabelLeft){var a=Px.get(t.id).endLeft;let i=t.x,o=t.y;r&&(i=(e=$p.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r)).x,o=e.y),a.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){i=Px.get(t.id).endRight;let e=t.x,a=t.y;r&&(e=(o=$p.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r)).x,a=o.y),i.attr("transform",`translate(${e}, ${a})`)}}),"positionEdgeLabel"),Hx=i(((t,e)=>{var r,i,o;return!(t?.isLabelEdge&&t?.id?.endsWith("-to-label")&&Array.isArray(e))||2!==e.length||([t,r]=e,i=Math.abs(r.x-t.x),o=Math.abs(r.y-t.y),i<.001)||o<.001?e:i<=o?[t,{x:t.x,y:r.y},r]:[t,{x:r.x,y:t.y},r]}),"orthogonalizeToLabelClippedPoints"),Ux=i(((t,e)=>{var r=t.x,i=t.y;r=Math.abs(e.x-r),e=Math.abs(e.y-i),i=t.width/2,t=t.height/2;return i<=r||t<=e}),"outsideNode"),Yx=i(((t,e,r)=>{h.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);var 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;a=t.height/2,t=Math.abs(e.y-r.y);var l=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*a)return n=l*(o=r.y<e.y?e.y-a-o:o-a-e.y)/t,a={x:r.x<e.x?r.x+n:r.x-l+n,y:r.y<e.y?r.y+t-o:r.y-t+o},0===n&&(a.x=e.x,a.y=e.y),0===l&&(a.x=e.x),0===t&&(a.y=e.y),h.debug(`abc89 top/bottom calc, Q ${t}, q ${o}, R ${l}, r `+n,a),a;{o=t*(n=r.x<e.x?e.x-s-i:i-s-e.x)/l;let a=r.x<e.x?r.x+l-n:r.x-l+n,c=r.y<e.y?r.y+o:r.y-o;return h.debug(`sides calc abc89, Q ${t}, q ${o}, R ${l}, r `+n,{_x:a,_y:c}),0===n&&(a=e.x,c=e.y),0===l&&(a=e.x),0===t&&(c=e.y),{x:a,y:c}}}),"intersection"),Gx=i(((t,e)=>{h.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach((t=>{if(h.info("abc88 checking point",t,e),Ux(e,t)||o)h.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=Yx(e,i,t);h.debug("abc88 inside",t,i,a),h.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))?h.warn("abc88 no intersect",a,r):r.push(a),o=!0}})),h.debug("returning points",r),r}),"cutPathAtIntersect");function Xx(t){var e=[],r=[];for(let s=1;s<t.length-1;s++){var i=t[s-1],o=t[s],a=t[s+1];(i.x===o.x&&o.y===a.y&&5<Math.abs(o.x-a.x)&&5<Math.abs(o.y-i.y)||i.y===o.y&&o.x===a.x&&5<Math.abs(o.x-i.x)&&5<Math.abs(o.y-a.y))&&(e.push(o),r.push(s))}return{cornerPoints:e,cornerPointPositions:r}}i(Xx,"extractCornerPoints");var Vx=i((function(t,e,r){var i=e.x-t.x;t=e.y-t.y,r/=Math.sqrt(i*i+t*t);return{x:e.x-r*i,y:e.y-r*t}}),"findAdjacentPoint"),Zx=i((function(t){var e=Xx(t).cornerPointPositions,r=[];for(let u=0;u<t.length;u++)if(e.includes(u)){var i=t[u-1],o=t[u+1],a=t[u],s=Vx(i,a,5),n=Vx(o,a,5),l=n.x-s.x,c=n.y-s.y,d=(r.push(s),2*Math.sqrt(2));let e={x:a.x,y:a.y};10<Math.abs(o.x-i.x)&&10<=Math.abs(o.y-i.y)?(h.debug("Corner point fixing",Math.abs(o.x-i.x),Math.abs(o.y-i.y)),e=a.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:c<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:c<0?s.y-5+d:s.y+5-d}):h.debug("Corner point skipping fixing",Math.abs(o.x-i.x),Math.abs(o.y-i.y)),r.push(e,n)}else r.push(t[u]);return r}),"fixCorners"),Qx=i(((t,e,r)=>(t=Math.floor((t-e-r)/4),`0 ${e} ${Array(t).fill("2 2").join(" ")} `+r)),"generateDashArray"),Kx=i((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`);var{handDrawnSeed:l,layout:c}=yi();let d=e.points,u=!1;var p=[];for(const t in e.cssCompiledStyles)Kd(t)||p.push(e.cssCompiledStyles[t]);"swimlane"===c?(a.intersect&&o.intersect&&Array.isArray(d)&&2<=d.length&&(d=2===d.length?[o.intersect(d[0]),a.intersect(d[1])]:(y=(c=d.slice(1,-1))[0],x=c[c.length-1],g=Math.abs(d[d.length-1].x-x.x)<.5&&Math.abs(d[d.length-1].y-x.y)<.5,C=o.intersect(y),g=g?x:a.intersect(x),x=Math.abs(g.x-x.x)<.5&&Math.abs(g.y-x.y)<.5?[]:[g],[...Math.abs(C.x-y.x)<.5&&Math.abs(C.y-y.y)<.5?[]:[C],...c,...x])),d=Hx(e,d)):a.intersect&&o.intersect&&!n&&((d=d.slice(1,e.points.length-1)).unshift(o.intersect(d[0])),d.push(a.intersect(d[d.length-1])));var g=btoa(JSON.stringify(d));e.toCluster&&(h.info("to cluster abc88",r.get(e.toCluster)),d=Gx(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(h.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(d,null,2)),d=Gx(d.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let f=d.filter((t=>!Number.isNaN(t.y)));var y=Dx(e.curve);"rounded"!==y&&(f=Zx(f));let m=fn;switch(y){case"linear":case"rounded":m=fn;break;case"basis":default:m=vn;break;case"cardinal":m=En;break;case"bumpX":m=bn;break;case"bumpY":m=kn;break;case"catmullRom":m=zn;break;case"monotoneX":m=Kn;break;case"monotoneY":m=Jn;break;case"natural":m=rl;break;case"step":m=ol;break;case"stepAfter":m=sl;break;case"stepBefore":m=al}var{x:C,y:c}=Ax(e),x=Cn().x(C).y(c).curve(m);let b,k;switch(e.thickness){case"normal":default:b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible"}switch(e.pattern){case"solid":default:b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed"}n="rounded"===y?Jx(eb(f,e),5):x(f);let w=(o=Array.isArray(e.style)?e.style:[e.style]).find((t=>t?.startsWith("stroke:"))),T="",S=(e.animate&&(T="edge-animation-fast"),e.animation&&(T="edge-animation-"+e.animation),!1),v=("handDrawn"===e.look?(a=Qy.svg(t),Object.assign([],f),b+=" transition",C=(k=Ho(r=a.path(n,{roughness:.3,seed:l})).select("path").attr("id",s+"-"+e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(T?" "+T:"")).attr("style",o?o.reduce(((t,e)=>t+";"+e),""):"")).attr("d"),k.attr("d",C),t.node().appendChild(k.node())):(c=p.join(";"),y=o?o.reduce(((t,e)=>t+e+";"),""):"",x=(c?c+";"+y+";":y)+";"+(o?o.reduce(((t,e)=>t+";"+e),""):""),k=t.append("path").attr("d",n).attr("id",s+"-"+e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")+(T?" "+T:"")).attr("style",x),w=x.match(/stroke:([^;]+)/)?.[1],S=!0===e.animate||!!e.animation||c.includes("animation"),l="function"==typeof(a=k.node()).getTotalLength?a.getTotalLength():0,r=Fx[e.arrowTypeStart]||0,C=Fx[e.arrowTypeEnd]||0,"neo"!==e.look||S||(y="dotted"===e.pattern||"dashed"===e.pattern?Qx(l,r,C):`0 ${r} ${l-r-C} `+C,k.attr("style",`stroke-dasharray: ${y}; stroke-dashoffset: 0;`+k.attr("style")))),k.attr("data-edge",!0),k.attr("data-et","edge"),k.attr("data-id",e.id),k.attr("data-points",g),k.attr("data-look",Pp(e.look)),e.showPoints&&f.forEach((e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)})),"");return(yi().flowchart.arrowMarkerAbsolute||yi().state.arrowMarkerAbsolute)&&(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.info("arrowTypeStart",e.arrowTypeStart),h.info("arrowTypeEnd",e.arrowTypeEnd),Ex(k,e,v,s,i,o=!S&&"neo"===e?.look,w),x=d[n=Math.floor(d.length/2)],c={},(u=!$p.isLabelCoordinateInPath(x,k.attr("d"))||u)&&(c.updatedPath=d),c.originalPath=e.points,c}),"insertEdge");function Jx(t,e){if(t.length<2)return"";let r="";var i=t.length;for(let u=0;u<i;u++){var o,a,s,n,l,h=t[u],c=t[u-1],d=t[u+1];0===u?r+=`M${h.x},`+h.y:u===i-1||(l=h.x-c.x,c=h.y-c.y,o=d.x-h.x,d=d.y-h.y,s=Math.hypot(l,c),n=Math.hypot(o,d),s<1e-5)||n<1e-5||(l/=s,c/=s,o/=n,d/=n,a=Math.max(-1,Math.min(1,l*o+c*d)),(a=Math.acos(a))<1e-5)||Math.abs(Math.PI-a)<1e-5?r+=`L${h.x},`+h.y:(a=Math.min(e/Math.sin(a/2),s/2,n/2),s=h.x-l*a,n=h.y-c*a,l=h.x+o*a,c=h.y+d*a,r=(r+=`L${s},`+n)+`Q${h.x},${h.y} ${l},`+c)}return r}function tb(t,e){var r;return t&&e?(r=e.x-t.x,e=e.y-t.y,{angle:Math.atan2(e,r),deltaX:r,deltaY:e}):{angle:0,deltaX:0,deltaY:0}}function eb(t,e){var r,i,o,a=t.map((t=>({...t}))),s=(2<=t.length&&_x[e.arrowTypeStart]&&(o=_x[e.arrowTypeStart],s=tb(i=t[0],t[1]).angle,r=o*Math.cos(s),o*=Math.sin(s),a[0].x=i.x+r,a[0].y=i.y+o),t.length);return 2<=s&&_x[e.arrowTypeEnd]&&(r=_x[e.arrowTypeEnd],i=t[s-1],o=tb(t[s-2],i).angle,e=r*Math.cos(o),t=r*Math.sin(o),a[s-1].x=i.x-e,a[s-1].y=i.y-t),a}i(Jx,"generateRoundedPath"),i(tb,"calculateDeltaAndAngle"),i(eb,"applyMarkerOffsetsToPoints");var rb=i(((t,e,r,i)=>{e.forEach((e=>{vb[e](t,r,i)}))}),"insertMarkers"),ib=i(((t,e,r)=>{h.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"),ob=i(((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"),ab=i(((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"),sb=i(((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"),nb=i(((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"),lb=i(((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"),hb=i(((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"),cb=i(((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"),db=i(((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"),ub=i(((t,e,r)=>{var i=(i=rr().themeVariables).transitionColor;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",""+i)}),"barbNeo"),pb=i(((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"),gb=i(((t,e,r)=>{var i;(i=((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")).append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18"),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"))).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")}),"zero_or_one"),fb=i(((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"),yb=i(((t,e,r)=>{var i;(i=((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")).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"),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"))).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"zero_or_more"),mb=i(((t,e,r)=>{var i=(i=rr().themeVariables).strokeWidth;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",""+i),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",""+i)}),"only_one_neo"),Cb=i(((t,e,r)=>{var i,o=rr().themeVariables,{strokeWidth:o,mainBkg:a}=o;(i=((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").attr("markerUnits","userSpaceOnUse")).append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",""+o).attr("r",6),i.append("path").attr("d","M9,0 L9,18").attr("stroke-width",""+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("markerUnits","userSpaceOnUse").attr("orient","auto"))).append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",""+o).attr("r",6),i.append("path").attr("d","M21,0 L21,18").attr("stroke-width",""+o)}),"zero_or_one_neo"),xb=i(((t,e,r)=>{var i=(i=rr().themeVariables).strokeWidth;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",""+i),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",""+i)}),"one_or_more_neo"),bb=i(((t,e,r)=>{var i,o=rr().themeVariables,{strokeWidth:o,mainBkg:a}=o;(i=((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("markerUnits","userSpaceOnUse").attr("orient","auto")).append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",""+o),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",""+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").attr("markerUnits","userSpaceOnUse"))).append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",""+o),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",""+o)}),"zero_or_more_neo"),kb=i(((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"),wb=i(((t,e,r)=>{var i=(i=rr().themeVariables).strokeWidth;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",""+i).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"),Tb=i(((t,e,r)=>{(t=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")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)}),"requirement_contains"),Sb=i(((t,e,r)=>{var i=(i=rr().themeVariables).strokeWidth;(t=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")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),t.selectAll("*").attr("stroke-width",""+i)}),"requirement_contains_neo"),vb={extension:ib,composition:ob,aggregation:ab,dependency:sb,lollipop:nb,point:lb,circle:hb,cross:cb,barb:db,barbNeo:ub,only_one:pb,zero_or_one:gb,one_or_more:fb,zero_or_more:yb,only_one_neo:mb,zero_or_one_neo:Cb,one_or_more_neo:xb,zero_or_more_neo:bb,requirement_arrow:kb,requirement_contains:Tb,requirement_arrow_neo:wb,requirement_contains_neo:Sb},Bb=rb,_b={common:Yr,getConfig:rr,insertCluster:xm,insertEdge:Kx,insertEdgeLabel:Nx,insertMarkers:Bb,insertNode:wx,interpolateToCurve:ap,labelHelper:Ky,log:h,positionEdgeLabel:jx},Fb={},Lb=i((t=>{for(const e of t)Fb[e.name]=e}),"registerLayoutLoaders"),Mb=(i((()=>{Lb([{name:"dagre",loader:i((async()=>import("./dagre-VKFMJZFB-c5b9a4a0.js")),"loader")},{name:"swimlane",loader:i((async()=>import("./swimlanes-5IMT3BWC-5834b232.js")),"loader")},{name:"cose-bilkent",loader:i((async()=>import("./cose-bilkent-JH36ORCC-ac4d2e28.js")),"loader")}])}),"registerDefaultLayoutLoaders")(),i((async(t,e,r)=>{if(!(t.layoutAlgorithm in Fb))throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm);if(t.diagramId)for(const e of t.nodes){var i=e.domId||e.id;e.domId=t.diagramId+"-"+i}var o=Fb[t.layoutAlgorithm],a=await o.loader(),{theme:s,themeVariables:n}=t.config,{useGradient:n,gradientStart:l,gradientStop:h}=n,c=e.attr("id");return e.append("defs").append("filter").attr("id",c+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",s?.includes("dark")?"#FFFFFF":"#000000"),e.append("defs").append("filter").attr("id",c+"-drop-shadow-small").attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",s?.includes("dark")?"#FFFFFF":"#000000"),n&&((c=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%")).append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)),a.render(t,e,_b,{algorithm:o.algorithm},r)}),"render")),Ab=i(((t="",{fallback:e="dagre"}={})=>{if(t in Fb)return t;if(e in Fb)return h.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"),Eb="comm",Ob="rule",$b="decl",Ib="@keyframes",Db="@layer",qb=Math.abs,Pb=String.fromCharCode;function zb(t){return t.trim()}function Rb(t,e,r){return t.replace(e,r)}function Nb(t,e){return 0|t.charCodeAt(e)}function Wb(t,e,r){return t.slice(e,r)}function jb(t){return t.length}function Hb(t){return t.length}function Ub(t,e){return e.push(t),t}var Yb=1,Gb=1,Xb=0,Vb=0,Zb=0,Qb="";function Kb(t,e,r,i,o,a,s,n){return{value:t,root:e,parent:r,type:i,props:o,children:a,line:Yb,column:Gb,length:s,return:"",siblings:n}}function Jb(){return Zb=Vb<Xb?Nb(Qb,Vb++):0,Gb++,10===Zb&&(Gb=1,Yb++),Zb}function tk(){return Nb(Qb,Vb)}function ek(){return Vb}function rk(t,e){return Wb(Qb,t,e)}function ik(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 ok(t){return zb(rk(Vb-1,nk(91===t?t+2:40===t?t+1:t)))}function ak(t){for(;(Zb=tk())&&Zb<33;)Jb();return 2<ik(t)||3<ik(Zb)?"":" "}function sk(t,e){for(;--e&&Jb()&&!(Zb<48||102<Zb||57<Zb&&Zb<65||70<Zb&&Zb<97););return rk(t,ek()+(e<6&&32==tk()&&32==Jb()))}function nk(t){for(;Jb();)switch(Zb){case t:return Vb;case 34:case 39:34!==t&&39!==t&&nk(Zb);break;case 40:41===t&&nk(t);break;case 92:Jb()}return Vb}function lk(t,e){for(;Jb()&&t+Zb!==57&&(t+Zb!==84||47!==tk()););return"/*"+rk(e,Vb-1)+"*"+Pb(47===t?t:Jb())}function hk(t){for(;!ik(tk());)Jb();return rk(t,Vb)}function ck(t){return function(t){return Qb="",t}(dk("",null,null,null,[""],t=function(t){return Yb=Gb=1,Xb=jb(Qb=t),Vb=0,[]}(t),0,[0],t))}function dk(t,e,r,i,o,a,s,n,l){for(var h,c,d,u=0,p=0,g=s,f=0,y=0,m=1,C=1,x=1,b=0,k=0,w="",T=o,S=w;C;)switch(h=k,k=Jb()){case 40:108!=h&&58==Nb(S,g-1)?(b++,S+="("):S+=ok(k);break;case 41:b--,S+=")";break;case 34:case 39:case 91:S+=ok(k);break;case 9:case 10:case 13:case 32:S+=0<b?Pb(k):ak(h);break;case 92:S+=sk(ek()-1,7);continue;case 47:switch(tk()){case 42:case 47:Ub(pk(lk(Jb(),ek()),e,r,l),l),5!=ik(h||1)&&5!=ik(tk()||1)||!jb(S)||" "===Wb(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*m:n[u++]=jb(S)*x;case 125*m:case 59:case 0:if(0<b&&k)S+=Pb(k);else{switch(k){case 0:case 125:C=0;case 59+p:-1==x&&(S=Rb(S,/\f/g,"")),0<y&&(jb(S)-g||0===m)&&Ub(32<y?gk(S+";",i,r,g-1,l):gk(Rb(S," ","")+";",i,r,g-2,l),l);break;case 59:S+=";";default:if(Ub(d=uk(S,e,r,u,p,o,n,w,T=[],c=[],g,a),a),123===k)if(0===p)dk(S,e,d,d,T,a,g,n,c);else{switch(f){case 99:if(110===Nb(S,3))break;case 108:if(97===Nb(S,2))break;default:p=0;case 100:case 109:case 115:}p?dk(t,d,d,i&&Ub(uk(t,d,d,0,0,o,n,w,o,T=[],g,c),c),o,c,g,n,i?T:c):dk(S,d,d,d,[""],c,0,n,c)}}u=p=y=0,m=x=1,w=S="",g=s}break;case 58:g=1+jb(S),y=h;default:if(m<1)if(123==k)--m;else if(125==k&&0==m++&&125==(Zb=0<Vb?Nb(Qb,--Vb):0,Gb--,10===Zb&&(Gb=1,Yb--),Zb))continue;switch(S+=Pb(k),k*m){case 38:x=0<p?1:(S+="\f",-1);break;case 44:0<b||(n[u++]=(jb(S)-1)*x,x=1);break;case 64:45===tk()&&(S+=ok(Jb())),f=tk(),p=g=jb(w=S+=hk(ek())),k++;break;case 45:45===h&&2==jb(S)&&(m=0)}}return a}function uk(t,e,r,i,o,a,s,n,l,h,c,d){for(var u,p=o-1,g=0===o?a:[""],f=Hb(g),y=0,m=0;y<i;++y)for(var C,x=0,b=Wb(t,p+1,p=qb(u=s[y]));x<f;++x)(C=zb(0<u?g[x]+" "+b:Rb(b,/&\f/g,g[x])))&&(l[m++]=C);return Kb(t,e,r,0===o?Ob:n,l,h,c,d)}function pk(t,e,r,i){return Kb(t,e,r,Eb,Pb(Zb),Wb(t,2,-2),0,i)}function gk(t,e,r,i,o){return Kb(t,e,r,$b,Wb(t,0,i),Wb(t,i+1,-1),i,o)}function fk(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function yk(t,e,r,i){switch(t.type){case Db:if(t.children.length)break;case"@import":case"@namespace":case $b:return t.return=t.return||t.value;case Eb:return"";case Ib:return t.return=t.value+"{"+fk(t.children,i)+"}";case Ob:if(!jb(t.value=t.props.join(",")))return""}return jb(r=fk(t.children,i))?t.return=t.value+"{"+r+"}":""}var mk=i((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),Ck={id:"c4",detector:mk,loader:i((async()=>({id:"c4",diagram:(await import("./c4Diagram-LMCZKHZV-d7fc839e.js")).diagram})),"loader")},xk="flowchart",bk=i(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),kk=i((async()=>{var t=(await import("./flowDiagram-23GEKE2U-7ab9c2e4.js")).diagram;return{id:xk,diagram:t}}),"loader"),wk={id:xk,detector:bk,loader:kk},Tk="flowchart-v2",Sk=i(((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"),vk=i((async()=>{var t=(await import("./flowDiagram-23GEKE2U-7ab9c2e4.js")).diagram;return{id:Tk,diagram:t}}),"loader"),Bk={id:Tk,detector:Sk,loader:vk},_k="swimlane",Fk=i((t=>/^\s*swimlane-beta\b/.test(t)),"detector"),Lk=i((async()=>{var t=(await import("./swimlanesDiagram-G3AALYLV-89220ddd.js")).diagram;return{id:_k,diagram:t}}),"loader"),Mk={id:_k,detector:Fk,loader:Lk},Ak=i((t=>/^\s*erDiagram/.test(t)),"detector"),Ek={id:"er",detector:Ak,loader:i((async()=>({id:"er",diagram:(await import("./erDiagram-Q63AITRT-1febb8fc.js")).diagram})),"loader")},Ok="gitGraph",$k=i((t=>/^\s*gitGraph/.test(t)),"detector"),Ik=i((async()=>{var t=(await import("./gitGraphDiagram-IHSO6WYX-2964ff91.js")).diagram;return{id:Ok,diagram:t}}),"loader"),Dk={id:Ok,detector:$k,loader:Ik},qk="gantt",Pk=i((t=>/^\s*gantt/.test(t)),"detector"),zk=i((async()=>{var t=(await import("./ganttDiagram-NO4QXBWP-bd530d12.js")).diagram;return{id:qk,diagram:t}}),"loader"),Rk={id:qk,detector:Pk,loader:zk},Nk="info",Wk=i((t=>/^\s*info/.test(t)),"detector"),jk=i((async()=>{var t=(await import("./infoDiagram-FWYZ7A6U-5b9d28af.js")).diagram;return{id:Nk,diagram:t}}),"loader"),Hk={id:Nk,detector:Wk,loader:jk},Uk=i((t=>/^\s*pie/.test(t)),"detector"),Yk={id:"pie",detector:Uk,loader:i((async()=>({id:"pie",diagram:(await import("./pieDiagram-ENE6RG2P-af928526.js")).diagram})),"loader")},Gk="quadrantChart",Xk=i((t=>/^\s*quadrantChart/.test(t)),"detector"),Vk=i((async()=>{var t=(await import("./quadrantDiagram-ABIIQ3AL-9110fa9c.js")).diagram;return{id:Gk,diagram:t}}),"loader"),Zk={id:Gk,detector:Xk,loader:Vk},Qk="xychart",Kk=i((t=>/^\s*xychart(-beta)?/.test(t)),"detector"),Jk=i((async()=>{var t=(await import("./xychartDiagram-FW5EYKEG-d77187fe.js")).diagram;return{id:Qk,diagram:t}}),"loader"),tw={id:Qk,detector:Kk,loader:Jk},ew="requirement",rw=i((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),iw=i((async()=>{var t=(await import("./requirementDiagram-TGXJPOKE-a7960859.js")).diagram;return{id:ew,diagram:t}}),"loader"),ow={id:ew,detector:rw,loader:iw},aw="sequence",sw=i((t=>/^\s*sequenceDiagram/.test(t)),"detector"),nw=i((async()=>{var t=(await import("./sequenceDiagram-DBY2YBRQ-4121f7c2.js")).diagram;return{id:aw,diagram:t}}),"loader"),lw={id:aw,detector:sw,loader:nw},hw="class",cw=i(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),dw=i((async()=>{var t=(await import("./classDiagram-OUVF2IWQ-d51bd736.js")).diagram;return{id:hw,diagram:t}}),"loader"),uw={id:hw,detector:cw,loader:dw},pw="classDiagram",gw=i(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),fw=i((async()=>{var t=(await import("./classDiagram-v2-EOCWNBFH-d51bd736.js")).diagram;return{id:pw,diagram:t}}),"loader"),yw={id:pw,detector:gw,loader:fw},mw="state",Cw=i(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),xw=i((async()=>{var t=(await import("./stateDiagram-2N3HPSRC-527374a2.js")).diagram;return{id:mw,diagram:t}}),"loader"),bw={id:mw,detector:Cw,loader:xw},kw="stateDiagram",ww=i(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),Tw=i((async()=>{var t=(await import("./stateDiagram-v2-6OUMAXLB-e5921044.js")).diagram;return{id:kw,diagram:t}}),"loader"),Sw={id:kw,detector:ww,loader:Tw},vw="journey",Bw=i((t=>/^\s*journey/.test(t)),"detector"),_w=i((async()=>{var t=(await import("./journeyDiagram-5HDEW3XC-c8c8d701.js")).diagram;return{id:vw,diagram:t}}),"loader"),Fw={id:vw,detector:Bw,loader:_w},Lw=i(((t,e,r)=>{h.debug("rendering svg for syntax error\n");var i=(e=ll(e)).append("g");e.attr("viewBox","0 0 2412 512"),Vr(e,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),Mw={draw:Lw},Aw=Mw,Ew={db:{},renderer:Mw,parser:{parse:i((()=>{}),"parse")}},Ow="flowchart-elk",$w=i(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),Iw=i((async()=>{var t=(await import("./flowDiagram-23GEKE2U-7ab9c2e4.js")).diagram;return{id:Ow,diagram:t}}),"loader"),Dw={id:Ow,detector:$w,loader:Iw},qw="timeline",Pw=i((t=>/^\s*timeline/.test(t)),"detector"),zw=i((async()=>{var t=(await import("./timeline-definition-FHXFAJF6-0482a67a.js")).diagram;return{id:qw,diagram:t}}),"loader"),Rw={id:qw,detector:Pw,loader:zw},Nw="mindmap",Ww=i((t=>/^\s*mindmap/.test(t)),"detector"),jw=i((async()=>{var t=(await import("./mindmap-definition-LN4V7U3C-f495948c.js")).diagram;return{id:Nw,diagram:t}}),"loader"),Hw={id:Nw,detector:Ww,loader:jw},Uw="kanban",Yw=i((t=>/^\s*kanban/.test(t)),"detector"),Gw=i((async()=>{var t=(await import("./kanban-definition-HUTT4EX6-7bc0cd1e.js")).diagram;return{id:Uw,diagram:t}}),"loader"),Xw={id:Uw,detector:Yw,loader:Gw},Vw="sankey",Zw=i((t=>/^\s*sankey(-beta)?/.test(t)),"detector"),Qw=i((async()=>{var t=(await import("./sankeyDiagram-HTMAVEWB-3c852fda.js")).diagram;return{id:Vw,diagram:t}}),"loader"),Kw={id:Vw,detector:Zw,loader:Qw},Jw="packet",tT=i((t=>/^\s*packet(-beta)?/.test(t)),"detector"),eT=i((async()=>{var t=(await import("./diagram-NH7WQ7WH-0e4f7f17.js")).diagram;return{id:Jw,diagram:t}}),"loader"),rT={id:Jw,detector:tT,loader:eT},iT="radar",oT=i((t=>/^\s*radar-beta/.test(t)),"detector"),aT=i((async()=>{var t=(await import("./diagram-WEI45ONY-0241463f.js")).diagram;return{id:iT,diagram:t}}),"loader"),sT={id:iT,detector:oT,loader:aT},nT="block",lT=i((t=>/^\s*block(-beta)?/.test(t)),"detector"),hT=i((async()=>{var t=(await import("./blockDiagram-677ZJIJ3-88bd543c.js")).diagram;return{id:nT,diagram:t}}),"loader"),cT={id:nT,detector:lT,loader:hT},dT="treeView",uT=i((t=>/^\s*treeView-beta/.test(t)),"detector"),pT=i((async()=>{var t=(await import("./diagram-OA4YK3LP-0fba2475.js")).diagram;return{id:dT,diagram:t}}),"loader"),gT={id:dT,detector:uT,loader:pT},fT="architecture",yT=i((t=>/^\s*architecture/.test(t)),"detector"),mT=i((async()=>{var t=(await import("./architectureDiagram-ZJ3FMSHR-93988e41.js")).diagram;return{id:fT,diagram:t}}),"loader"),CT={id:fT,detector:yT,loader:mT},xT="eventmodeling",bT=i((t=>/^\s*eventmodeling/.test(t)),"detector"),kT=i((async()=>{var t=(await import("./diagram-FQU43EPY-d256050e.js")).diagram;return{id:xT,diagram:t}}),"loader"),wT={id:xT,detector:bT,loader:kT},TT="ishikawa",ST=i((t=>/^\s*ishikawa(-beta)?\b/i.test(t)),"detector"),vT=i((async()=>{var t=(await import("./ishikawaDiagram-FXEZZL3T-89c1b2f4.js")).diagram;return{id:TT,diagram:t}}),"loader"),BT={id:TT,detector:ST,loader:vT},_T="venn",FT=i((t=>/^\s*venn-beta/.test(t)),"detector"),LT=i((async()=>{var t=(await import("./vennDiagram-L72KCM5P-05176193.js")).diagram;return{id:_T,diagram:t}}),"loader"),MT={id:_T,detector:FT,loader:LT},AT="treemap",ET=i((t=>/^\s*treemap/.test(t)),"detector"),OT=i((async()=>{var t=(await import("./diagram-G47NLZAW-813bbb70.js")).diagram;return{id:AT,diagram:t}}),"loader"),$T={id:AT,detector:ET,loader:OT},IT="wardley",DT=i((t=>/^\s*wardley-beta/i.test(t)),"detector"),qT=i((async()=>{var t=(await import("./wardleyDiagram-EHGQE667-052e6de9.js")).diagram;return{id:IT,diagram:t}}),"loader"),PT={id:IT,detector:DT,loader:qT},zT="cynefin",RT=i((t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t)),"detector"),NT=i((async()=>{var t=(await import("./cynefinDiagram-TSTJHNR4-62a29383.js")).diagram;return{id:zT,diagram:t}}),"loader"),WT={id:zT,detector:RT,loader:NT},jT="railroad",HT=i((t=>/^\s*railroad-beta/i.test(t)),"detector"),UT=i((async()=>{var t=(await import("./railroadDiagram-RFXS5EU6-effa5611.js")).diagram;return{id:jT,diagram:t}}),"loader"),YT={id:jT,detector:HT,loader:UT},GT="railroadEbnf",XT=i((t=>/^\s*railroad-ebnf-beta/i.test(t)),"detector"),VT=i((async()=>{var t=(await import("./ebnfDiagram-CCIWWBDH-ead44055.js")).diagram;return{id:GT,diagram:t}}),"loader"),ZT={id:GT,detector:XT,loader:VT},QT="railroadAbnf",KT=i((t=>/^\s*railroad-abnf-beta/i.test(t)),"detector"),JT=i((async()=>{var t=(await import("./abnfDiagram-VRR7QNED-3cfb3856.js")).diagram;return{id:QT,diagram:t}}),"loader"),tS={id:QT,detector:KT,loader:JT},eS="railroadPeg",rS=i((t=>/^\s*railroad-peg-beta/i.test(t)),"detector"),iS=i((async()=>{var t=(await import("./pegDiagram-2B236MQR-2826e278.js")).diagram;return{id:eS,diagram:t}}),"loader"),oS={id:eS,detector:rS,loader:iS},aS=!1,sS=i((()=>{aS||(aS=!0,Ti("error",Ew,(t=>"error"===t.toLowerCase().trim())),Ti("---",{db:{clear:i((()=>{}),"clear")},styles:{},renderer:{draw:i((()=>{}),"draw")},parser:{parse:i((()=>{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:i((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),Cr(Dw,Hw,CT),Cr(Ck,Xw,yw,uw,Ek,Rk,Hk,Yk,ow,lw,Mk,Bk,wk,Rw,Dk,Sw,bw,Fw,Zk,Kw,rT,tw,cT,wT,gT,sT,BT,$T,YT,ZT,tS,oS,MT,PT,WT))}),"addDiagrams"),nS=i((async()=>{h.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(yr).map((async([t,{detector:e,loader:r}])=>{if(r)try{Si(t)}catch{try{var{diagram:i,id:o}=await r();Ti(o,i,e)}catch(e){throw h.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete yr[t],e}}})))).filter((t=>"rejected"===t.status));if(0<t.length){h.error(`Failed to load ${t.length} external diagrams`);for(const e of t)h.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),lS="graphics-document document";function hS(t,e){t.attr("role",lS),""!==e&&t.attr("aria-roledescription",e)}function cS(t,e,r,i){var o;void 0!==t.insert&&(r&&(t.attr("aria-describedby",o="chart-desc-"+i),t.insert("desc",":first-child").attr("id",o).text(r)),e)&&(t.attr("aria-labelledby",o="chart-title-"+i),t.insert("title",":first-child").attr("id",o).text(e))}i(hS,"setA11yDiagramInfo"),i(cS,"addSVGa11yTitleDescription");var dS=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{i(this,"Diagram")}static async fromText(e,r={}){var i=rr(),o=mr(e,i);e=Ip(e)+"\n";try{Si(o)}catch{var a;if(!(a=br(o)))throw new fr(`Diagram ${o} not found.`);var{id:a,diagram:s}=await a();Ti(a,s)}var{db:a,parser:s,renderer:n,init:l}=Si(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}},uS=[],pS=i((()=>{uS.forEach((t=>{t()})),uS=[]}),"attachFunctions"),gS=i((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function fS(t){var e=t.match(ur);if(!e)return{text:t,metadata:{}};const r=e[1];var i=r?e[2].split("\n").map((t=>t.startsWith(r)?t.slice(r.length):t)).join("\n"):e[2],o={};return(i="object"!=typeof(i=Xd(i,{schema:Gd})??{})||Array.isArray(i)?{}:i).displayMode&&(o.displayMode=i.displayMode.toString()),i.title&&(o.title=i.title.toString()),i.config&&(o.config=i.config),{text:t.slice(e[0].length),metadata:o}}i(fS,"extractFrontMatter");var yS=i((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),mS=i((t=>{var{text:t,metadata:e}=fS(t),{displayMode:e,title:r,config:i={}}=e;return e&&(i.gantt||(i.gantt={}),i.gantt.displayMode=e),{title:r,config:i,text:t}}),"processFrontmatter"),CS=i((t=>{var e=$p.detectInit(t)??{},r=$p.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===r?.type&&(e.wrap=!0),{text:ip(t),directive:e}}),"processDirectives");function xS(t){var e=yS(t),r=(e=mS(e),CS(e.text)),i=Op(e.config,r.directive);return{code:t=gS(r.text),title:e.title,config:i}}function bS(t){return t=(new TextEncoder).encode(t),t=Array.from(t,(t=>String.fromCodePoint(t))).join(""),btoa(t)}i(xS,"preprocessDiagram"),i(bS,"toBase64");var kS=["foreignobject"],wS=["dominant-baseline"];function TS(t){return t=xS(t),ar(),or(t.config??{}),t}async function SS(t,e){sS();try{var{code:r,config:i}=TS(t);return{diagramType:(await DS(r)).type,config:i}}catch(t){if(e?.suppressErrors)return!1;throw t}}i(TS,"processAndSetConfigs"),i(SS,"parse");var vS=i(((t,e,r=[])=>`.${t} ${e} `+He(`{ ${r.join(" !important; ")} !important; }`)),"cssImportantStyles"),BS=i(((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=dr(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{Qu(t.styles)||i.forEach((e=>{r.insertRule(vS(t.id,e,t.styles),r.cssRules.length)})),Qu(t.textStyles)||r.insertRule(vS(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))),r.cssRules.length)}))}let i="";return void 0!==t.themeCSS&&("function"==typeof r.replaceSync?((e=new CSSStyleSheet).replaceSync(t.themeCSS),i=Kr(e)+"\n"):i+=t.themeCSS+"\n"),i+Kr(r)}),"createCssStyles"),_S=i(((t,e)=>fk(ck(t+`{${e}}`),function(t){var e=Hb(t);return function(r,i,o,a){for(var s="",n=0;n<e;n++)s+=t[n](r,i,o,a)||"";return s}}([i((function(e,r,i,o){"rule"===e.type&&Array.isArray(e.props)?e.parent&&e.parent.type===Ib||(e.props=e.props.map((e=>e.startsWith(t)?e:t+" "+e))):e.type.startsWith("@")&&!["@media","@supports",Db,"@scope","@container","@starting-style",Ib].includes(e.type)&&(h.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=Eb)}),"addNamespace"),yk]))),"compileCSS"),FS=i(((t,e,r,i)=>(r=BS(t,r),e=ei(e,r,{...t.themeVariables,theme:t.theme,look:t.look},i),_S(i,e))),"createUserStyles"),LS=i(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),(i=Dp(i)).replace(/<br>/g,"<br/>")}),"cleanUpSvgCode"),MS=i(((t="",e)=>`<iframe style="width:100%;height:${e=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${t=bS(`<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"),AS=i(((t,e,r,i,o)=>{var a=t.append("div");a.attr("id",r),i&&a.attr("style",i),r=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&r.attr("xmlns:xlink",o),r.append("g"),t}),"appendDivSvgG");function ES(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}i(ES,"sandboxedIframe");var OS=i(((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()}),"removeExistingElements"),$S=i((async function(t,e,r){sS();var o=(e=(x=TS(e)).code,rr()),a=(h.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),"#"+t);const s="#"+(y="i"+t);const n="#"+(C="d"+t);var l=i((()=>{var t=Ho(d?s:n).node();t&&"remove"in t&&t.remove()}),"removeTempElements");let c=Ho(document.body);const d="sandbox"===o.securityLevel;var u="loose"===o.securityLevel,p=o.fontFamily;let g,f;void 0!==r?(r&&(r.innerHTML=""),d?(m=ES(Ho(r),y),(c=Ho(m.nodes()[0].contentDocument.body)).node().style.margin="0"):c=Ho(r),AS(c,t,C,"font-family: "+p,"http://www.w3.org/1999/xlink")):(OS(document,t,C,y),d?(m=ES(Ho(document.body),y),(c=Ho(m.nodes()[0].contentDocument.body)).node().style.margin="0"):c=Ho("body"),AS(c,t,C));try{g=await dS.fromText(e,{title:x.title})}catch(r){if(o.suppressErrorRendering)throw l(),r;g=await dS.fromText("error"),f=r}r=c.select(n).node(),p=g.type;var y,m=(y=r.firstChild).firstChild,C=g.renderer.getClasses?.(e,g),x=FS(o,p,C,a);(r=document.createElement("style")).innerHTML=x,y.insertBefore(r,m);try{await g.renderer.draw(e,t,"11.16.0",g)}catch(r){throw o.suppressErrorRendering?l():Aw.draw(e,t,"11.16.0"),r}qS(p,c.select(n+" svg"),g.db.getAccTitle?.(),g.db.getAccDescription?.()),c.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=c.select(n).node().innerHTML;if(h.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),b=LS(b,d,Ye(o.arrowMarkerAbsolute)),d?(C=c.select(n+" svg").node(),b=MS(b,C)):u||(b=ne.sanitize(b,{ADD_TAGS:kS,ADD_ATTR:wS,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),pS(),f)throw f;return l(),{diagramType:p,svg:b,bindFunctions:g.db.bindFunctions}}),"render");function IS(t={}){t=he({},t),t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Ke(t),t?.theme&&t.theme in Ie?t.themeVariables=Ie[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ie.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Qe(t):tr(),c(t.logLevel),sS()}i(IS,"initialize");var DS=i(((t,e={})=>(t=xS(t).code,dS.fromText(t,e))),"getDiagramFromText");function qS(t,e,r,i){hS(e,t),cS(e,r,i,e.attr("id"))}i(qS,"addA11yInfo");var PS=Object.freeze({render:$S,parse:SS,getDiagramFromText:DS,initialize:IS,getConfig:rr,setConfig:er,getSiteConfig:tr,updateSiteConfig:Je,reset:i((()=>{ar()}),"reset"),globalReset:i((()=>{ar(Ue)}),"globalReset"),defaultConfig:Ue}),zS=(c(rr().logLevel),ar(rr()),i(((t,e,r)=>{h.warn(t),Mp(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")),RS=i((async function(t={querySelector:".mermaid"}){try{await NS(t)}catch(e){if(Mp(e)&&h.error(e.str),JS.parseError&&JS.parseError(e),!t.suppressErrors)throw h.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),NS=i((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var i=PS.getConfig();let o;if(h.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)}h.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(h.debug("Start On Load: "+i?.startOnLoad),PS.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a=new $p.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s=[];for(const e of Array.from(o))if(h.info("Rendering diagram: "+e.id),!e.getAttribute("data-processed")){e.setAttribute("data-processed","true");var n="mermaid-"+a.next(),l=e.innerHTML,c=(l=Bf($p.entityDecode(l)).trim().replace(/<br\s*\/?>/gi,"<br/>"),$p.detectInit(l));c&&h.debug("Detected early reinit: ",c);try{var{svg:d,bindFunctions:u}=await QS(n,l,e);e.innerHTML=d,t&&await t(n),u&&u(e)}catch(t){zS(t,s,JS.parseError)}}if(0<s.length)throw s[0]}),"runThrowsErrors"),WS=i((function(t){PS.initialize(t)}),"initialize"),jS=i((async function(t,e,r){h.warn("mermaid.init is deprecated. Please use run instead."),t&&WS(t),t={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof e?t.querySelector=e:e&&(e instanceof HTMLElement?t.nodes=[e]:t.nodes=e),await RS(t)}),"init"),HS=i((async(t,{lazyLoad:e=!0}={})=>{sS(),Cr(...t),!1===e&&await nS()}),"registerExternalDiagrams"),US=i((function(){JS.startOnLoad&&PS.getConfig().startOnLoad&&JS.run().catch((t=>h.error("Mermaid failed to initialize",t)))}),"contentLoaded"),YS=("undefined"!=typeof document&&window.addEventListener("load",US,!1),i((function(t){JS.parseError=t}),"setParseErrorHandler")),GS=[],XS=!1,VS=i((async()=>{if(!XS){for(XS=!0;0<GS.length;){var t=GS.shift();if(t)try{await t()}catch(t){h.error("Error executing queue",t)}}XS=!1}}),"executeQueue"),ZS=i((async(t,e)=>new Promise(((r,o)=>{GS.push(i((()=>new Promise(((i,a)=>{PS.parse(t,e).then((t=>{i(t),r(t)}),(t=>{h.error("Error parsing",t),JS.parseError?.(t),a(t),o(t)}))}))),"performCall")),VS().catch(o)}))),"parse"),QS=i(((t,e,r)=>new Promise(((o,a)=>{GS.push(i((()=>new Promise(((i,s)=>{PS.render(t,e,r).then((t=>{i(t),o(t)}),(t=>{h.error("Error parsing",t),JS.parseError?.(t),s(t),a(t)}))}))),"performCall")),VS().catch(a)}))),"render"),KS=i((()=>Object.keys(yr).map((t=>({id:t})))),"getRegisteredDiagramsMetadata"),JS={startOnLoad:!0,mermaidAPI:PS,parse:ZS,render:QS,init:jS,run:RS,registerExternalDiagrams:HS,registerLayoutLoaders:Lb,initialize:WS,parseError:void 0,contentLoaded:US,setParseErrorHandler:YS,detectType:mr,registerIconPacks:ng,getRegisteredDiagramsMetadata:KS},tv=JS,ev=Object.freeze({__proto__:null,default:tv});export{z as $,Ab as A,Mb as B,$ as C,o as D,Re as E,Op as F,rr as G,xp as H,bi as I,Gd as J,ll as K,Ce as L,Wr as M,jr as N,Or as O,Ur as P,Ep as Q,Dr as R,Cn as S,vn as T,mp as U,kr as V,ri as W,Zr as X,q as Y,Ku as Z,i as _,he as a,yu as a$,R as a0,un as a1,ln as a2,sn as a3,hn as a4,tn as a5,on as a6,rn as a7,Ks as a8,nn as a9,qx as aA,Px as aB,Nf as aC,Pu as aD,du as aE,Xu as aF,Fu as aG,_u as aH,Bu as aI,vu as aJ,mu as aK,pu as aL,bu as aM,uu as aN,Tu as aO,gu as aP,xu as aQ,Au as aR,Mu as aS,Lu as aT,Ou as aU,Eu as aV,Cu as aW,fu as aX,Su as aY,wu as aZ,ku as a_,an as aa,Js as ab,Qs as ac,dn as ad,cn as ae,en as af,xm as ag,wx as ah,vx as ai,f as aj,E as ak,ng as al,cg as am,_p as an,Qy as ao,Bb as ap,Sx as aq,zx as ar,bm as as,tm as at,Tx as au,Rp as av,Kx as aw,jx as ax,Nx as ay,_x as az,di as b,dr as b0,fp as b1,Yf as b2,Bx as b3,Ax as b4,Dp as b5,Np as b6,P as b7,pn as b8,og as b9,Ba as ba,Ea as bb,ha as bc,Aa as bd,Ia as be,Kd as bf,Jd as bg,Uo as bh,Yo as bi,ga as bj,Go as bk,ua as bl,Ma as bm,Fa as bn,n as bo,ev as bp,ci as c,yi as d,Yr as e,Sp as f,hi as g,vp as h,_r as i,Ho as j,Vr as k,h as l,ou as m,ui as n,pi as o,Xd as p,bx as q,qp as r,li as s,ne as t,$p as u,ni as v,wp as w,Ci as x,cr as y,mi as z};