@cagent/chat-embedding-core 0.0.13 → 0.0.14

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 (320) 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/server.js +477 -477
  317. package/.idea/flowise-chatbox.iml +0 -10
  318. package/.idea/modules.xml +0 -8
  319. package/.idea/workspace.xml +0 -4
  320. package/docs/embedding-style-guide.md +0 -417
@@ -0,0 +1 @@
1
+ ((t,e)=>{t&&!t.getElementById("livereloadscript")&&((e=t.createElement("script")).async=1,e.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",e.id="livereloadscript",t.getElementsByTagName("head")[0].appendChild(e))})(self.document);import{c as t,g as e}from"./web-753300e1.js";var r=Object.defineProperty,i=(t,e)=>r(t,"name",{value:e,configurable:!0}),a=(t,e)=>{for(var i in e)r(t,i,{get:e[i],enumerable:!0})},o={exports:{}},s=((()=>{var t,e,r,i,a,s,n,l,h,c,d,u,p,g,f,y,m,C,x,b,k,w,T,S,v;o.exports=(t="millisecond",e="second",r="minute",i="hour",a="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,a,o;return e.date()<r.date()?-t(r,e):(i=12*(r.year()-e.year())+(r.month()-e.month()),o=r-(a=e.clone().add(i,n))<0,e=e.clone().add(i+(o?-1:1),n),+(-(i+(r-a)/(o?a-e:e-a))||0))},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(o){return{M:n,y:h,w:s,d:a,D:c,h:i,m:r,s:e,ms:t,Q:l}[o]||String(o||"").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){return b(t)?t.clone():((e="object"==typeof e?e:{}).date=t,e.args=arguments,new S(e))},(T=y).l=k=function t(e,r,i){var a;if(!e)return m;if("string"==typeof e){var o=e.toLowerCase();r=(C[o]&&(a=o),r&&(C[o]=r,a=o),e.split("-"));if(!a&&1<r.length)return t(r[0])}else o=e.name,C[o]=e,a=o;return!i&&a&&(m=a),a||!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 o(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[x]=!0}var g=o.prototype;return g.parse=function(t){this.$d=(()=>{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,a,o=e.match(u);if(o)return i=o[2]-1||0,a=(o[7]||"0").substring(0,3),r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}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,o){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(a)}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(o)||o,g=(o=T.p(t),this.$W),f=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(o){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 a: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(o,s){o=T.p(o);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[o]),o===a?this.$D+(s-this.$W):s);return o===n||o===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===a?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,a,o,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,a=this.$m,o=this.$M,s=g.weekdays,n=g.months,t=g.meridiem,l=function(t,r,i,a){return t&&(t[r]||t(u,e))||i[r].slice(0,a)},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||(()=>{switch(t){case"YY":return String(u.$y).slice(-2);case"YYYY":return T.s(u.$y,4,"0");case"M":return o+1;case"MM":return T.s(o+1,2,"0");case"MMM":return l(g.monthsShort,o,n,3);case"MMMM":return l(n,o);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,a,!0);case"A":return c(i,a,!1);case"m":return String(a);case"mm":return T.s(a,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,o,c){function d(){return T.m(p,g)}var u,p=this,g=(o=T.p(o),w(t)),f=6e4*(g.utcOffset()-this.utcOffset()),y=this-g;switch(o){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 a: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()},o})(),v=S.prototype,w.prototype=v,[["$ms",t],["$s",e],["$m",r],["$H",i],["$W",a],["$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)})(),o.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");let 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 a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(i){case"r":return 255*u.hue2rgb(o,a,t+1/3);case"g":return 255*u.hue2rgb(o,a,t);case"b":return 255*u.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;var a=Math.max(t,e,r),o=Math.min(t,e,r),s=(a+o)/2;if("l"===i)return 100*s;if(a===o)return 0;var n=a-o;if("s"===i)return 100*(.5<s?n/(2-a-o):n/(a+o));switch(a){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}}};let 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};let g={dec2hex:t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t};var f={channel:u,lang:p,unit:g};let y={};for(let t=0;t<=255;t++)y[t]=f.unit.dec2hex(t);let 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");let T={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35===t.charCodeAt(0)){var e,r,i,a,o,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+(a=(s=s%4==0)?0:-1))&(o=r?255:15))*(r=r?1:17),g:(e>>i*(2+a)&o)*r,b:(e>>i*(1+a)&o)*r,a:s?(e&o)*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;let 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,a,o;if((104===(o=t.charCodeAt(0))||72===o)&&(o=t.match(v.re)))return[,o,e,r,i,a]=o,w.set({h:v._hue2deg(o),s:f.channel.clamp.s(parseFloat(e)),l:f.channel.clamp.l(parseFloat(r)),a:i?f.channel.clamp.a(a?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;let _={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,r=S.stringify(t);for(e in _.colors)if(_.colors[e]===r)return e}};var F=_;let 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,a,o,s,n,l;if((114===(l=t.charCodeAt(0))||82===l)&&(l=t.match(L.re)))return[,l,e,r,i,a,o,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(o?2.55*parseFloat(a):parseFloat(a)),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;let 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,i=E.parse(t);for(r in e)i[r]=f.channel.clamp[r](e[r]);return E.stringify(i)};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,i=E.parse(t),a={};for(r in e)e[r]&&(a[r]=i[r]+e[r]);return O(t,a)};var W=(t,e,r=50)=>{var i,a,{r:t,g:o,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)*(a=n-c)==-1?i:(i+a)/(1+i*a)))/2)+e*(a=1-i),o*i+l*a,s*i+h*a,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,a,o,s,n=[],l=!0,h=!1;try{if(o=(r=r.call(t)).next,0!==e)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==e);l=!0);}catch(t){h=!0,a=t}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw a}}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.")}()}let Y=Object.entries,G=Object.setPrototypeOf,X=Object.isFrozen,V=Object.getPrototypeOf,Z=Object.getOwnPropertyDescriptor,Q=Object.freeze,K=Object.seal,J=Object.create,tt="undefined"!=typeof Reflect&&Reflect,et=tt.apply,rt=tt.construct,it=(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),a=2;a<r;a++)i[a-2]=arguments[a];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)},Tt(Array.prototype.forEach)),at=Tt(Array.prototype.lastIndexOf),ot=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),a=1;a<r;a++)i[a-1]=arguments[a];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 a=e.length;for(;a--;){let o=e[a];"string"==typeof o&&(r=i(o))!==o&&(X(e)||(e[a]=r),o=r),t[o]=!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,r=J(null);for(e of Y(t)){var i=(a=U(e,2))[0],a=a[1];xt(t,i)&&(lt(a)?r[i]=vt(a):a&&"object"==typeof a&&a.constructor===Object?r[i]=Bt(a):r[i]=a)}return r}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}}let 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,ae=11,oe=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;let 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,a=i,o=a.currentScript,s=e.HTMLTemplateElement,n=e.Node,l=e.Element,h=e.NodeFilter,c=(void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),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 k(t){return t instanceof RegExp||t instanceof Function}function w(){let t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!Ke||Ke!==t){t=Bt(t=t&&"object"==typeof t?t:{}),Ve=-1===Ze.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Qe="application/xhtml+xml"===Ve?ct:ht,Tt=oe(t,"ALLOWED_TAGS",vt,{transform:Qe}),se=oe(t,"ALLOWED_ATTR",ne,{transform:Qe}),We=oe(t,"ALLOWED_NAMESPACES",je,{transform:ct}),De=oe(t,"ADD_URI_SAFE_ATTR",qe,{transform:Qe,base:qe}),$e=oe(t,"ADD_DATA_URI_TAGS",Ie,{transform:Qe,base:Ie}),Ee=oe(t,"FORBID_CONTENTS",Oe,{transform:Qe}),he=oe(t,"FORBID_TAGS",Bt({}),{transform:Qe}),ce=oe(t,"FORBID_ATTR",Bt({}),{transform:Qe}),Ae=!!xt(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?Bt(t.USE_PROFILES):t.USE_PROFILES),ue=!1!==t.ALLOW_ARIA_ATTR,pe=!1!==t.ALLOW_DATA_ATTR,ge=t.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,ye=t.SAFE_FOR_TEMPLATES||!1,me=!1!==t.SAFE_FOR_XML,Ce=t.WHOLE_DOCUMENT||!1,Te=t.RETURN_DOM||!1,Se=t.RETURN_DOM_FRAGMENT||!1,ve=t.RETURN_TRUSTED_TYPE||!1,we=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,_e=t.SANITIZE_NAMED_PROPS||!1,Le=!1!==t.KEEP_CONTENT,Me=t.IN_PLACE||!1,rt=function(t){try{return kt(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:Ht,Ne="string"==typeof t.NAMESPACE?t.NAMESPACE:Re,Ue=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({},He),Ge=xt(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?Bt(t.HTML_INTEGRATION_POINTS):St({},Ye);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(le=J(null),xt(e,"tagNameCheck")&&k(e.tagNameCheck)&&(le.tagNameCheck=e.tagNameCheck),xt(e,"attributeNameCheck")&&k(e.attributeNameCheck)&&(le.attributeNameCheck=e.attributeNameCheck),xt(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(le.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),K(le),ye&&(pe=!1),Se&&(Te=!0),Ae&&(Tt=St({},$t),se=J(null),!0===Ae.html&&(St(Tt,Ft),St(se,It)),!0===Ae.svg&&(St(Tt,Lt),St(se,Dt),St(se,Pt)),!0===Ae.svgFilters&&(St(Tt,Mt),St(se,Dt),St(se,Pt)),!0===Ae.mathMl)&&(St(Tt,Et),St(se,qt),St(se,Pt)),de.tagCheck=null,de.attributeCheck=null,xt(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?de.tagCheck=t.ADD_TAGS:lt(t.ADD_TAGS)&&St(Tt=Tt===vt?Bt(Tt):Tt,t.ADD_TAGS,Qe)),xt(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?de.attributeCheck=t.ADD_ATTR:lt(t.ADD_ATTR)&&St(se=se===ne?Bt(se):se,t.ADD_ATTR,Qe)),xt(t,"ADD_URI_SAFE_ATTR")&&lt(t.ADD_URI_SAFE_ATTR)&&St(De,t.ADD_URI_SAFE_ATTR,Qe),xt(t,"FORBID_CONTENTS")&&lt(t.FORBID_CONTENTS)&&St(Ee=Ee===Oe?Bt(Ee):Ee,t.FORBID_CONTENTS,Qe),xt(t,"ADD_FORBID_CONTENTS")&&lt(t.ADD_FORBID_CONTENTS)&&St(Ee=Ee===Oe?Bt(Ee):Ee,t.ADD_FORBID_CONTENTS,Qe),Le&&(Tt["#text"]=!0),Ce&&St(Tt,["html","head","body"]),Tt.table&&(St(Tt,["tbody"]),delete he.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=F,F=t.TRUSTED_TYPES_POLICY;try{A=I("")}catch(t){throw F=e,t}}else null===t.TRUSTED_TYPES_POLICY?(F=void 0,A=""):(F=void 0===F?(E||(L=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,o),E=!0),L):F)&&"string"==typeof A&&(A=I(""));Q&&Q(t),Ke=t}}function T(t){var e=f(t);if(e){let t=[];it(e,e=>{st(t,e)}),it(t,t=>{try{p(t)}catch(t){}})}var r=C(t);if(r)for(let a=r.length-1;0<=a;--a){var i;if("string"==typeof(i=(i=r[a])&&i.name))try{t.removeAttribute(i)}catch(e){}}}function S(t){for(var e=[t];0<e.length;){var r=e.pop();if((x?x(r):r.nodeType)===Jt){o=i=void 0;var i=r,a=C(i);if(a)for(let e=a.length-1;0<=e;--e){var o;if("string"==typeof(o=(o=a[e])&&o.name)&&!se[Qe(o)])try{i.removeAttribute(o)}catch(t){}}}var s=f(r);if(s)for(let t=s.length-1;0<=t;--t)e.push(s[t])}}function v(t){let e=null,r=null;we?t="<remove></remove>"+t:r=(a=dt(t,/^[\r\n\t ]+/))&&a[0],"application/xhtml+xml"===Ve&&Ne===Re&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var a=F?I(t):t;if(Ne===Re)try{e=(new c).parseFromString(a,Ve)}catch(t){}if(!e||!e.documentElement){e=P.createDocument(Ne,"template",null);try{e.documentElement.innerHTML=M?A:a}catch(t){}}return a=e.body||e.documentElement,t&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),Ne===Re?N.call(e,Ce?"html":"body")[0]:Ce?e.documentElement:a}function B(t){return t=ut(t,H," "),t=ut(t,U," "),ut(t,G," ")}function _(t){t.normalize();var e=z.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=B(r.data),r=e.nextNode();var i=null==(i=t.querySelectorAll)?void 0:i.call(t,"template");i&&it(i,t=>{hr(t.content)&&_(t.content)})}"function"==typeof s&&(e=i.createElement("template")).content&&e.content.ownerDocument&&(i=e.content.ownerDocument);let F,L,M,A="",E=!1,O=0,$=function(){if(0<O)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.')},I=function(t){$(),O++;try{return F.createHTML(t)}finally{O--}},D=function(t){$(),O++;try{return F.createScriptURL(t)}finally{O--}},q=i,P=q.implementation,z=q.createNodeIterator,R=q.createDocumentFragment,N=q.getElementsByTagName,W=a.importNode,j={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]},H=(r.isSupported="function"==typeof Y&&"function"==typeof y&&P&&void 0!==P.createHTMLDocument,zt),U=Rt,G=Nt,X=Wt,V=jt,Z=Ut,tt=Yt,et=Xt,rt=Ht,Tt=null,vt=St({},[...Ft,...Lt,...Mt,...Et,...$t]),se=null,ne=St({},[...It,...Dt,...qt,...Pt]),le=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}})),he=null,ce=null,de=Object.seal(J(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ue=!0,pe=!0,ge=!1,fe=!0,ye=!1,me=!0,Ce=!1,xe=!1,be=null,ke=null,we=!1,Te=!1,Se=!1,ve=!1,Be=!0,_e=!1,Fe="user-content-",Le=!0,Me=!1,Ae={},Ee=null,Oe=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"]),$e=null,Ie=St({},["audio","video","img","source","image","track"]),De=null,qe=St({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pe="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",Re="http://www.w3.org/1999/xhtml",Ne=Re,We=null,je=St({},[Pe,ze,Re],ct),He=Q(["mi","mo","mn","ms","mtext"]),Ue=St({},He),Ye=Q(["annotation-xml"]),Ge=St({},Ye),Xe=St({},["title","style","font","a","script"]),Ve=null,Ze=["application/xhtml+xml","text/html"],Qe=null,Ke=null,Je=i.createElement("form"),tr=St({},[...Lt,...Mt,...At]),er=St({},[...Et,...Ot]),rr=function(t,e,r){return e.namespaceURI===Re?"svg"===t:e.namespaceURI===Pe?"svg"===t&&("annotation-xml"===r||Ue[r]):Boolean(tr[t])},ir=function(t,e,r){return e.namespaceURI===Re?"math"===t:e.namespaceURI===ze?"math"===t&&Ge[r]:Boolean(er[t])},ar=function(t,e,r){return!(e.namespaceURI===ze&&!Ge[r]||e.namespaceURI===Pe&&!Ue[r]||er[t])&&(Xe[t]||!tr[t])},or=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")}},sr=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(Te||Se)try{or(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},nr=function(t){return z.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},lr=function(t){var e=b?b(t):null;return"string"==typeof e&&"form"===Qe(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))},hr=function(t){if(!x||"object"!=typeof t||null===t)return!1;try{return x(t)===ae}catch(t){return!1}},cr=function(t){if(!x||"object"!=typeof t||null===t)return!1;try{return"number"==typeof x(t)}catch(t){return!1}};function dr(t,e,i){0!==t.length&&it(t,t=>{t.call(r,e,i,Ke)})}function ur(t,e,r){if(ce[e])return!1;if(Be&&("id"===e||"name"===e)&&(r in i||r in Je))return!1;var a=se[e]||de.attributeCheck instanceof Function&&de.attributeCheck(e,t);if(!(pe&&kt(X,e)||ue&&kt(V,e)))if(a){if(!De[e]&&!kt(rt,ut(r,tt,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==pt(r,"data:")||!$e[t])&&(!ge||kt(Z,ut(r,tt,"")))&&r)return!1}else if(!(mr(t)&&(le.tagNameCheck instanceof RegExp&&kt(le.tagNameCheck,t)||le.tagNameCheck instanceof Function&&le.tagNameCheck(t))&&(le.attributeNameCheck instanceof RegExp&&kt(le.attributeNameCheck,e)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(e,t))||"is"===e&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&kt(le.tagNameCheck,r)||le.tagNameCheck instanceof Function&&le.tagNameCheck(r))))return!1;return!0}function pr(t,e,r,i){if(F&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(t,e)){case"TrustedHTML":return I(i);case"TrustedScriptURL":return D(i)}return i}function gr(t,e,i,a){try{i?t.setAttributeNS(i,e,a):t.setAttribute(e,a),lr(t)?or(t):ot(r.removed)}catch(i){sr(e,t)}}let fr=function(t){var e,i;return dr(j.beforeSanitizeElements,t,null),lr(t)||(e=Qe(b?b(t):t.nodeName),dr(j.uponSanitizeElement,t,{tagName:e,allowedTags:Tt}),function(t,e){return!!(me&&t.hasChildNodes()&&!cr(t.firstElementChild)&&kt(Vt,t.textContent)&&kt(Vt,t.innerHTML))||!(!me||t.namespaceURI!==Re||"style"!==e||!cr(t.firstElementChild))||t.nodeType===ee||!(!me||t.nodeType!==re||!kt(Zt,t.data))}(t,e))?(or(t),!0):!he[e]&&(de.tagCheck instanceof Function&&de.tagCheck(e)||Tt[e])?(x?x(t):t.nodeType)===Jt&&!function(t){let e=y(t);e&&e.tagName||(e={namespaceURI:Ne,tagName:"template"});var r=ht(t.tagName),i=ht(e.tagName);return!!We[t.namespaceURI]&&(t.namespaceURI===ze?rr(r,e,i):t.namespaceURI===Pe?ir(r,e,i):t.namespaceURI===Re?ar(r,e,i):!("application/xhtml+xml"!==Ve||!We[t.namespaceURI]))}(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&kt(Qt,t.innerHTML)?(or(t),!0):(ye&&t.nodeType===te&&(i=B(t.textContent),t.textContent!==i)&&(st(r.removed,{element:t.cloneNode()}),t.textContent=i),dr(j.afterSanitizeElements,t,null),!1):function(t,e){if(!he[e]&&mr(e)){if(le.tagNameCheck instanceof RegExp&&kt(le.tagNameCheck,e))return!1;if(le.tagNameCheck instanceof Function&&le.tagNameCheck(e))return!1}if(Le&&!Ee[e]){var r=y(t),i=f(t);if(i&&r)for(let e=i.length-1;0<=e;--e){var a=Me?i[e]:u(i[e],!0);r.insertBefore(a,g(t))}}return or(t),!0}(t,e)},yr=St({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mr=function(t){return!yr[ht(t)]&&kt(et,t)},Cr=function(t){dr(j.beforeSanitizeAttributes,t,null);var e=t.attributes;if(e&&!lr(t)){var r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0};let l=e.length;for(var i=Qe(t.nodeName);l--;){var a=(s=e[l]).name,o=s.namespaceURI,s=s.value,n=Qe(a);let h="value"===a?s:gt(s);r.attrName=n,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,dr(j.uponSanitizeAttribute,t,r),h=r.attrValue,!_e||"id"!==n&&"name"!==n||0===pt(h,Fe)||(sr(a,t),h=Fe+h),me&&kt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,h)||"attributename"===n&&dt(h,"href")?sr(a,t):r.forceKeepAttr||(r.keepAttr&&(fe||!kt(Kt,h))&&(ye&&(h=B(h)),ur(i,n,h))?(h=pr(i,n,o,h))!==s&&gr(t,a,o,h):sr(a,t))}dr(j.afterSanitizeAttributes,t,null)}},xr=function(t){var e,r=nr(t);for(dr(j.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)dr(j.uponSanitizeShadowNode,e,null),fr(e),Cr(e),hr(e.content)&&xr(e.content),(x?x(e):e.nodeType)===Jt&&(e=m(e),hr(e))&&(br(e),xr(e));dr(j.afterSanitizeShadowDOM,t,null)},br=function(t){for(var e=[{node:t,shadow:null}];0<e.length;){if((i=e.pop()).shadow)xr(i.shadow);else{var r,i=i.node,a=(x?x(i):i.nodeType)===Jt,o=f(i);if(o)for(let t=o.length-1;0<=t;--t)e.push({node:o[t],shadow:null});a&&"string"==typeof(r=b?b(i):null)&&"template"===Qe(r)&&(r=i.content,hr(r))&&e.push({node:r,shadow:null}),a&&(r=m(i),hr(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 o;let s=null;if("string"!=typeof(t=(M=!t)?"\x3c!--\x3e":t)&&!cr(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(xe?(Tt=be,se=ke):w(e),(0<j.uponSanitizeElement.length||0<j.uponSanitizeAttribute.length)&&(Tt=Bt(Tt)),0<j.uponSanitizeAttribute.length&&(se=Bt(se)),r.removed=[],e=Me&&"string"!=typeof t&&cr(t)){if("string"==typeof(n=b?b(t):t.nodeName)){var n=Qe(n);if(!Tt[n]||he[n])throw wt("root node is forbidden and cannot be sanitized in-place")}if(lr(t))throw wt("root node is clobbered and cannot be sanitized in-place");try{br(t)}catch(i){throw T(t),i}}else if(cr(t))(n=(i=v("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType===Jt&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n),br(n);else{if(!Te&&!ye&&!Ce&&-1===t.indexOf("<"))return F&&ve?I(t):t;if(!(i=v(t)))return Te?null:ve?A:""}i&&we&&or(i.firstChild);var l=nr(e?t:i);try{for(;o=l.nextNode();)fr(o),Cr(o),hr(o.content)&&xr(o.content)}catch(i){throw e&&T(t),i}if(e)return it(r.removed,t=>{t.element&&S(t.element)}),ye&&_(t),t;if(Te){if(ye&&_(i),Se)for(s=R.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return se.shadowroot||se.shadowrootmode?W.call(a,s,!0):s}let h=Ce?i.outerHTML:i.innerHTML;return Ce&&Tt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&kt(Gt,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+h),ye&&(h=B(h)),F&&ve?I(h):h},r.setConfig=function(){w(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}),xe=!0,be=Tt,ke=se},r.clearConfig=function(){Ke=null,xe=!1,be=null,ke=null,F=L,A=""},r.isValidAttribute=function(t,e,r){return Ke||w({}),ur(t=Qe(t),e=Qe(e),r)},r.addHook=function(t,e){"function"==typeof e&&xt(j,t)&&st(j[t],e)},r.removeHook=function(t,e){if(xt(j,t))return void 0!==e?-1===(e=at(j[t],e))?void 0:nt(j[t],e,1)[0]:ot(j[t])},r.removeHooks=function(t){xt(j,t)&&(j[t]=[])},r.removeAllHooks=function(){j={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}(),le=i((t,e,{depth:r=2,clobber:i=!1}={})=>{let a={depth:r,clobber:i};if(Array.isArray(e)&&!Array.isArray(t))e.forEach(e=>le(t,e,a));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(a=>{"object"!=typeof e[a]||null===e[a]||void 0!==t[a]&&"object"!=typeof t[a]?(i||"object"!=typeof t[a]&&"object"!=typeof e[a])&&(t[a]=e[a]):(void 0===t[a]&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=le(t[a],e[a],{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(var r of Object.keys(t)){var i=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof i||!e.test(i))&&(h.debug("sanitize deleting dictionary entry:",r,i),delete t[r])}},"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(var e of Object.keys(t))if(h.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!ze.has(e)||null==t[e])h.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e]){var r=Ne[e];r?We(t[e],r):(h.debug("sanitizing object",e),je(t[e]))}else{var i;for(i of["themeCSS","fontFamily","altFontFamily"])e.includes(i)&&(h.debug("sanitizing css option",e),t[e]=He(t[e]))}if(t.themeVariables)for(var a of Object.keys(t.themeVariables)){var o=t.themeVariables[a];o?.match&&!o.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[a]="")}h.debug("After sanitization",t)}},"sanitizeDirective"),He=i(t=>{let e=0,r=0;for(var 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)=>{var r;t=he({},t);let i={};for(r of e)ir(r),i=he(i,r);return t=he(t,i),i.theme&&i.theme in Ie&&(e=he({},se),e=he(e.themeVariables||{},i.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"),ar=i(t=>{je(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Xe.push(t),Ze(Ge,Xe)},"addDirective"),or=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={};for(var e of(se&&(t=he(t,se)),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(){let 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(/(,)/),a=[];for(let t=0;t<i.length;t++){let o=i[t];","===o&&0<t&&t+1<i.length&&(e=i[t-1],r=i[t+1],Pr(e,r))&&(o=e+","+r,t++,a.pop()),a.push(zr(o))}return a.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 a=i.indexOf("~"),o=i.lastIndexOf("~");for(;-1!==a&&-1!==o&&a!==o;)i[a]="<",i[o]=">",a=i.indexOf("~"),o=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.");{let r=(await import("./katex-b134d23c.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 a=e.node().getBBox(),o=a.width,s=a.height;h.info(`SVG bounds: ${o}x`+s,a),h.info("Graph bounds: 0x0",t),h.info(`Calculated bounds: ${t=o+2*r}x`+(o=s+2*r)),Vr(e,o,t,i),s=`${a.x-r} ${a.y-r} ${a.width+2*r} `+(a.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 a="";return t in Qr&&Qr[t]?a=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 ${a}\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=(a(ri,{clear:()=>ni,getAccDescription:()=>di,getAccTitle:()=>hi,getDiagramTitle:()=>pi,setAccDescription:()=>ci,setAccTitle:()=>li,setDiagramTitle:()=>ui}),""),ai="",oi="",si=i(t=>_r(t,rr()),"sanitizeText"),ni=i(()=>{ai=oi=ii=""},"clear"),li=i(t=>{ii=si(t).replace(/^\s+/g,"")},"setAccTitle"),hi=i(()=>ii,"getAccTitle"),ci=i(t=>{oi=si(t).replace(/\n\s+/g,"\n")},"setAccDescription"),di=i(()=>oi,"getAccDescription"),ui=i(t=>{ai=si(t)},"setDiagramTitle"),pi=i(()=>ai,"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,a=t.length;i<a;++i)if((r=t[i]).name===e)return r.value}function Mi(t,e,r){for(var i=0,a=t.length;i<a;++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._,a=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),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=a[o]).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(;++o<s;)if(r=(r=(t=a[o]).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,a=new Array(r),o=0;o<r;++o)a[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,r=(i=this._[t]).length;o<r;++o)i[o].value.apply(e,a)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],a=0,o=i.length;a<o;++a)i[a].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,a,o){for(var s,n=0,l=e.length,h=o.length;n<h;++n)(s=e[n])?(s.__data__=o[n],i[n]=s):r[n]=new Vi(t,o[n]);for(;n<l;++n)(s=e[n])&&(a[n]=s)}function Qi(t,e,r,i,a,o,s){for(var n,l,h=new Map,c=e.length,d=o.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)?a[p]=n:h.set(l,n));for(p=0;p<d;++p)l=s.call(t,o[p],p,o)+"",(n=h.get(l))?((i[p]=n).__data__=o[p],h.delete(l)):r[p]=new Vi(t,o[p]);for(p=0;p<c;++p)(n=e[p])&&h.get(u[p])===n&&(a[p]=n)}function Ki(t){return t.__data__}function Ji(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ta(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}function ea(t){return function(){this.removeAttribute(t)}}function ra(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ia(t,e){return function(){this.setAttribute(t,e)}}function aa(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function oa(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function sa(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 na(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function la(t){return function(){this.style.removeProperty(t)}}function ha(t,e,r){return function(){this.style.setProperty(t,e,r)}}function ca(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function da(t,e){return t.style.getPropertyValue(e)||na(t).getComputedStyle(t,null).getPropertyValue(e)}function ua(t){return function(){delete this[t]}}function pa(t,e){return function(){this[t]=e}}function ga(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function fa(t){return t.trim().split(/^|\s+/)}function ya(t){return t.classList||new ma(t)}function ma(t){this._node=t,this._names=fa(t.getAttribute("class")||"")}function Ca(t,e){for(var r=ya(t),i=-1,a=e.length;++i<a;)r.add(e[i])}function xa(t,e){for(var r=ya(t),i=-1,a=e.length;++i<a;)r.remove(e[i])}function ba(t){return function(){Ca(this,t)}}function ka(t){return function(){xa(this,t)}}function wa(t,e){return function(){(e.apply(this,arguments)?Ca:xa)(this,t)}}function Ta(){this.textContent=""}function Sa(t){return function(){this.textContent=t}}function va(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ba(){this.innerHTML=""}function _a(t){return function(){this.innerHTML=t}}function Fa(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function La(){this.nextSibling&&this.parentNode.appendChild(this)}function Ma(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Aa(){return null}function Ea(){var t=this.parentNode;t&&t.removeChild(this)}function Oa(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $a(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ia(t){return function(){var e=this.__on;if(e){for(var r,i=0,a=-1,o=e.length;i<o;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++a]=r:this.removeEventListener(r.type,r.listener,r.options);++a?e.length=a:delete this.__on}}}function Da(t,e,r){return function(){var i,a=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(a)for(var s=0,n=a.length;s<n;++s)if((i=a[s]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),void(i.value=e);this.addEventListener(t.type,o,r),i={type:t.type,name:t.name,value:e,listener:o,options:r},a?a.push(i):this.__on=[i]}}function qa(t,e,r){var i=na(t),a=i.CustomEvent;"function"==typeof a?a=new a(e,r):(a=i.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function Pa(t,e){return function(){return qa(this,t,e)}}function za(t,e){return function(){return qa(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)}},ma.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 Ra=[null];function Na(t,e){this._groups=t,this._parents=e}function Wa(){return new Na([[document.documentElement]],Ra)}function ja(t){return"string"==typeof t?new Na([[document.querySelector(t)]],[document.documentElement]):new Na([[t]],Ra)}function Ha(t,e,r){(t.prototype=e.prototype=r).constructor=t}function Ua(t,e){var r,i=Object.create(t.prototype);for(r in e)i[r]=e[r];return i}function Ya(){}Na.prototype=Wa.prototype={constructor:Na,select:function(t){"function"!=typeof t&&(t=Pi(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var o,s,n=e[a],l=n.length,h=i[a]=new Array(l),c=0;c<l;++c)(o=n[c])&&(s=t.call(o,o.__data__,c,n))&&("__data__"in o&&(s.__data__=o.__data__),h[c]=s);return new Na(i,this._parents)},selectAll:function(t){t=("function"==typeof t?Ni:Ri)(t);for(var e=this._groups,r=e.length,i=[],a=[],o=0;o<r;++o)for(var s,n=e[o],l=n.length,h=0;h<l;++h)(s=n[h])&&(i.push(t.call(s,s.__data__,h,n)),a.push(s));return new Na(i,a)},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),a=0;a<r;++a)for(var o,s=e[a],n=s.length,l=i[a]=[],h=0;h<n;++h)(o=s[h])&&t.call(o,o.__data__,h,s)&&l.push(o);return new Na(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Ki);var r=e?Qi:Zi,i=this._parents,a=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=a.length,s=new Array(o),n=new Array(o),l=new Array(o),h=0;h<o;++h){var c=i[h],d=a[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 Na(s,i))._enter=n,s._exit=l,s},enter:function(){return new Na(this._enter||this._groups.map(Xi),this._parents)},exit:function(){return new Na(this._exit||this._groups.map(Xi),this._parents)},join:function(t,e,r){var i=this.enter(),a=this,o=this.exit();return i="function"==typeof t?(i=t(i))&&i.selection():i.append(t+""),null!=e&&(a=(a=e(a))&&a.selection()),null==r?o.remove():r(o),i&&a?i.merge(a).order():a},merge:function(t){t=t.selection?t.selection():t;for(var e=this._groups,r=t._groups,i=e.length,a=(t=r.length,Math.min(i,t)),o=new Array(i),s=0;s<a;++s)for(var n,l=e[s],h=r[s],c=l.length,d=o[s]=new Array(c),u=0;u<c;++u)(n=l[u]||h[u])&&(d[u]=n);for(;s<i;++s)o[s]=e[s];return new Na(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,a=t[e],o=a.length-1,s=a[o];0<=--o;)(i=a[o])&&(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||ta;for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o){for(var s,n=r[o],l=n.length,h=a[o]=new Array(l),c=0;c<l;++c)(s=n[c])&&(h[c]=s);h.sort(e)}return new Na(a,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],a=0,o=i.length;a<o;++a){var s=i[a];if(s)return s}return null},size:function(){let t=0;for(var 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 a,o=e[r],s=0,n=o.length;s<n;++s)(a=o[s])&&t.call(a,a.__data__,s,o);return this},attr:function(t,e){var r;return t=Oi(t),arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?ra:ea:"function"==typeof e?t.local?sa:oa:t.local?aa:ia)(t,e))},style:function(t,e,r){return 1<arguments.length?this.each((null==e?la:"function"==typeof e?ca:ha)(t,e,null==r?"":r)):da(this.node(),t)},property:function(t,e){return 1<arguments.length?this.each((null==e?ua:"function"==typeof e?ga:pa)(t,e)):this.node()[t]},classed:function(t,e){var r=fa(t+"");if(arguments.length<2){for(var i=ya(this.node()),a=-1,o=r.length;++a<o;)if(!i.contains(r[a]))return!1;return!0}return this.each(("function"==typeof e?wa:e?ba:ka)(r,e))},text:function(t){return arguments.length?this.each(null==t?Ta:("function"==typeof t?va:Sa)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ba:("function"==typeof t?Fa:_a)(t)):this.node().innerHTML},raise:function(){return this.each(La)},lower:function(){return this.each(Ma)},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?Aa:"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(Ea)},clone:function(t){return this.select(t?$a:Oa)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,a,o=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=o.length;if(!(arguments.length<2)){for(n=e?Da:Ia,i=0;i<s;++i)this.each(n(o[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((a=o[i]).type===l.type&&a.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?za:Pa)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,a=t[e],o=0,s=a.length;o<s;++o)(i=a[o])&&(yield i)}};var Ga=.7,Xa=1/Ga,Va="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ka=/^#([0-9a-f]{3,8})$/,Ja=new RegExp(`^rgb\\(${Va},${Va},${Va}\\)$`),to=new RegExp(`^rgb\\(${Qa},${Qa},${Qa}\\)$`),eo=new RegExp(`^rgba\\(${Va},${Va},${Va},${Za}\\)$`),ro=new RegExp(`^rgba\\(${Qa},${Qa},${Qa},${Za}\\)$`),io=new RegExp(`^hsl\\(${Za},${Qa},${Qa}\\)$`),ao=new RegExp(`^hsla\\(${Za},${Qa},${Qa},${Za}\\)$`),oo={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 so(){return this.rgb().formatHex()}function no(){return this.rgb().formatRgb()}function lo(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Ka.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?ho(e):3===r?new go(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?co(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?co(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=Ja.exec(t))?new go(e[1],e[2],e[3],1):(e=to.exec(t))?new go(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=eo.exec(t))?co(e[1],e[2],e[3],e[4]):(e=ro.exec(t))?co(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=io.exec(t))?bo(e[1],e[2]/100,e[3]/100,1):(e=ao.exec(t))?bo(e[1],e[2]/100,e[3]/100,e[4]):oo.hasOwnProperty(t)?ho(oo[t]):"transparent"===t?new go(NaN,NaN,NaN,0):null}function ho(t){return new go(t>>16&255,t>>8&255,255&t,1)}function co(t,e,r,i){return new go(t=i<=0?e=r=NaN:t,e,r,i)}function uo(t){return(t=t instanceof Ya?t:lo(t))?new go((t=t.rgb()).r,t.g,t.b,t.opacity):new go}function po(t,e,r,i){return 1===arguments.length?uo(t):new go(t,e,r,null==i?1:i)}function go(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function fo(){return"#"+xo(this.r)+xo(this.g)+xo(this.b)}function yo(){var t=mo(this.opacity);return(1===t?"rgb(":"rgba(")+Co(this.r)+`, ${Co(this.g)}, `+Co(this.b)+(1===t?")":`, ${t})`)}function mo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Co(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function xo(t){return((t=Co(t))<16?"0":"")+t.toString(16)}function bo(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new wo(t,e,r,i)}function ko(t){var e,r,i,a,o,s,n,l;return t instanceof wo?new wo(t.h,t.s,t.l,t.opacity):(t=t instanceof Ya?t:lo(t))?t instanceof wo?t:(e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),s=NaN,l=((o=Math.max(e,r,i))+a)/2,(n=o-a)?(s=e===o?(r-i)/n+6*(r<i):r===o?(i-e)/n+2:(e-r)/n+4,n/=l<.5?o+a:2-o-a,s*=60):n=0<l&&l<1?0:s,new wo(s,n,l,t.opacity)):new wo}function wo(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function To(t){return(t=(t||0)%360)<0?t+360:t}function So(t){return Math.max(0,Math.min(1,t||0))}function vo(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}Ha(Ya,lo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:so,formatHex:so,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ko(this).formatHsl()},formatRgb:no,toString:no}),Ha(go,po,Ua(Ya,{brighter(t){return t=null==t?Xa:Math.pow(Xa,t),new go(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ga:Math.pow(Ga,t),new go(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new go(Co(this.r),Co(this.g),Co(this.b),mo(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:fo,formatHex:fo,formatHex8:function(){return"#"+xo(this.r)+xo(this.g)+xo(this.b)+xo(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:yo,toString:yo})),Ha(wo,function(t,e,r,i){return 1===arguments.length?ko(t):new wo(t,e,r,null==i?1:i)},Ua(Ya,{brighter(t){return t=null==t?Xa:Math.pow(Xa,t),new wo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ga:Math.pow(Ga,t),new wo(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 go(vo(240<=e?e-240:120+e,t=2*(t=this.l)-(r=t+(t<.5?t:1-t)*r),r),vo(e,t,r),vo(e<120?240+e:e-120,t,r),this.opacity)},clamp(){return new wo(To(this.h),So(this.s),So(this.l),mo(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=mo(this.opacity);return(1===t?"hsl(":"hsla(")+To(this.h)+`, ${100*So(this.s)}%, ${100*So(this.l)}%`+(1===t?")":`, ${t})`)}}));var Bo=t=>()=>t;function _o(t,e){return function(r){return t+r*e}}function Fo(t,e){var r=e-t;return r?_o(t,180<r||r<-180?r-360*Math.round(r/360):r):Bo(isNaN(t)?e:t)}function Lo(t){return 1==(t=+t)?Mo: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):Bo(isNaN(e)?r:e)}}function Mo(t,e){var r=e-t;return r?_o(t,r):Bo(isNaN(t)?e:t)}var Ao=function t(e){var r=Lo(e);function i(t,e){var i=r((t=po(t)).r,(e=po(e)).r),a=r(t.g,e.g),o=r(t.b,e.b),s=Mo(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function Eo(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Oo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$o=new RegExp(Oo.source,"g");function Io(t,e){var r,i,a,o=Oo.lastIndex=$o.lastIndex=0,s=-1,n=[],l=[];for(t+="",e+="";(r=Oo.exec(t))&&(i=$o.exec(e));)(a=i.index)>o&&(a=e.slice(o,a),n[s]?n[s]+=a:n[++s]=a),(r=r[0])===(i=i[0])?n[s]?n[s]+=i:n[++s]=i:(n[++s]=null,l.push({i:s,x:Eo(r,i)})),o=$o.lastIndex;return o<e.length&&(a=e.slice(o),n[s]?n[s]+=a:n[++s]=a),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 Do,qo=180/Math.PI,Po={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zo(t,e,r,i,a,o){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:a,translateY:o,rotate:Math.atan2(e,t)*qo,skewX:Math.atan(l)*qo,scaleX:s,scaleY:n}}function Ro(t,e,r,i){function a(t){return t.length?t.pop()+" ":""}return function(o,s){var n,l,h,c,d,u,p,g,f=[],y=[];return o=t(o),s=t(s),l=o.translateX,h=o.translateY,p=s.translateX,d=s.translateY,u=f,c=y,l!==p||h!==d?(n=u.push("translate(",null,e,null,r),c.push({i:n-4,x:Eo(l,p)},{i:n-2,x:Eo(h,d)})):(p||d)&&u.push("translate("+p+e+d+r),c=o.rotate,l=f,n=y,c!==(h=s.rotate)?(180<c-h?h+=360:180<h-c&&(c+=360),n.push({i:l.push(a(l)+"rotate(",null,i)-2,x:Eo(c,h)})):h&&l.push(a(l)+"rotate("+h+i),u=o.skewX,p=f,d=y,u!==(c=s.skewX)?d.push({i:p.push(a(p)+"skewX(",null,i)-2,x:Eo(u,c)}):c&&p.push(a(p)+"skewX("+c+i),l=o.scaleX,h=o.scaleY,d=s.scaleY,u=f,p=y,l!==(c=s.scaleX)||h!==d?(g=u.push(a(u)+"scale(",null,",",null,")"),p.push({i:g-4,x:Eo(l,c)},{i:g-2,x:Eo(h,d)})):1===c&&1===d||u.push(a(u)+"scale("+c+","+d+")"),o=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 No,Wo,jo=Ro(function(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?Po:zo(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),Ho=Ro(function(t){return null!=t&&((Do=Do||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=Do.transform.baseVal.consolidate())?zo((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Po},", ",")",")"),Uo=0,Yo=0,Go=0,Xo=0,Vo=0,Zo=0,Qo="object"==typeof performance&&performance.now?performance:Date,Ko="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Jo(){return Vo||(Ko(ts),Vo=Qo.now()+Zo)}function ts(){Vo=0}function es(){this._call=this._time=this._next=null}function rs(t,e,r){var i=new es;return i.restart(t,e,r),i}function is(){Vo=(Xo=Qo.now())+Zo,Uo=Yo=0;try{!function(){Jo(),++Uo;for(var t,e=No;e;)0<=(t=Vo-e._time)&&e._call.call(void 0,t),e=e._next;--Uo}()}finally{Uo=0,function(){for(var t,e,r=No,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:No=e);Wo=t,os(i)}(),Vo=0}}function as(){var t=Qo.now(),e=t-Xo;1e3<e&&(Zo-=e,Xo=t)}function os(t){Uo||(Yo=Yo&&clearTimeout(Yo),24<t-Vo?(t<1/0&&(Yo=setTimeout(is,t-Qo.now()-Zo)),Go=Go&&clearInterval(Go)):(Go||(Xo=Qo.now(),Go=setInterval(as,1e3)),Uo=1,Ko(is)))}function ss(t,e,r){var i=new es;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}es.prototype=rs.prototype={constructor:es,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Jo():+r)+(null==e?0:+e),this._next||Wo===this||(Wo?Wo._next=this:No=this,Wo=this),this._call=t,this._time=r,os()},stop:function(){this._call&&(this._call=null,this._time=1/0,os())}};var ns=_i("start","end","cancel","interrupt"),ls=[];function hs(t,e,r,i,a,o){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};!function(t,e,r){var i,a=t.__transition;function o(l){var h,c,d,u;if(1!==r.state)return n();for(h in a)if((u=a[h]).name===r.name){if(3===u.state)return ss(o);4===u.state?(u.state=6,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete a[h]):+h<e&&(u.state=6,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete a[h])}if(ss(function(){3===r.state&&(r.state=4,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(d=r.tween.length),h=0,c=-1;h<d;++h)(u=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=u);i.length=c+1}}function s(e){for(var a=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(n),r.state=5,1),o=-1,s=i.length;++o<s;)i[o].call(t,a);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),n())}function n(){for(var i in r.state=6,r.timer.stop(),delete a[e],a)return;delete t.__transition}(a[e]=r).timer=rs(function(t){r.state=1,r.timer.restart(o,r.delay,r.time),r.delay<=t&&o(t-r.delay)},0,r.time)}(t,r,{name:e,index:i,group:a,on:ns,tween:ls,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function cs(t,e){if((t=us(t,e)).state>0)throw new Error("too late; already scheduled");return t}function ds(t,e){if((t=us(t,e)).state>3)throw new Error("too late; already running");return t}function us(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function ps(t,e){var r,i;return function(){var a=ds(this,t),o=a.tween;if(o!==r)for(var s=0,n=(i=r=o).length;s<n;++s)if(i[s].name===e){(i=i.slice()).splice(s,1);break}a.tween=i}}function gs(t,e,r){var i,a;if("function"!=typeof r)throw new Error;return function(){var o=ds(this,t),s=o.tween;if(s!==i){a=(i=s).slice();for(var n={name:e,value:r},l=0,h=a.length;l<h;++l)if(a[l].name===e){a[l]=n;break}l===h&&a.push(n)}o.tween=a}}function fs(t,e,r){var i=t._id;return t.each(function(){var t=ds(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return us(t,i).value[e]}}function ys(t,e){var r;return("number"==typeof e?Eo:e instanceof lo?Ao:(r=lo(e))?(e=r,Ao):Io)(t,e)}function ms(t){return function(){this.removeAttribute(t)}}function Cs(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xs(t,e,r){var i,a,o=r+"";return function(){var s=this.getAttribute(t);return s===o?null:s===i?a:a=e(i=s,r)}}function bs(t,e,r){var i,a,o=r+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===i?a:a=e(i=s,r)}}function ks(t,e,r){var i,a,o;return function(){var s,n,l=r(this);if(null!=l)return(s=this.getAttribute(t))===(n=l+"")?null:s===i&&n===a?o:(a=n,o=e(i=s,l));this.removeAttribute(t)}}function ws(t,e,r){var i,a,o;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===a?o:(a=n,o=e(i=s,l));this.removeAttributeNS(t.space,t.local)}}function Ts(t,e){var r,i;function a(){var a=e.apply(this,arguments);return r=a!==i?(i=a)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,a):r}return a._value=e,a}function Ss(t,e){var r,i;function a(){var a=e.apply(this,arguments);return r=a!==i?(i=a)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,a):r}return a._value=e,a}function vs(t,e){return function(){cs(this,t).delay=+e.apply(this,arguments)}}function Bs(t,e){return e=+e,function(){cs(this,t).delay=e}}function _s(t,e){return function(){ds(this,t).duration=+e.apply(this,arguments)}}function Fs(t,e){return e=+e,function(){ds(this,t).duration=e}}var Ls=Wa.prototype.constructor;function Ms(t){return function(){this.style.removeProperty(t)}}var As=0;function Es(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Os(){return++As}var $s=Wa.prototype;Es.prototype={constructor:Es,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Pi(t));for(var i=this._groups,a=i.length,o=new Array(a),s=0;s<a;++s)for(var n,l,h=i[s],c=h.length,d=o[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,hs(d[u],e,r,u,d,us(n,r)));return new Es(o,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,a=i.length,o=[],s=[],n=0;n<a;++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=us(l,r),f=0,y=p.length;f<y;++f)(u=p[f])&&hs(u,e,r,f,p,g);o.push(p),s.push(l)}return new Es(o,s,e,r)},selectChild:$s.selectChild,selectChildren:$s.selectChildren,filter:function(t){"function"!=typeof t&&(t=Wi(t));for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a)for(var o,s=e[a],n=s.length,l=i[a]=[],h=0;h<n;++h)(o=s[h])&&t.call(o,o.__data__,h,s)&&l.push(o);return new Es(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,a=(t=r.length,Math.min(i,t)),o=new Array(i),s=0;s<a;++s)for(var n,l=e[s],h=r[s],c=l.length,d=o[s]=new Array(c),u=0;u<c;++u)(n=l[u]||h[u])&&(d[u]=n);for(;s<i;++s)o[s]=e[s];return new Es(o,this._parents,this._name,this._id)},selection:function(){return new Ls(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=Os(),i=this._groups,a=i.length,o=0;o<a;++o)for(var s,n=i[o],l=n.length,h=0;h<l;++h)(s=n[h])&&hs(s,t,r,h,n,{time:(s=us(s,e)).time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease});return new Es(i,this._parents,t,r)},call:$s.call,nodes:$s.nodes,node:$s.node,size:$s.size,empty:$s.empty,each:$s.each,on:function(t,e){var r=this._id;return arguments.length<2?us(this.node(),r).on.on(t):this.each(function(t,e,r){var i,a,o=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:ds;return function(){var s=o(this,t),n=s.on;n!==i&&(a=(i=n).copy()).on(e,r),s.on=a}}(r,t,e))},attr:function(t,e){var r=Oi(t),i="transform"===r?Ho:ys;return this.attrTween(t,"function"==typeof e?(r.local?ws:ks)(r,i,fs(this,"attr."+t,e)):null==e?(r.local?Cs:ms)(r):(r.local?bs:xs)(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;return t=Oi(t),this.tween(r,(t.local?Ts:Ss)(t,e))},style:function(t,e,r){var i="transform"==(t+="")?jo:ys;return null==e?this.styleTween(t,function(t,e){var r,i,a;return function(){var o=da(this,t),s=(this.style.removeProperty(t),da(this,t));return o===s?null:o===r&&s===i?a:a=e(r=o,i=s)}}(t,i)).on("end.style."+t,Ms(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,a,o;return function(){var s=da(this,t),n=r(this),l=n+"";return null==n&&(this.style.removeProperty(t),l=n=da(this,t)),s===l?null:s===i&&l===a?o:(a=l,o=e(i=s,n))}}(t,i,fs(this,"style."+t,e))).each(function(t,e){var r,i,a,o,s="style."+e,n="end."+s;return function(){var l=ds(this,t),h=l.on,c=null==l.value[s]?o=o||Ms(e):void 0;h===r&&a===c||(i=(r=h).copy()).on(n,a=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,a,o=r+"";return function(){var s=da(this,t);return s===o?null:s===i?a:a=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,a;function o(){var o=e.apply(this,arguments);return i=o!==a?(a=o)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,o,r):i}return o._value=e,o}(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}}(fs(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,a=us(this.node(),r).tween,o=0,s=a.length;o<s;++o)if((i=a[o]).name===t)return i.value;return null}return this.each((null==e?ps:gs)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?vs:Bs)(e,t)):us(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?_s:Fs)(e,t)):us(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(){ds(this,t).ease=e}}(e,t)):us(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;ds(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,a=r.size();return new Promise(function(o,s){var n={value:s},l={value:function(){0==--a&&o()}};r.each(function(){var r=ds(this,i),a=r.on;a!==t&&((e=(t=a).copy())._.cancel.push(n),e._.interrupt.push(n),e._.end.push(l)),r.on=e}),0===a&&o()})},[Symbol.iterator]:$s[Symbol.iterator]};var Is={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ds(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}Wa.prototype.interrupt=function(t){return this.each(function(){!function(t,e){var r,i,a,o=t.__transition,s=!0;if(o){for(a in e=null==e?null:e+"",o)(r=o[a]).name!==e?s=!1:(i=2<r.state&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete o[a]);s&&delete t.__transition}}(this,t)})},Wa.prototype.transition=function(t){var e,r;t=t instanceof Es?(e=t._id,t._name):(e=Os(),(r=Is).time=Jo(),null==t?null:t+"");for(var i=this._groups,a=i.length,o=0;o<a;++o)for(var s,n=i[o],l=n.length,h=0;h<l;++h)(s=n[h])&&hs(s,t,e,h,n,r||Ds(s,e));return new Es(i,this._parents,t,e)};let qs=Math.PI,Ps=2*qs,zs=1e-6,Rs=Ps-zs;function Ns(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class Ws{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Ns:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return Ns;let 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,a,o){this._append`C${+t},${+e},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,e,r,i,a){if(t=+t,e=+e,r=+r,i=+i,(a=+a)<0)throw new Error("negative radius: "+a);var o,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>zs&&(Math.abs(u*h-c*d)>zs&&a?(s=h*h+c*c,i=(r-=n)*r+(n=i-l)*n,l=Math.sqrt(s),o=Math.sqrt(p),p=(s=a*Math.tan((qs-Math.acos((s+p-i)/(2*l*o)))/2))/o,i=s/l,Math.abs(p-1)>zs&&this._append`L${t+p*d},${e+p*u}`,this._append`A${a},${a},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,a,o){if(t=+t,e=+e,o=!!o,(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^o,d=o?i-a:a-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>zs||Math.abs(this._y1-h)>zs)&&this._append`L${l},${h}`,r&&((d=d<0?d%Ps+Ps:d)>Rs?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>zs&&this._append`A${r},${r},0,${+(d>=qs)},${c},${this._x1=t+r*Math.cos(a)},${this._y1=e+r*Math.sin(a)}`)}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 js(t){return function(){return t}}let Hs=Math.abs,Us=Math.atan2,Ys=Math.cos,Gs=Math.max,Xs=Math.min,Vs=Math.sin,Zs=Math.sqrt,Qs=1e-12,Ks=Math.PI,Js=Ks/2,tn=2*Ks;function en(t){return 1<t?0:t<-1?Ks:Math.acos(t)}function rn(t){return 1<=t?Js:t<=-1?-Js:Math.asin(t)}function an(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 Ws(e)}function on(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function sn(t){this._context=t}function nn(t){return new sn(t)}function ln(t){return t[0]}function hn(t){return t[1]}function cn(t,e){var r=js(!0),i=null,a=nn,o=null,s=an(n);function n(n){var l,h,c,d=(n=on(n)).length,u=!1;for(null==i&&(o=a(c=s())),l=0;l<=d;++l)!(l<d&&r(h=n[l],l,n))===u&&((u=!u)?o.lineStart():o.lineEnd()),u&&o.point(+t(h,l,n),+e(h,l,n));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?ln:js(t),e="function"==typeof e?e:void 0===e?hn:js(e),n.x=function(e){return arguments.length?(t="function"==typeof e?e:js(+e),n):t},n.y=function(t){return arguments.length?(e="function"==typeof t?t:js(+t),n):e},n.defined=function(t){return arguments.length?(r="function"==typeof t?t:js(!!t),n):r},n.curve=function(t){return arguments.length?(a=t,null!=i&&(o=a(i)),n):a},n.context=function(t){return arguments.length?(null==t?i=o=null:o=a(i=t),n):i},n}sn.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 dn{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 un(t){return new dn(t,!0)}function pn(t){return new dn(t,!1)}function gn(){}function fn(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 yn(t){this._context=t}function mn(t){return new yn(t)}function Cn(t){this._context=t}function xn(t){this._context=t}function bn(t,e){this._basis=new yn(t),this._beta=e}yn.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:fn(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:fn(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Cn.prototype={areaStart:gn,areaEnd:gn,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:fn(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xn.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:fn(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},bn.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,a=t[0],o=e[0],s=t[r]-a,n=e[r]-o,l=-1;++l<=r;)this._basis.point(this._beta*t[l]+(1-this._beta)*(a+(i=l/r)*s),this._beta*e[l]+(1-this._beta)*(o+i*n));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var kn=function t(e){function r(t){return 1===e?new yn(t):new bn(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function wn(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 Tn(t,e){this._context=t,this._k=(1-e)/6}Tn.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:wn(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:wn(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 Sn=function t(e){function r(t){return new Tn(t,e)}return r.tension=function(e){return t(+e)},r}(0);function vn(t,e){this._context=t,this._k=(1-e)/6}vn.prototype={areaStart:gn,areaEnd:gn,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:wn(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 Bn=function t(e){function r(t){return new vn(t,e)}return r.tension=function(e){return t(+e)},r}(0);function _n(t,e){this._context=t,this._k=(1-e)/6}_n.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:wn(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 Fn=function t(e){function r(t){return new _n(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ln(t,e,r){var i,a,o=t._x1,s=t._y1,n=t._x2,l=t._y2;t._l01_a>Qs&&(o=(o*(i=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a)-t._x0*t._l12_2a+t._x2*t._l01_2a)/(a=3*t._l01_a*(t._l01_a+t._l12_a)),s=(s*i-t._y0*t._l12_2a+t._y2*t._l01_2a)/a),t._l23_a>Qs&&(n=(n*(i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a)+t._x1*t._l23_2a-e*t._l12_2a)/(a=3*t._l23_a*(t._l23_a+t._l12_a)),l=(l*i+t._y1*t._l23_2a-r*t._l12_2a)/a),t._context.bezierCurveTo(o,s,n,l,t._x2,t._y2)}function Mn(t,e){this._context=t,this._alpha=e}Mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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:Ln(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 An=function t(e){function r(t){return e?new Mn(t,e):new Tn(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function En(t,e){this._context=t,this._alpha=e}En.prototype={areaStart:gn,areaEnd:gn,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:Ln(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 On=function t(e){function r(t){return e?new En(t,e):new vn(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function $n(t,e){this._context=t,this._alpha=e}$n.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:Ln(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 In=function t(e){function r(t){return e?new $n(t,e):new _n(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Dn(t){this._context=t}function qn(t){return t<0?-1:1}function Pn(t,e,r){var i=t._x1-t._x0,a=(e=e-t._x1,(t._y1-t._y0)/(i||e<0&&-0));t=(a*e+(r=(r-t._y1)/(e||i<0&&-0))*i)/(i+e);return(qn(a)+qn(r))*Math.min(Math.abs(a),Math.abs(r),.5*Math.abs(t))||0}function zn(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Rn(t,e,r){var i=t._x0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,t._y0+s*e,a-s,o-s*r,a,o)}function Nn(t){this._context=t}function Wn(t){this._context=new jn(t)}function jn(t){this._context=t}function Hn(t){return new Nn(t)}function Un(t){return new Wn(t)}function Yn(t){this._context=t}function Gn(t){var e,r,i=t.length-1,a=new Array(i),o=new Array(i),s=new Array(i);for(o[a[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e<i-1;++e)a[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(a[i-1]=2,o[i-1]=7,s[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=a[e]/o[e-1],o[e]-=r,s[e]-=r*s[e-1];for(a[i-1]=s[i-1]/o[i-1],e=i-2;0<=e;--e)a[e]=(s[e]-a[e+1])/o[e];for(o[i-1]=(t[i]+a[i-1])/2,e=0;e<i-1;++e)o[e]=2*t[e+1]-a[e+1];return[a,o]}function Xn(t){return new Yn(t)}function Vn(t,e){this._context=t,this._t=e}function Zn(t){return new Vn(t,.5)}function Qn(t){return new Vn(t,0)}function Kn(t){return new Vn(t,1)}function Jn(t,e,r){this.k=t,this.x=e,this.y=r}Dn.prototype={areaStart:gn,areaEnd:gn,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))}},Nn.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:Rn(this,this._t0,zn(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,Rn(this,zn(this,r=Pn(this,t,e)),r);break;default:Rn(this,this._t0,r=Pn(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(Wn.prototype=Object.create(Nn.prototype)).point=function(t,e){Nn.prototype.point.call(this,e,t)},jn.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,a,o){this._context.bezierCurveTo(e,t,i,r,o,a)}},Yn.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=Gn(t),a=Gn(e),o=0,s=1;s<r;++o,++s)this._context.bezierCurveTo(i[0][o],a[0][o],i[1][o],a[1][o],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)}},Vn.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}},Jn.prototype={constructor:Jn,scale:function(t){return 1===t?this:new Jn(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Jn(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+")"}};var tl=i(t=>{var e=yi().securityLevel;let r=ja("body");return"sandbox"===e&&(e=ja("#i"+t).node()?.contentDocument??document,r=ja(e.body)),r.select("#"+t)},"selectSvgElement");function el(t){return null==t}function rl(t){return"object"==typeof t&&null!==t}function il(t){return Array.isArray(t)?t:el(t)?[]:[t]}function al(t,e){var r,i,a,o;if(e)for(r=0,i=(o=Object.keys(e)).length;r<i;r+=1)t[a=o[r]]=e[a];return t}function ol(t,e){for(var r="",i=0;i<e;i+=1)r+=t;return r}function sl(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}i(el,"isNothing"),i(rl,"isObject"),i(il,"toArray"),i(al,"extend"),i(ol,"repeat"),i(sl,"isNegativeZero");var nl={isNothing:el,isObject:rl,toArray:il,repeat:ol,isNegativeZero:sl,extend:al};function ll(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 hl(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ll(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}i(ll,"formatError"),i(hl,"YAMLException$1"),hl.prototype=Object.create(Error.prototype),(hl.prototype.constructor=hl).prototype.toString=i(function(t){return this.name+": "+ll(this,t)},"toString");var cl=hl;function dl(t,e,r,i,a){var o="",s="";return(a=Math.floor(a/2)-1)<i-e&&(e=i-a+(o=" ... ").length),a<r-i&&(r=i+a-(s=" ...").length),{str:o+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+o.length}}function ul(t,e){return nl.repeat(" ",e-t.length)+t}function pl(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,a=[0],o=[],s=-1;r=i.exec(t.buffer);)o.push(r.index),a.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);for(var n,l="",h=Math.min(t.line+e.linesAfter,o.length).toString().length,c=e.maxLength-(e.indent+h+3),d=1;d<=e.linesBefore&&!(s-d<0);d++)n=dl(t.buffer,a[s-d],o[s-d],t.position-(a[s]-a[s-d]),c),l=nl.repeat(" ",e.indent)+ul((t.line-d+1).toString(),h)+" | "+n.str+"\n"+l;for(n=dl(t.buffer,a[s],o[s],t.position,c),l=(l+=nl.repeat(" ",e.indent)+ul((t.line+1).toString(),h)+" | "+n.str+"\n")+nl.repeat("-",e.indent+h+3+n.pos)+"^\n",d=1;d<=e.linesAfter&&!(o.length<=s+d);d++)n=dl(t.buffer,a[s+d],o[s+d],t.position-(a[s]-a[s+d]),c),l+=nl.repeat(" ",e.indent)+ul((t.line+d+1).toString(),h)+" | "+n.str+"\n";return l.replace(/\n$/,"")}i(dl,"getLine"),i(ul,"padStart"),i(pl,"makeSnippet");var gl=pl,fl=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],yl=["scalar","sequence","mapping"];function ml(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function Cl(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===fl.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=ml(e.styleAliases||null),-1===yl.indexOf(this.kind))throw new cl('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}i(ml,"compileStyleAliases"),i(Cl,"Type$1");var xl=Cl;function bl(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 kl(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(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(a,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(a);return r}function wl(t){return this.extend(t)}i(bl,"compileList"),i(kl,"compileMap"),i(wl,"Schema$1"),wl.prototype.extend=i(function(t){var e=[],r=[];if(t instanceof xl)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 xl))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 xl))throw new cl("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(wl.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=bl(t,"implicit"),t.compiledExplicit=bl(t,"explicit"),t.compiledTypeMap=kl(t.compiledImplicit,t.compiledExplicit),t},"extend");var Tl=wl,Sl=new xl("tag:yaml.org,2002:str",{kind:"scalar",construct:i(function(t){return null!==t?t:""},"construct")}),vl=new xl("tag:yaml.org,2002:seq",{kind:"sequence",construct:i(function(t){return null!==t?t:[]},"construct")}),Bl=new xl("tag:yaml.org,2002:map",{kind:"mapping",construct:i(function(t){return null!==t?t:{}},"construct")}),_l=new Tl({explicit:[Sl,vl,Bl]});function Fl(t){var e;return null===t||1===(e=t.length)&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function Ll(){return null}function Ml(t){return null===t}i(Fl,"resolveYamlNull"),i(Ll,"constructYamlNull"),i(Ml,"isNull");var Al=new xl("tag:yaml.org,2002:null",{kind:"scalar",resolve:Fl,construct:Ll,predicate:Ml,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 El(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 Ol(t){return"true"===t||"True"===t||"TRUE"===t}function $l(t){return"[object Boolean]"===Object.prototype.toString.call(t)}i(El,"resolveYamlBoolean"),i(Ol,"constructYamlBoolean"),i($l,"isBoolean");var Il=new xl("tag:yaml.org,2002:bool",{kind:"scalar",resolve:El,construct:Ol,predicate:$l,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 Dl(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function ql(t){return 48<=t&&t<=55}function Pl(t){return 48<=t&&t<=57}function zl(t){if(null===t)return!1;var e,r=t.length,i=0,a=!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;a=!0}return a&&"_"!==e}if("x"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!Dl(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}if("o"===e){for(i++;i<r;i++)if("_"!==(e=t[i])){if(!ql(t.charCodeAt(i)))return!1;a=!0}return a&&"_"!==e}}if("_"===e)return!1;for(;i<r;i++)if("_"!==(e=t[i])){if(!Pl(t.charCodeAt(i)))return!1;a=!0}return!(!a||"_"===e)}function Rl(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 Nl(t){return"[object Number]"===Object.prototype.toString.call(t)&&t%1==0&&!nl.isNegativeZero(t)}i(Dl,"isHexCode"),i(ql,"isOctCode"),i(Pl,"isDecCode"),i(zl,"resolveYamlInteger"),i(Rl,"constructYamlInteger"),i(Nl,"isInteger");var Wl=new xl("tag:yaml.org,2002:int",{kind:"scalar",resolve:zl,construct:Rl,predicate:Nl,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"]}}),jl=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Hl(t){return null!==t&&!(!jl.test(t)||"_"===t[t.length-1])}function Ul(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(Hl,"resolveYamlFloat"),i(Ul,"constructYamlFloat");var Yl=/^[-+]?[0-9]+e/;function Gl(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(nl.isNegativeZero(t))return"-0.0";return e=t.toString(10),Yl.test(e)?e.replace("e",".e"):e}function Xl(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||nl.isNegativeZero(t))}i(Gl,"representYamlFloat"),i(Xl,"isFloat");var Vl=new xl("tag:yaml.org,2002:float",{kind:"scalar",resolve:Hl,construct:Ul,predicate:Xl,represent:Gl,defaultStyle:"lowercase"}),Zl=_l.extend({implicit:[Al,Il,Wl,Vl]}),Ql=Zl,Kl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Jl=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 th(t){return null!==t&&(null!==Kl.exec(t)||null!==Jl.exec(t))}function eh(t){var e,r,i,a,o,s=0,n=null,l=Kl.exec(t);if(null===(l=null===l?Jl.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],a=+l[5],o=+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,a,o,s)),n&&l.setTime(l.getTime()-n),l}function rh(t){return t.toISOString()}i(th,"resolveYamlTimestamp"),i(eh,"constructYamlTimestamp"),i(rh,"representYamlTimestamp");var ih=new xl("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:th,construct:eh,instanceOf:Date,represent:rh});function ah(t){return"<<"===t||null===t}i(ah,"resolveYamlMerge");var oh=new xl("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ah}),sh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function nh(t){if(null===t)return!1;for(var e,r=0,i=t.length,a=sh,o=0;o<i;o++)if(!(64<(e=a.indexOf(t.charAt(o))))){if(e<0)return!1;r+=6}return r%8==0}function lh(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,i=sh,a=0,o=[],s=0;s<r;s++)s%4==0&&s&&(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)),a=a<<6|i.indexOf(e.charAt(s));return 0==(t=r%4*6)?(o.push(a>>16&255),o.push(a>>8&255),o.push(255&a)):18==t?(o.push(a>>10&255),o.push(a>>2&255)):12==t&&o.push(a>>4&255),new Uint8Array(o)}function hh(t){for(var e,r="",i=0,a=t.length,o=sh,s=0;s<a;s++)s%3==0&&s&&(r=(r=(r=(r+=o[i>>18&63])+o[i>>12&63])+o[i>>6&63])+o[63&i]),i=(i<<8)+t[s];return 0==(e=a%3)?r=(r=(r=(r+=o[i>>18&63])+o[i>>12&63])+o[i>>6&63])+o[63&i]:2==e?r=(r=(r=(r+=o[i>>10&63])+o[i>>4&63])+o[i<<2&63])+o[64]:1==e&&(r=(r=(r=(r+=o[i>>2&63])+o[i<<4&63])+o[64])+o[64]),r}function ch(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}i(nh,"resolveYamlBinary"),i(lh,"constructYamlBinary"),i(hh,"representYamlBinary"),i(ch,"isBinary");var dh=new xl("tag:yaml.org,2002:binary",{kind:"scalar",resolve:nh,construct:lh,predicate:ch,represent:hh}),uh=Object.prototype.hasOwnProperty,ph=Object.prototype.toString;function gh(t){if(null!==t)for(var e,r,i,a=[],o=t,s=0,n=o.length;s<n;s+=1){if(e=o[s],i=!1,"[object Object]"!==ph.call(e))return!1;for(r in e)if(uh.call(e,r)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==a.indexOf(r))return!1;a.push(r)}return!0}function fh(t){return null!==t?t:[]}i(gh,"resolveYamlOmap"),i(fh,"constructYamlOmap");var yh=new xl("tag:yaml.org,2002:omap",{kind:"sequence",resolve:gh,construct:fh}),mh=Object.prototype.toString;function Ch(t){if(null!==t)for(var e,r,i=t,a=new Array(i.length),o=0,s=i.length;o<s;o+=1){if(e=i[o],"[object Object]"!==mh.call(e))return!1;if(1!==(r=Object.keys(e)).length)return!1;a[o]=[r[0],e[r[0]]]}return!0}function xh(t){if(null===t)return[];for(var e,r,i=t,a=new Array(i.length),o=0,s=i.length;o<s;o+=1)e=i[o],r=Object.keys(e),a[o]=[r[0],e[r[0]]];return a}i(Ch,"resolveYamlPairs"),i(xh,"constructYamlPairs");var bh=new xl("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ch,construct:xh}),kh=Object.prototype.hasOwnProperty;function wh(t){if(null!==t){var e,r=t;for(e in r)if(kh.call(r,e)&&null!==r[e])return!1}return!0}function Th(t){return null!==t?t:{}}i(wh,"resolveYamlSet"),i(Th,"constructYamlSet");var Sh=new xl("tag:yaml.org,2002:set",{kind:"mapping",resolve:wh,construct:Th}),vh=Ql.extend({implicit:[ih,oh],explicit:[dh,yh,bh,Sh]}),Bh=Object.prototype.hasOwnProperty,_h=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Fh=/[\x85\u2028\u2029]/,Lh=/[,\[\]\{\}]/,Mh=/^(?:!|!!|![a-z\-]+!)$/i,Ah=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Eh(t){return Object.prototype.toString.call(t)}function Oh(t){return 10===t||13===t}function $h(t){return 9===t||32===t}function Ih(t){return 9===t||32===t||10===t||13===t}function Dh(t){return 44===t||91===t||93===t||123===t||125===t}function qh(t){return 48<=t&&t<=57?t-48:97<=(t|=32)&&t<=102?t-97+10:-1}function Ph(t){return 120===t?2:117===t?4:85===t?8:0}function zh(t){return 48<=t&&t<=57?t-48:-1}function Rh(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 Nh(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Wh(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}i(Eh,"_class"),i(Oh,"is_EOL"),i($h,"is_WHITE_SPACE"),i(Ih,"is_WS_OR_EOL"),i(Dh,"is_FLOW_INDICATOR"),i(qh,"fromHexCode"),i(Ph,"escapedHexLen"),i(zh,"fromDecimalCode"),i(Rh,"simpleEscapeSequence"),i(Nh,"charFromCodepoint"),i(Wh,"setProperty");for(var jh=new Array(256),Hh=new Array(256),Uh=0;Uh<256;Uh++)jh[Uh]=Rh(Uh)?1:0,Hh[Uh]=Rh(Uh);function Yh(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vh,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 Gh(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=gl(t),new cl(e,t)}function Xh(t,e){throw Gh(t,e)}function Vh(t,e){t.onWarning&&t.onWarning.call(null,Gh(t,e))}i(Yh,"State$1"),i(Gh,"generateError"),i(Xh,"throwError"),i(Vh,"throwWarning");var Zh={YAML:i(function(t,e,r){var i,a;null!==t.version&&Xh(t,"duplication of %YAML directive"),1!==r.length&&Xh(t,"YAML directive accepts exactly one argument"),null===(a=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Xh(t,"ill-formed argument of the YAML directive"),i=parseInt(a[1],10),a=parseInt(a[2],10),1!==i&&Xh(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Vh(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:i(function(t,e,r){var i;2!==r.length&&Xh(t,"TAG directive accepts exactly two arguments"),i=r[1],Mh.test(r=r[0])||Xh(t,"ill-formed tag handle (first argument) of the TAG directive"),Bh.call(t.tagMap,r)&&Xh(t,'there is a previously declared suffix for "'+r+'" tag handle'),Ah.test(i)||Xh(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){Xh(t,"tag prefix is malformed: "+i)}t.tagMap[r]=i},"handleTagDirective")};function Qh(t,e,r,i){var a,o,s,n;if(e<r){if(n=t.input.slice(e,r),i)for(a=0,o=n.length;a<o;a+=1)9===(s=n.charCodeAt(a))||32<=s&&s<=1114111||Xh(t,"expected valid JSON character");else _h.test(n)&&Xh(t,"the stream contains non-printable characters");t.result+=n}}function Kh(t,e,r,i){var a,o,s,n;for(nl.isObject(r)||Xh(t,"cannot merge mappings; the provided source object is unacceptable"),s=0,n=(a=Object.keys(r)).length;s<n;s+=1)o=a[s],Bh.call(e,o)||(Wh(e,o,r[o]),i[o]=!0)}function Jh(t,e,r,i,a,o,s,n,l){var h,c;if(Array.isArray(a))for(h=0,c=(a=Array.prototype.slice.call(a)).length;h<c;h+=1)Array.isArray(a[h])&&Xh(t,"nested arrays are not supported inside keys"),"object"==typeof a&&"[object Object]"===Eh(a[h])&&(a[h]="[object Object]");if("object"==typeof a&&"[object Object]"===Eh(a)&&(a="[object Object]"),a=String(a),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(h=0,c=o.length;h<c;h+=1)Kh(t,e,o[h],r);else Kh(t,e,o,r);else t.json||Bh.call(r,a)||!Bh.call(e,a)||(t.line=s||t.line,t.lineStart=n||t.lineStart,t.position=l||t.position,Xh(t,"duplicated mapping key")),Wh(e,a,o),delete r[a];return e}function tc(t){var e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):Xh(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function ec(t,e,r){for(var i=0,a=t.input.charCodeAt(t.position);0!==a;){for(;$h(a);)9===a&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&35===a)for(;10!==(a=t.input.charCodeAt(++t.position))&&13!==a&&0!==a;);if(!Oh(a))break;for(tc(t),a=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&Vh(t,"deficient indentation"),i}function rc(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))&&!Ih(r))}function ic(t,e){1===e?t.result+=" ":1<e&&(t.result+=nl.repeat("\n",e-1))}function ac(t,e,r){var i,a,o,s,n,l,h,c=t.kind,d=t.result,u=t.input.charCodeAt(t.position);if(!Ih(u)&&!Dh(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||!(Ih(i=t.input.charCodeAt(t.position+1))||r&&Dh(i)))){for(t.kind="scalar",t.result="",a=o=t.position,s=!1;0!==u;){if(58===u){if(Ih(i=t.input.charCodeAt(t.position+1))||r&&Dh(i))break}else if(35===u){if(Ih(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&rc(t)||r&&Dh(u))break;if(Oh(u)){if(n=t.line,l=t.lineStart,h=t.lineIndent,ec(t,!1,-1),t.lineIndent>=e){s=!0,u=t.input.charCodeAt(t.position);continue}t.position=o,t.line=n,t.lineStart=l,t.lineIndent=h;break}}s&&(Qh(t,a,o,!1),ic(t,t.line-n),a=o=t.position,s=!1),$h(u)||(o=t.position+1),u=t.input.charCodeAt(++t.position)}if(Qh(t,a,o,!1),t.result)return!0;t.kind=c,t.result=d}return!1}function oc(t,e){var r,i,a=t.input.charCodeAt(t.position);if(39!==a)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(a=t.input.charCodeAt(t.position));)if(39===a){if(Qh(t,r,t.position,!0),39!==(a=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else Oh(a)?(Qh(t,r,i,!0),ic(t,ec(t,!1,e)),r=i=t.position):t.position===t.lineStart&&rc(t)?Xh(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Xh(t,"unexpected end of the stream within a single quoted scalar")}function sc(t,e){var r,i,a,o,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 Qh(t,r,t.position,!0),t.position++,!0;if(92===n){if(Qh(t,r,t.position,!0),Oh(n=t.input.charCodeAt(++t.position)))ec(t,!1,e);else if(n<256&&jh[n])t.result+=Hh[n],t.position++;else if(0<(s=Ph(n))){for(a=s,o=0;0<a;a--)0<=(s=qh(n=t.input.charCodeAt(++t.position)))?o=(o<<4)+s:Xh(t,"expected hexadecimal character");t.result+=Nh(o),t.position++}else Xh(t,"unknown escape sequence");r=i=t.position}else Oh(n)?(Qh(t,r,i,!0),ic(t,ec(t,!1,e)),r=i=t.position):t.position===t.lineStart&&rc(t)?Xh(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Xh(t,"unexpected end of the stream within a double quoted scalar")}function nc(t,e){var r,i,a,o,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),o=[];else{if(123!==m)return!1;s=125,h=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),m=t.input.charCodeAt(++t.position);0!==m;){if(ec(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=o,!0;p?44===m&&Xh(t,"expected the node content, but found ','"):Xh(t,"missed comma between flow collection entries"),u=null,n=l=!1,63===m&&Ih(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,ec(t,!0,e)),r=t.line,i=t.lineStart,a=t.position,gc(t,e,1,!1,!0),d=t.tag,c=t.result,ec(t,!0,e),m=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==m||(n=!0,m=t.input.charCodeAt(++t.position),ec(t,!0,e),gc(t,e,1,!1,!0),u=t.result),h?Jh(t,o,y,d,c,u,r,i,a):n?o.push(Jh(t,null,y,d,c,u,r,i,a)):o.push(c),ec(t,!0,e),44===(m=t.input.charCodeAt(t.position))?(p=!0,m=t.input.charCodeAt(++t.position)):p=!1}Xh(t,"unexpected end of the stream within a flow collection")}function lc(t,e){var r,i,a,o=1,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)1===o?o=43===d?3:2:Xh(t,"repeat of a chomping mode identifier");else{if(!(0<=(a=zh(d))))break;0===a?Xh(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?Xh(t,"repeat of an indentation width identifier"):(l=e+a-1,n=!0)}if($h(d)){for(;$h(d=t.input.charCodeAt(++t.position)););if(35===d)for(;!Oh(d=t.input.charCodeAt(++t.position))&&0!==d;);}for(;0!==d;){for(tc(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),Oh(d))h++;else{if(t.lineIndent<l){3===o?t.result+=nl.repeat("\n",s?1+h:h):1===o&&s&&(t.result+="\n");break}for(i?$h(d)?(c=!0,t.result+=nl.repeat("\n",s?1+h:h)):c?(c=!1,t.result+=nl.repeat("\n",h+1)):0===h?s&&(t.result+=" "):t.result+=nl.repeat("\n",h):t.result+=nl.repeat("\n",s?1+h:h),n=s=!0,h=0,r=t.position;!Oh(d)&&0!==d;)d=t.input.charCodeAt(++t.position);Qh(t,r,t.position,!1)}}return!0}function hc(t,e){var r,i,a=t.tag,o=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,Xh(t,"tab characters must not be used in indentation")),45===i)&&Ih(t.input.charCodeAt(t.position+1));)if(n=!0,t.position++,ec(t,!0,-1)&&t.lineIndent<=e)s.push(null),i=t.input.charCodeAt(t.position);else if(r=t.line,gc(t,e,3,!1,!0),s.push(t.result),ec(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==i)Xh(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!n&&(t.tag=a,t.anchor=o,t.kind="sequence",t.result=s,!0)}function cc(t,e,r){var i,a,o,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,Xh(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),o=t.line,63!==h&&58!==h||!Ih(i)){if(s=t.line,n=t.lineStart,l=t.position,!gc(t,r,2,!1,!0))break;if(t.line===o){for(h=t.input.charCodeAt(t.position);$h(h);)h=t.input.charCodeAt(++t.position);if(58===h)Ih(h=t.input.charCodeAt(++t.position))||Xh(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(Jh(t,u,p,g,f,null,s,n,l),g=f=y=null),a=m=!(C=!0),g=t.tag,f=t.result;else{if(!C)return t.tag=c,t.anchor=d,!0;Xh(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!C)return t.tag=c,t.anchor=d,!0;Xh(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===h?(m&&(Jh(t,u,p,g,f,null,s,n,l),g=f=y=null),a=m=C=!0):m?a=!(m=!1):Xh(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===o||t.lineIndent>e)&&(m&&(s=t.line,n=t.lineStart,l=t.position),gc(t,e,4,!0,a)&&(m?f=t.result:y=t.result),m||(Jh(t,u,p,g,f,y,s,n,l),g=f=y=null),ec(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==h)Xh(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&Jh(t,u,p,g,f,null,s,n,l),C&&(t.tag=c,t.anchor=d,t.kind="mapping",t.result=u),C}function dc(t){var e,r,i,a=!1,o=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;if(null!==t.tag&&Xh(t,"duplication of a tag property"),60===(s=t.input.charCodeAt(++t.position))?(a=!0,s=t.input.charCodeAt(++t.position)):33===s?(o=!0,r="!!",s=t.input.charCodeAt(++t.position)):r="!",e=t.position,a){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)):Xh(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!Ih(s);)33===s&&(o?Xh(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),Mh.test(r)||Xh(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),Lh.test(i)&&Xh(t,"tag suffix cannot contain flow indicator characters")}i&&!Ah.test(i)&&Xh(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(e){Xh(t,"tag name is malformed: "+i)}return a?t.tag=i:Bh.call(t.tagMap,r)?t.tag=t.tagMap[r]+i:"!"===r?t.tag="!"+i:"!!"===r?t.tag="tag:yaml.org,2002:"+i:Xh(t,'undeclared tag handle "'+r+'"'),!0}function uc(t){var e,r=t.input.charCodeAt(t.position);if(38!==r)return!1;for(null!==t.anchor&&Xh(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!Ih(r)&&!Dh(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Xh(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function pc(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&&!Ih(r)&&!Dh(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Xh(t,"name of an alias node must contain at least one character"),e=t.input.slice(e,t.position),Bh.call(t.anchorMap,e)||Xh(t,'unidentified alias "'+e+'"'),t.result=t.anchorMap[e],ec(t,!0,-1),!0}function gc(t,e,r,i,a){var o,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,o=s=n=4===r||3===r,i&&ec(t,!0,-1)&&(p=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),1===u)for(;dc(t)||uc(t);)ec(t,!0,-1)?(p=!0,n=o,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):n=!1;if(n=n&&(p||a),1!==u&&4!==r||(i=1===r||2===r?e:e+1,a=t.position-t.lineStart,1===u?n&&(hc(t,a)||cc(t,a,i))||nc(t,i)?g=!0:(s&&lc(t,i)||oc(t,i)||sc(t,i)?g=!0:pc(t)?(g=!0,null===t.tag&&null===t.anchor||Xh(t,"alias node should not have any properties")):ac(t,i,1===r)&&(g=!0,null===t.tag)&&(t.tag="?"),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===u&&(g=n&&hc(t,a))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Xh(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(Bh.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||Xh(t,"unknown tag !<"+t.tag+">"),null!==t.result&&d.kind!==t.kind&&Xh(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)):Xh(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 fc(t){var e,r,i,a,o=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(a=t.input.charCodeAt(t.position))&&(ec(t,!0,-1),a=t.input.charCodeAt(t.position),!(0<t.lineIndent||37!==a));){for(s=!0,a=t.input.charCodeAt(++t.position),e=t.position;0!==a&&!Ih(a);)a=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Xh(t,"directive name must not be less than one character in length");0!==a;){for(;$h(a);)a=t.input.charCodeAt(++t.position);if(35===a){for(;0!==(a=t.input.charCodeAt(++t.position))&&!Oh(a););break}if(Oh(a))break;for(e=t.position;0!==a&&!Ih(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==a&&tc(t),Bh.call(Zh,r)?Zh[r](t,r,i):Vh(t,'unknown document directive "'+r+'"')}ec(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,ec(t,!0,-1)):s&&Xh(t,"directives end mark is expected"),gc(t,t.lineIndent-1,4,!1,!0),ec(t,!0,-1),t.checkLineBreaks&&Fh.test(t.input.slice(o,t.position))&&Vh(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&rc(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,ec(t,!0,-1)):t.position<t.length-1&&Xh(t,"end of the stream or a document separator is expected")}function yc(t,e){e=e||{};var r=new Yh(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,Xh(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;)fc(r);return r.documents}function mc(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);var i=yc(t,r);if("function"!=typeof e)return i;for(var a=0,o=i.length;a<o;a+=1)e(i[a])}function Cc(t,e){if(0!==(t=yc(t,e)).length){if(1===t.length)return t[0];throw new cl("expected a single document in the stream, but found more")}}i(Qh,"captureSegment"),i(Kh,"mergeMappings"),i(Jh,"storeMappingPair"),i(tc,"readLineBreak"),i(ec,"skipSeparationSpace"),i(rc,"testDocumentSeparator"),i(ic,"writeFoldedLines"),i(ac,"readPlainScalar"),i(oc,"readSingleQuotedScalar"),i(sc,"readDoubleQuotedScalar"),i(nc,"readFlowCollection"),i(lc,"readBlockScalar"),i(hc,"readBlockSequence"),i(cc,"readBlockMapping"),i(dc,"readTagProperty"),i(uc,"readAnchorProperty"),i(pc,"readAlias"),i(gc,"composeNode"),i(fc,"readDocument"),i(yc,"loadDocuments"),i(mc,"loadAll$1"),i(Cc,"load$1");var xc=Cc,bc=Object.prototype.toString,kc=Object.prototype.hasOwnProperty,wc=65279,Tc={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"},Sc=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],vc=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Bc(t,e){var r,i,a,o,s,n,l;if(null===e)return{};for(r={},a=0,o=(i=Object.keys(e)).length;a<o;a+=1)s=i[a],n=String(e[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),(l=t.compiledTypeMap.fallback[s])&&kc.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[s]=n;return r}function _c(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+nl.repeat("0",r-i.length)+i}i(Bc,"compileStyleMap"),i(_c,"encodeHex");function Fc(t){this.schema=t.schema||vh,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=nl.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Bc(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Lc(t,e){for(var r,i,a=nl.repeat(" ",e),o=0,s="",n=t.length;o<n;)o=-1===(r=t.indexOf("\n",o))?(i=t.slice(o),n):(i=t.slice(o,r+1),r+1),i.length&&"\n"!==i&&(s+=a),s+=i;return s}function Mc(t,e){return"\n"+nl.repeat(" ",t.indent*e)}function Ac(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 Ec(t){return 32===t||9===t}function Oc(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==wc||65536<=t&&t<=1114111}function $c(t){return Oc(t)&&t!==wc&&13!==t&&10!==t}function Ic(t,e,r){var i=$c(t),a=i&&!Ec(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!a)||$c(e)&&!Ec(e)&&35===t||58===e&&a}function Dc(t){return Oc(t)&&t!==wc&&!Ec(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function qc(t){return!Ec(t)&&58!==t}function Pc(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 zc(t){return/^\n* /.test(t)}i(Fc,"State"),i(Lc,"indentString"),i(Mc,"generateNextLine"),i(Ac,"testImplicitResolving"),i(Ec,"isWhitespace"),i(Oc,"isPrintable"),i($c,"isNsCharOrWhitespace"),i(Ic,"isPlainSafe"),i(Dc,"isPlainSafeFirst"),i(qc,"isPlainSafeLast"),i(Pc,"codePointAt"),i(zc,"needIndentIndicator");function Rc(t,e,r,i,a,o,s,n){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Dc(Pc(t,0))&&qc(Pc(t,t.length-1));if(e||s)for(l=0;l<t.length;65536<=h?l+=2:l++){if(!Oc(h=Pc(t,l)))return 5;f=f&&Ic(h,c,n),c=h}else{for(l=0;l<t.length;65536<=h?l+=2:l++){if(10===(h=Pc(t,l)))d=!0,p&&(u=u||i<l-g-1&&" "!==t[g+1],g=l);else if(!Oc(h))return 5;f=f&&Ic(h,c,n),c=h}u=u||p&&i<l-g-1&&" "!==t[g+1]}return d||u?9<r&&zc(t)?5:s?2===o?5:2:u?4:3:!f||s||a(t)?2===o?5:2:1}function Nc(t,e,r,a,o){t.dump=(()=>{if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Sc.indexOf(e)||vc.test(e)))return 2===t.quotingType?'"'+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=a||-1<t.flowLevel&&r>=t.flowLevel;function h(e){return Ac(t,e)}switch(i(h,"testAmbiguity"),Rc(e,l,t.indent,n,h,t.quotingType,t.forceQuotes&&!a,o)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Wc(e,t.indent)+jc(Lc(e,s));case 4:return">"+Wc(e,t.indent)+jc(Lc(Hc(e,n),s));case 5:return'"'+Yc(e)+'"';default:throw new cl("impossible error: invalid scalar style")}})()}function Wc(t,e){e=zc(t)?String(e):"";var r="\n"===t[t.length-1];return e+(!r||"\n"!==t[t.length-2]&&"\n"!==t?r?"":"-":"+")+"\n"}function jc(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Hc(t,e){for(var r,i=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,i.lastIndex=r,Uc(t.slice(0,r),e)),o="\n"===t[0]||" "===t[0];n=i.exec(t);){var s=n[1],n=n[2],l=" "===n[0];a+=s+(o||l||""===n?"":"\n")+Uc(n,e),o=l}return a}function Uc(t,e){if(""===t||" "===t[0])return t;for(var r,i,a=/ [^ ]/g,o=0,s=0,n="";i=a.exec(t);)e<(i=i.index)-o&&(n+="\n"+t.slice(o,r=o<s?s:i),o=r+1),s=i;return n+="\n",t.length-o>e&&o<s?n+=t.slice(o,s)+"\n"+t.slice(s+1):n+=t.slice(o),n.slice(1)}function Yc(t){for(var e,r,i="",a=0;a<t.length;65536<=e?a+=2:a++)e=Pc(t,a),!(r=Tc[e])&&Oc(e)?(i+=t[a],65536<=e&&(i+=t[a+1])):i+=r||_c(e);return i}function Gc(t,e,r){for(var i,a="",o=t.tag,s=0,n=r.length;s<n;s+=1)i=r[s],t.replacer&&(i=t.replacer.call(r,String(s),i)),(Kc(t,e,i,!1,!1)||void 0===i&&Kc(t,e,null,!1,!1))&&(""!==a&&(a+=","+(t.condenseFlow?"":" ")),a+=t.dump);t.tag=o,t.dump="["+a+"]"}function Xc(t,e,r,i){for(var a,o="",s=t.tag,n=0,l=r.length;n<l;n+=1)a=r[n],t.replacer&&(a=t.replacer.call(r,String(n),a)),(Kc(t,e+1,a,!0,!0,!1,!0)||void 0===a&&Kc(t,e+1,null,!0,!0,!1,!0))&&(i&&""===o||(o+=Mc(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump);t.tag=s,t.dump=o||"[]"}function Vc(t,e,r){for(var i,a,o,s="",n=t.tag,l=Object.keys(r),h=0,c=l.length;h<c;h+=1)(o="")!==s&&(o+=", "),t.condenseFlow&&(o+='"'),a=r[i=l[h]],t.replacer&&(a=t.replacer.call(r,i,a)),Kc(t,e,i,!1,!1)&&(1024<t.dump.length&&(o+="? "),o+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Kc(t,e,a,!1,!1))&&(s+=o+=t.dump);t.tag=n,t.dump="{"+s+"}"}function Zc(t,e,r,i){var a,o,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(a=0,o=d.length;a<o;a+=1)l="",i&&""===h||(l+=Mc(t,e)),s=r[n=d[a]],t.replacer&&(s=t.replacer.call(r,n,s)),Kc(t,e+1,n,!0,!0,!0)&&((n=null!==t.tag&&"?"!==t.tag||t.dump&&1024<t.dump.length)&&(t.dump&&10===t.dump.charCodeAt(0)?l+="?":l+="? "),l+=t.dump,n&&(l+=Mc(t,e)),Kc(t,e+1,s,!0,n))&&(t.dump&&10===t.dump.charCodeAt(0)?l+=":":l+=": ",h+=l+=t.dump);t.tag=c,t.dump=h||"{}"}function Qc(t,e,r){for(var i,a,o,s=r?t.explicitTypes:t.implicitTypes,n=0,l=s.length;n<l;n+=1)if(((a=s[n]).instanceOf||a.predicate)&&(!a.instanceOf||"object"==typeof e&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(o=t.styleMap[a.tag]||a.defaultStyle,"[object Function]"===bc.call(a.represent))i=a.represent(e,o);else{if(!kc.call(a.represent,o))throw new cl("!<"+a.tag+'> tag resolver accepts not "'+o+'" style');i=a.represent[o](e,o)}t.dump=i}return!0}return!1}function Kc(t,e,r,i,a,o,s){t.tag=null,t.dump=r,Qc(t,r,!1)||Qc(t,r,!0);var n,l,h=bc.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)&&(a=!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?(Zc(t,e,t.dump,a),l&&(t.dump="&ref_"+n+t.dump)):(Vc(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?Xc(t,e-1,t.dump,a):Xc(t,e,t.dump,a),l&&(t.dump="&ref_"+n+t.dump)):(Gc(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&&Nc(t,t.dump,e,o,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 Jc(t,e){var r,i,a=[],o=[];for(td(t,a,o),r=0,i=o.length;r<i;r+=1)e.duplicates.push(a[o[r]]);e.usedDuplicates=new Array(i)}function td(t,e,r){var i,a,o;if(null!==t&&"object"==typeof t)if(-1!==(a=e.indexOf(t)))-1===r.indexOf(a)&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,o=t.length;a<o;a+=1)td(t[a],e,r);else for(a=0,o=(i=Object.keys(t)).length;a<o;a+=1)td(t[i[a]],e,r)}i(Rc,"chooseScalarStyle"),i(Nc,"writeScalar"),i(Wc,"blockHeader"),i(jc,"dropEndingNewline"),i(Hc,"foldString"),i(Uc,"foldLine"),i(Yc,"escapeString"),i(Gc,"writeFlowSequence"),i(Xc,"writeBlockSequence"),i(Vc,"writeFlowMapping"),i(Zc,"writeBlockMapping"),i(Qc,"detectType"),i(Kc,"writeNode"),i(Jc,"getDuplicateReferences"),i(td,"inspectNode"),i(function(t,e){return(e=new Fc(e=e||{})).noRefs||Jc(t,e),e.replacer&&(t=e.replacer.call({"":t},"",t)),Kc(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 ed=Zl,rd=xc,id=i(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:yi().handDrawnSeed}),"solidStateFill"),ad=i(t=>({stylesMap:t=od([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]),stylesArray:[...t]}),"compileStyles"),od=i(t=>{let e=new Map;return t.forEach(t=>{var[t,r]=t.split(":");e.set(t.trim(),r?.trim())}),e},"styles2Map"),sd=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"),nd=i(t=>{t=ad(t).stylesArray;let e=[],r=[],i=[],a=[];return t.forEach(t=>{var o=t[0];sd(o)?e.push(t.join(":")+" !important"):(r.push(t.join(":")+" !important"),o.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===o&&a.push(t.join(":")+" !important"))}),{labelStyles:e.join(";"),nodeStyles:r.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),ld=i((t,e)=>{var{themeVariables:r,handDrawnSeed:i}=yi(),{nodeBorder:r,mainBkg:a}=r;t=ad(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||a,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:hd(t.get("stroke-dasharray"))},e)},"userNodeOverrides"),hd=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"),cd={},dd={},ud=(Object.defineProperty(dd,"__esModule",{value:!0}),dd.BLANK_URL=dd.relativeFirstCharacters=dd.whitespaceEscapeCharsRegex=dd.urlSchemeRegex=dd.ctrlCharactersRegex=dd.htmlCtrlEntityRegex=dd.htmlEntitiesRegex=dd.invalidProtocolRegex=void 0,dd.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,dd.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,dd.htmlCtrlEntityRegex=/&(newline|tab);/gi,dd.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,dd.urlSchemeRegex=/^.+(:|&colon;)/gim,dd.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,dd.relativeFirstCharacters=[".","/"],dd.BLANK_URL="about:blank",Object.defineProperty(cd,"__esModule",{value:!0}),cd.sanitizeUrl=function(t){if(!t)return pd.BLANK_URL;for(var e,r=fd(t.trim());(e=(r=fd(r=gd(r).replace(pd.htmlCtrlEntityRegex,"").replace(pd.ctrlCharactersRegex,"").replace(pd.whitespaceEscapeCharsRegex,"").trim())).match(pd.ctrlCharactersRegex)||r.match(pd.htmlEntitiesRegex)||r.match(pd.htmlCtrlEntityRegex)||r.match(pd.whitespaceEscapeCharsRegex))&&0<e.length;);var i,a;t=r;return t?!function(t){return-1<pd.relativeFirstCharacters.indexOf(t[0])}(t)&&(a=(i=t.trimStart()).match(pd.urlSchemeRegex))?(a=a[0].toLowerCase().trim(),pd.invalidProtocolRegex.test(a)?pd.BLANK_URL:(i=i.replace(/\\/g,"/"),"mailto:"===a||a.includes("://")||"http:"!==a&&"https:"!==a?i:function(t){return URL.canParse(t)}(i)?((a=new URL(i)).protocol=a.protocol.toLowerCase(),a.hostname=a.hostname.toLowerCase(),a.toString()):pd.BLANK_URL)):t:pd.BLANK_URL}),pd=dd;function gd(t){return t.replace(pd.ctrlCharactersRegex,"").replace(pd.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function fd(t){try{return decodeURIComponent(t)}catch(e){return t}}function yd(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 md(){}function Cd(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function xd(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}let bd="[object RegExp]",kd="[object String]",wd="[object Number]",Td="[object Boolean]",Sd="[object Arguments]",vd="[object Symbol]",Bd="[object Date]",_d="[object Map]",Fd="[object Set]",Ld="[object Array]",Md="[object ArrayBuffer]",Ad="[object Object]",Ed="[object DataView]",Od="[object Uint8Array]",$d="[object Uint8ClampedArray]",Id="[object Uint16Array]",Dd="[object Uint32Array]",qd="[object Int8Array]",Pd="[object Int16Array]",zd="[object Int32Array]",Rd="[object Float32Array]",Nd="[object Float64Array]",Wd="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||function(){return this}();function jd(t){return void 0!==Wd.Buffer&&Wd.Buffer.isBuffer(t)}function Hd(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&0<=t}(t.length)}function Ud(t){return"__proto__"===t}function Yd(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function Gd(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Xd(t,e,r,i=new Map,a=void 0){e=a?.(t,e,r,i);if(void 0!==e)return e;if(Yd(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){var o=new Array(t.length);i.set(t,o);for(let e=0;e<t.length;e++)o[e]=Xd(t[e],e,r,i,a);return Object.hasOwn(t,"index")&&(o.index=t.index),Object.hasOwn(t,"input")&&(o.input=t.input),o}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,Xd(n,s,r,i,a));return l}if(t instanceof Set){var h,c=new Set;for(h of(i.set(t,c),t))c.add(Xd(h,void 0,r,i,a));return c}if(jd(t))return t.subarray();if(Gd(t)){var d=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,d);for(let e=0;e<t.length;e++)d[e]=Xd(t[e],e,r,i,a);return d}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),Vd(e,t,r,i,a),e):"undefined"!=typeof File&&t instanceof File?(e=new File([t],t.name,{type:t.type}),i.set(t,e),Vd(e,t,r,i,a),e):"undefined"!=typeof Blob&&t instanceof Blob?(e=new Blob([t],{type:t.type}),i.set(t,e),Vd(e,t,r,i,a),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,Vd(e,t,r,i,a),e):t instanceof Boolean?(e=new Boolean(t.valueOf()),i.set(t,e),Vd(e,t,r,i,a),e):t instanceof Number?(e=new Number(t.valueOf()),i.set(t,e),Vd(e,t,r,i,a),e):t instanceof String?(e=new String(t.valueOf()),i.set(t,e),Vd(e,t,r,i,a),e):"object"==typeof t&&function(t){switch(xd(t)){case Sd:case Ld:case Md:case Ed:case Td:case Bd:case Rd:case Nd:case qd:case Pd:case zd:case _d:case wd:case Ad:case bd:case Fd:case kd:case vd:case Od:case $d:case Id:case Dd:return!0;default:return!1}}(t)?(e=Object.create(Object.getPrototypeOf(t)),i.set(t,e),Vd(e,t,r,i,a),e):t}function Vd(t,e,r=t,i,a){var o=[...Object.keys(e),...Cd(e)];for(let l=0;l<o.length;l++){var s=o[l],n=Object.getOwnPropertyDescriptor(t,s);null!=n&&!n.writable||(t[s]=Xd(e[s],s,r,i,a))}}function Zd(t,e){return function(t,e){return Xd(t,void 0,t,new Map,e)}(t,(r,i,a,o)=>{if(r=e?.(r,i,a,o),void 0!==r)return r;if("object"==typeof t){if("[object Object]"===xd(t)&&"function"!=typeof t.constructor)return o.set(t,i={}),Vd(i,t,a,o),i;switch(Object.prototype.toString.call(t)){case wd:case kd:case Td:var s=new t.constructor(t?.valueOf());return Vd(s,t),s;case Sd:return Vd(s={},t),s.length=t.length,s[Symbol.iterator]=t[Symbol.iterator],s;default:return}}})}function Qd(t){return Zd(t)}function Kd(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===xd(t)}function Jd(t){return"object"==typeof t&&null!==t}function tu(t){return Jd(t)&&Hd(t)}function eu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");function r(...i){var a=e?e.apply(this,i):i[0],o=r.cache;return o.has(a)?o.get(a):(i=t.apply(this,i),r.cache=o.set(a,i)||o,i)}return r.cache=new(eu.Cache||Map),r}function ru(t){return Gd(t)}function iu(t,e,r,i){if(Yd(t)&&(t=Object(t)),null!=e&&"object"==typeof e){if(i.has(e))return function(t){if(Yd(t))return t;if(Array.isArray(t)||Gd(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 a=[...Object.keys(e),...Cd(e)];for(let d=0;d<a.length;d++){var o=a[d];if(!Ud(o)){let a=e[o],d=t[o];if(Kd(a)&&(a={...a}),Kd(d)&&(d={...d}),jd(a)&&(a=Qd(a)),Array.isArray(a))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(tu(d)){var h=[];for(let t=0;t<d.length;t++)h[t]=d[t];d=h}else d=[];var c=r(d,a,o,t,e,i);void 0!==c?t[o]=c:Array.isArray(a)||Jd(d)&&Jd(a)&&(yd(d)||yd(a)||ru(d)||ru(a))?t[o]=iu(d,a,r,i):null==d&&yd(a)?t[o]=iu({},a,r,i):null==d&&ru(a)?t[o]=Qd(a):void 0!==d&&void 0===a||(t[o]=a)}}}return t}function au(t,...e){return function(t,...e){var r=e.slice(0,-1),i=e[e.length-1];let a=t;for(let t=0;t<r.length;t++)a=iu(a,r[t],i,new Map);return a}(t,...e,md)}function ou(t){var e;return null==t||(Hd(t)?!!("function"==typeof t.splice||"string"==typeof t||jd(t)||ru(t)||Kd(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)))}eu.Cache=Map;var su="​",nu={curveBasis:mn,curveBasisClosed:function(t){return new Cn(t)},curveBasisOpen:function(t){return new xn(t)},curveBumpX:un,curveBumpY:pn,curveBundle:kn,curveCardinalClosed:Bn,curveCardinalOpen:Fn,curveCardinal:Sn,curveCatmullRomClosed:On,curveCatmullRomOpen:In,curveCatmullRom:An,curveLinear:nn,curveLinearClosed:function(t){return new Dn(t)},curveMonotoneX:Hn,curveMonotoneY:Un,curveNatural:Xn,curveStep:Zn,curveStepAfter:Kn,curveStepBefore:Qn},lu=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,hu=i(function(t,e){var r=cu(t,/(?:init\b)|(?:initialize\b)/);let i={};if(i=Array.isArray(r)?(a=r.map(t=>t.args),je(a),he(i,[...a])):r.args){let r=mr(t,e);var a="config";return void 0!==i[a]&&("flowchart-v2"===r&&(r="flowchart"),i[r]=i[a],delete i[a]),i}},"detectInit"),cu=i(function(t,e=null){try{for(var r,i,a,o=new RegExp(`[%]{2}(?![{]${lu.source})(?=[}][%]{2}).*\n`,"ig"),s=(t=t.trim().replace(o,"").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],a=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null,s.push({type:i,args:a}));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"),du=i(function(t){return t.replace(pr,"")},"removeDirectives"),uu=i(function(t,e){for(var[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function pu(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),nu[t]??e):e}function gu(t,e){if(t=t.trim())return"loose"!==e.securityLevel?ud(t):t}i(pu,"interpolateToCurve"),i(gu,"formatUrl");var fu=i((t,...e)=>{var r=t.split("."),i=r.length-1,a=r[i];let o=window;for(let e=0;e<i;e++)if(!(o=o[r[e]]))return void h.error(`Function name: ${t} not found in window`);o[a](...e)},"runFunc");function yu(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function mu(t){let e,r=0;return t.forEach(t=>{r+=yu(t,e),e=t}),bu(t,r/2)}function Cu(t){return 1===t.length?t[0]:mu(t)}i(yu,"distance"),i(mu,"traverseEdge"),i(Cu,"calcLabelPosition");var xu=i((t,e=2)=>(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),bu=i((t,e)=>{let r,i=e;for(var a of t){if(r){var o=yu(a,r);if(0===o)return r;if(o<i)i-=o;else{if((o=i/o)<=0)return r;if(1<=o)return{x:a.x,y:a.y};if(0<o&&o<1)return{x:xu((1-o)*r.x+o*a.x,5),y:xu((1-o)*r.y+o*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),ku=i((t,e,r)=>{h.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());r=bu(e,25),t=t?10:5;var i=Math.atan2(e[0].y-r.y,e[0].x-r.x),a={x:0,y:0};return a.x=Math.sin(i)*t+(e[0].x+r.x)/2,a.y=-Math.cos(i)*t+(e[0].y+r.y)/2,a},"calcCardinalityPosition");function wu(t,e,r){r=structuredClone(r);var i=(h.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),a=(i=bu(r,i),t=10+.5*t,Math.atan2(r[0].y-i.y,r[0].x-i.x)),o={x:0,y:0};return"start_left"===e?(o.x=Math.sin(a+Math.PI)*t+(r[0].x+i.x)/2,o.y=-Math.cos(a+Math.PI)*t+(r[0].y+i.y)/2):"end_right"===e?(o.x=Math.sin(a-Math.PI)*t+(r[0].x+i.x)/2-5,o.y=-Math.cos(a-Math.PI)*t+(r[0].y+i.y)/2-5):"end_left"===e?(o.x=Math.sin(a)*t+(r[0].x+i.x)/2-5,o.y=-Math.cos(a)*t+(r[0].y+i.y)/2-5):(o.x=Math.sin(a)*t+(r[0].x+i.x)/2,o.y=-Math.cos(a)*t+(r[0].y+i.y)/2),o}function Tu(t){let e="",r="";for(var 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(wu,"calcTerminalLabelPosition"),i(Tu,"getStylesFromArray");var Su=0,vu=i(()=>(Su++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Su),"generateId");function Bu(t){let e="";var r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}i(Bu,"makeRandomHex");var _u=i(t=>Bu(t.length),"random"),Fu=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"),Lu=i(function(t,e){var r,i=e.text.replace(Yr.lineBreakRegex," "),[,r]=Ru(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"),Mu=eu((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;let i=t.split(" ").filter(Boolean),a=[],o="";return i.forEach((t,s)=>{var n,l=Ou(t+" ",r),h=Ou(o,r),c=(o=e<l?(({hyphenatedStrings:c,remainingWord:n}=Au(t,e,"-",r)),a.push(o,...c),n):e<=h+l?(a.push(o),t):[o,t].filter(Boolean).join(" "),s+1);c===i.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),Au=eu((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let a=[...t],o=[],s="";return a.forEach((t,n)=>{var l=Ou(t=""+s+t,i);s=e<=l?(l=n+1,n=a.length===l,l=t+r,o.push(n?t:l),""):t}),{hyphenatedStrings:o,remainingWord:s}},(t,e,r="-",i)=>""+t+e+r+i.fontSize+i.fontWeight+i.fontFamily);function Eu(t,e){return Iu(t,e).height}function Ou(t,e){return Iu(t,e).width}i(Eu,"calculateTextHeight"),i(Ou,"calculateTextWidth");var $u,Iu=eu((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};var r,[,a]=Ru(e),o=(e=["sans-serif",r],t.split(Yr.lineBreakRegex)),s=[];if(!(r=ja("body")).remove)return{width:0,height:0,lineHeight:0};var n,l=r.append("svg");for(n of e){var h,c={width:0,height:0,lineHeight:0};for(h of o){var d;if(0===(d=((d=((d=Fu()).text=h||"​",Lu(l,d).style("font-size",a).style("font-weight",i).style("font-family",n)))._groups||d)[0][0].getBBox()).width&&0===d.height)throw new Error("svg element not in render tree");c.width=Math.round(Math.max(c.width,d.width)),d=Math.round(d.height),c.height+=d,c.lineHeight=Math.round(Math.max(c.lineHeight,d))}s.push(c)}return l.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),Du=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")}},qu=i(function(t){return $u=$u||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$u.innerHTML=t,unescape($u.textContent)},"entityDecode");function Pu(t){return"str"in t}i(Pu,"isDetailedError");var zu=i((t,e,r,i)=>{var a;i&&(a=t.node()?.getBBox())&&t.append("text").text(i).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Ru=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 Nu(t,e){return au({},t,e)}i(Nu,"cleanAndMerge");var Wu={assignWithDepth:he,wrapLabel:Mu,calculateTextHeight:Eu,calculateTextWidth:Ou,calculateTextDimensions:Iu,cleanAndMerge:Nu,detectInit:hu,detectDirective:cu,isSubstringInArray:uu,interpolateToCurve:pu,calcLabelPosition:Cu,calcCardinalityPosition:ku,calcTerminalLabelPosition:wu,formatUrl:gu,getStylesFromArray:Tu,generateId:vu,random:_u,runFunc:fu,entityDecode:qu,insertTitle:zu,isLabelCoordinateInPath:Gu,parseFontSize:Ru,InitIDGenerator:Du},ju=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"),Hu=i(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Uu=i((t,e,{counter:r=0,prefix:i,suffix:a},o)=>o||(i?i+"_":"")+t+`_${e}_`+r+(a?"_"+a:""),"getEdgeId");function Yu(t){return t??null}function Gu(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(Yu,"handleUndefinedAttr"),i(Gu,"isLabelCoordinateInPath");var Xu=i(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins");async function Vu(t,e){if((t=t.getElementsByTagName("img"))&&0!==t.length){let r=""===e.replace(/<img[^>]*>/g,"").trim();await Promise.all([...t].map(t=>new Promise(e=>{function a(){var i;t.style.display="flex",t.style.flexDirection="column",r?(i=(yi().fontSize?yi():window.getComputedStyle(document.body)).fontSize,[i=Re.fontSize]=Ru(i),t.style.minWidth=i=5*i+"px",t.style.maxWidth=i):t.style.width="100%",e(t)}i(a,"setupImage"),setTimeout(()=>{t.complete&&a()}),t.addEventListener("error",a),t.addEventListener("load",a)})))}}i(Vu,"configureLabelImages");let Zu=Object.freeze({left:0,top:0,width:16,height:16}),Qu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ku=Object.freeze({...Zu,...Qu}),Ju=Object.freeze({...Ku,body:"",hidden:!1}),tp=Object.freeze({width:null,height:null}),ep=Object.freeze({...tp,...Qu}),rp=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name);function ip(t,e){var r,i=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(r in Ju)r in Qu?r in t&&!(r in i)&&(i[r]=Qu[r]):r in e?i[r]=e[r]:r in t&&(i[r]=t[r]);return i}function ap(t,e,r){let i=t.icons,a=t.aliases||Object.create(null),o={};function s(t){o=ip(i[t]||a[t],o)}return s(e),r.forEach(s),ip(t,o)}function op(t,e){var r;return t.icons[e]?ap(t,e,[]):(r=function(t,e){let r=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){var o,s;return r[e]?a[e]=[]:(e in a||(a[e]=null,(s=(o=i[e]&&i[e].parent)&&t(o))&&(a[e]=[o].concat(s))),a[e])}),a}(t,[e])[e])?ap(t,e,r):null}let sp=/(-?[0-9.]*[0-9]+[0-9.]*)/g,np=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function lp(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(sp);if(null===i||!i.length)return t;var a,o=[];let s=i.shift(),n=np.test(s);for(;;){if(!n||(a=parseFloat(s),isNaN(a))?o.push(s):o.push(Math.ceil(a*e*r)/r),void 0===(s=i.shift()))return o.join("");n=!n}}let hp=/\sid="(\S+)"/g,cp=new Map;function dp(t){for(var e,r=[];e=hp.exec(t);)r.push(e[1]);if(r.length){let e="suffix"+(16777216*Math.random()|Date.now()).toString(16);r.forEach(r=>{var i=function(t){t=t.replace(/[0-9]+$/,"")||"a";var e=cp.get(t)||0;return cp.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 up={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},pp=new Map,gp=new Map,fp=i(t=>{for(var 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)gp.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.');pp.set(e.name,e.icons)}}},"registerIconPacks"),yp=i(async(t,e)=>{var r=((t,e,r,i="")=>{var a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||3<a.length)return null;i=a.shift().slice(1)}if(3<a.length||!a.length)return null;if(1<a.length){let r=a.pop();return t=a.pop(),t={provider:0<a.length?a[0]:i,prefix:t,name:r},e&&!rp(t)?null:t}let o=a[0];return 1<(t=o.split("-")).length?(a={provider:i,prefix:t.shift(),name:t.join("-")},e&&!rp(a)?null:a):r&&""===i&&(t={provider:i,prefix:"",name:o},!e||rp(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=pp.get(e);if(!i){var a=gp.get(e);if(!a)throw new Error("Icon set not found: "+r.prefix);try{i={...await a(),prefix:e},pp.set(e,i)}catch(t){throw h.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(a=op(i,r.name))return a;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),mp=i(async t=>{try{return await yp(t),!0}catch{return!1}},"isIconAvailable"),Cp=i(async(t,e,r)=>{let i;try{i=await yp(t,e?.fallbackPrefix)}catch(t){h.error(t),i=up}return t=function(t,e){t={...Ku,...t},e={...ep,...e};let r={left:t.left,top:t.top,width:t.width,height:t.height},i=t.body;[t,e].forEach(t=>{var e=[],a=t.hFlip,o=t.vFlip;let s,n=t.rotate;switch(a?o?n+=2:(e.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),e.push("scale(-1 1)"),r.top=r.left=0):o&&(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 a=t.indexOf(">",i),o=t.indexOf("</"+e);if(-1===a||-1===o)break;var s=t.indexOf(">",o);if(-1===s)break;r+=t.slice(a+1,o).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 a=r.width,o=r.height;let s,n,l=(null===t?(n=null===e?"1em":"auto"===e?o:e,s=lp(n,a/o)):(s="auto"===t?a:t,n=null===e?lp(s,o/a):"auto"===e?o:e),{});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,a,o],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(var i in e)r+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(dp(t.body),{...t.attributes,...r}),_r(e,rr())},"getIconSVG");function xp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var bp={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function kp(t){bp=t}var wp={exec:()=>null};function Tp(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let a="string"==typeof e?e:e.source;return a=a.replace(vp.caret,"$1"),r=r.replace(t,a),i},getRegex:()=>new RegExp(r,e)};return i}var Sp=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),vp={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")},Bp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_p=/(?:[*+-]|\d{1,9}[.)])/,Fp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Lp=Tp(Fp).replace(/bull/g,_p).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(),Mp=Tp(Fp).replace(/bull/g,_p).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(),Ap=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ep=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Op=Tp(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ep).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$p=Tp(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_p).getRegex(),Ip="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",Dp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,qp=Tp("^ {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",Dp).replace("tag",Ip).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pp=Tp(Ap).replace("hr",Bp).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",Ip).getRegex(),zp={blockquote:Tp(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pp).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Op,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:Bp,html:qp,lheading:Lp,list:$p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Pp,table:wp,text:/^[^\n]+/},Rp=Tp("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bp).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",Ip).getRegex(),Np={...zp,lheading:Mp,table:Rp,paragraph:Tp(Ap).replace("hr",Bp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Rp).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",Ip).getRegex()},Wp={...zp,html:Tp("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Dp).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:wp,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tp(Ap).replace("hr",Bp).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Lp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jp=/^( {2,}|\\)\n(?!\s*$)/,Hp=/[\p{P}\p{S}]/u,Up=/[\s\p{P}\p{S}]/u,Yp=/[^\s\p{P}\p{S}]/u,Gp=Tp(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Up).getRegex(),Xp=/(?!~)[\p{P}\p{S}]/u,Vp=Tp(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Sp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Zp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qp=Tp(Zp,"u").replace(/punct/g,Hp).getRegex(),Kp=Tp(Zp,"u").replace(/punct/g,Xp).getRegex(),Jp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tg=Tp(Jp,"gu").replace(/notPunctSpace/g,Yp).replace(/punctSpace/g,Up).replace(/punct/g,Hp).getRegex(),eg=Tp(Jp,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Xp).getRegex(),rg=Tp("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yp).replace(/punctSpace/g,Up).replace(/punct/g,Hp).getRegex(),ig=Tp(/\\(punct)/,"gu").replace(/punct/g,Hp).getRegex(),ag=Tp(/^<(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(),og=Tp(Dp).replace("(?:--\x3e|$)","--\x3e").getRegex(),sg=Tp("^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",og).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ng=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,lg=Tp(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ng).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hg=Tp(/^!?\[(label)\]\[(ref)\]/).replace("label",ng).replace("ref",Ep).getRegex(),cg=Tp(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ep).getRegex(),dg=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ug={_backpedal:wp,anyPunctuation:ig,autolink:ag,blockSkip:Vp,br:jp,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:wp,emStrongLDelim:Qp,emStrongRDelimAst:tg,emStrongRDelimUnd:rg,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:lg,nolink:cg,punctuation:Gp,reflink:hg,reflinkSearch:Tp("reflink|nolink(?!\\()","g").replace("reflink",hg).replace("nolink",cg).getRegex(),tag:sg,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:wp},pg={...ug,link:Tp(/^!?\[(label)\]\((.*?)\)/).replace("label",ng).getRegex(),reflink:Tp(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ng).getRegex()},gg={...ug,emStrongRDelimAst:eg,emStrongLDelim:Kp,url:Tp(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dg).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:Tp(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dg).getRegex()},fg={...gg,br:Tp(jp).replace("{2,}","*").getRegex(),text:Tp(gg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},yg={normal:zp,gfm:Np,pedantic:Wp},mg={normal:ug,gfm:gg,breaks:fg,pedantic:pg},Cg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xg=t=>Cg[t];function bg(t,e){if(e){if(vp.escapeTest.test(t))return t.replace(vp.escapeReplace,xg)}else if(vp.escapeTestNoEncode.test(t))return t.replace(vp.escapeReplaceNoEncode,xg);return t}function kg(t){try{t=encodeURI(t).replace(vp.percentDecode,"%")}catch{return null}return t}function wg(t,e){let r=t.replace(vp.findPipe,(t,e,r)=>{let i=!1,a=e;for(;0<=--a&&"\\"===r[a];)i=!i;return i?"|":" |"}),i=r.split(vp.splitPipe),a=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(;a<i.length;a++)i[a]=i[a].trim().replace(vp.slashPipe,"|");return i}function Tg(t,e,r){var i=t.length;if(0===i)return"";let a=0;for(;a<i;){var o=t.charAt(i-a-1);if((o!==e||r)&&(o===e||!r))break;a++}return t.slice(0,i-a)}function Sg(t,e,r,i,a){var o=e.href;e=e.title||null,a=t[1].replace(a.other.outputLinkReplace,"$1"),i.state.inLink=!0,t={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:o,title:e,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,t}var vg=class{options;rules;lexer;constructor(t){this.options=t||bp}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:Tg(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=Tg(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:Tg(t[0],"\n")}}blockquote(t){if(t=this.rules.block.blockquote.exec(t)){let o=Tg(t[0],"\n").split("\n"),s="",n="",l=[];for(;0<o.length;){let t,h=!1,c=[];for(t=0;t<o.length;t++)if(this.rules.other.blockquoteStart.test(o[t]))c.push(o[t]),h=!0;else{if(h)break;c.push(o[t])}o=o.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===o.length)break;var i;e=l.at(-1);if("code"===e?.type)break;if("blockquote"===e?.type){var a=(r=e).raw+"\n"+o.join("\n");a=this.blockquote(a);l[l.length-1]=a,s=s.substring(0,s.length-r.raw.length)+a.raw,n=n.substring(0,n.length-r.text.length)+a.text;break}"list"===e?.type&&(a=(r=e).raw+"\n"+o.join("\n"),i=this.list(a),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,o=a.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),a=this.rules.other.fencesBeginRegex(y),o=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," "),a.test(g)||o.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)||a.test(c)||o.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=wg(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===a.length){for(var e of a)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 o)s.rows.push(wg(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=Tg(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 a=t[2],o="";return this.options.pedantic?(r=this.rules.other.pedanticHrefTitle.exec(a))&&(a=r[1],o=r[3]):o=t[3]?t[3].slice(1,-1):"",a=a.trim(),Sg(t,{href:(a=this.rules.other.startAngleBracket.test(a)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?a.slice(1):a.slice(1,-1):a)&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.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()])?Sg(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 a,o;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),a=[...i[0]][0].length,a=t.slice(0,n+i.index+a+s),Math.min(n,s)%2?(o=a.slice(1,-1),{type:"em",raw:a,text:o,tokens:this.lexer.inlineTokens(o)}):(o=a.slice(2,-2),{type:"strong",raw:a,text:o,tokens:this.lexer.inlineTokens(o)})}}}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}}},Bg=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||bp,this.options.tokenizer=this.options.tokenizer||new vg,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:vp,block:yg.normal,inline:mg.normal},this.options.pedantic?(t.block=yg.pedantic,t.inline=mg.pedantic):this.options.gfm&&(t.block=yg.gfm,this.options.breaks?t.inline=mg.breaks:t.inline=mg.gfm),this.tokenizer.rules=t}static get rules(){return{block:yg,inline:mg}}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(vp.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(vp.tabCharGlobal," ").replace(vp.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 a=e.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+s.raw,a.text+="\n"+s.raw,this.inlineQueue.at(-1).src=a.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,a=t.slice(1);this.options.extensions.startBlock.forEach(t=>{"number"==typeof(e=t.call({lexer:this},a))&&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)))a=e.at(-1),r&&"paragraph"===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),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 o=e.at(-1);"text"===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)}else if(t){if(o="Infinite loop on byte: "+t.charCodeAt(0),this.options.silent){console.error(o);break}throw new Error(o)}}}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 a=Object.keys(this.tokens.links);if(0<a.length)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(r));)a.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 o;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(r));)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-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,a=t.slice(1);this.options.extensions.startInline.forEach(t=>{"number"==typeof(e=t.call({lexer:this},a))&&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}},_g=class{options;parser;constructor(t){this.options=t||bp}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(vp.notSpaceStart)?.[0],t=t.replace(vp.endingNewline,"")+"\n",e?'<pre><code class="language-'+bg(e)+'">'+(r?t:bg(t,!0))+"</code></pre>\n":"<pre><code>"+(r?t:bg(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 a=t.items[e];i+=this.listitem(a)}var o=e?"ol":"ul";return"<"+o+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+o+">\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+" "+bg(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 a=t.rows[e];r="";for(let t=0;t<a.length;t++)r+=this.tablecell(a[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>${bg(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=kg(t);if(null===i)return r;let a='<a href="'+(t=i)+'"';return e&&(a+=' title="'+bg(e)+'"'),a+">"+r+"</a>"}image({href:t,title:e,text:r,tokens:i}){if(i&&(r=this.parser.parseInline(i,this.parser.textRenderer)),null===(i=kg(t)))return bg(r);let a=`<img src="${t=i}" alt="${r}"`;return e&&(a+=` title="${bg(e)}"`),a+">"}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:bg(t.text)}},Fg=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""}},Lg=class t{options;renderer;textRenderer;constructor(t){this.options=t||bp,this.options.renderer=this.options.renderer||new _g,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new Fg}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 a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==o||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){r+=o||"";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,a=this.renderer.text(i);for(;l+1<t.length&&"text"===t[l+1].type;)i=t[++l],a+="\n"+this.renderer.text(i);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;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 a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=a||"";continue}}var o=i;switch(o.type){case"escape":case"text":r+=e.text(o);break;case"html":r+=e.html(o);break;case"link":r+=e.link(o);break;case"image":r+=e.image(o);break;case"strong":r+=e.strong(o);break;case"em":r+=e.em(o);break;case"codespan":r+=e.codespan(o);break;case"br":r+=e.br(o);break;case"del":r+=e.del(o);break;default:var s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}return r}},Mg=class{options;block;constructor(t){this.options=t||bp}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?Bg.lex:Bg.lexInline}provideParser(){return this.block?Lg.parse:Lg.parseInline}},Ag=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=Lg;Renderer=_g;TextRenderer=Fg;Lexer=Bg;Tokenizer=vg;Hooks=Mg;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 a,o,s=i;for(a of s.header)r=r.concat(this.walkTokens(a.tokens,e));for(o of s.rows)for(var n of o)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 _g(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,a=t.renderer[r],o=e[r];e[r]=(...t)=>{let r=a.apply(e,t);return(r=!1===r?o.apply(e,t):r)||""}}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new vg(this.defaults);for(var a in t.tokenizer){if(!(a in e))throw new Error(`tokenizer '${a}' does not exist`);if(!["options","rules","lexer"].includes(a)){let r=a,i=t.tokenizer[r],o=e[r];e[r]=(...t)=>{let r=i.apply(e,t);return!1===r?o.apply(e,t):r}}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Mg;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,a=t.hooks[i],o=e[i];Mg.passThroughHooks.has(r)?e[i]=t=>{var i;return this.defaults.async&&Mg.passThroughHooksRespectAsync.has(r)?(async()=>{var r=await a.call(e,t);return o.call(e,r)})():(i=a.call(e,t),o.call(e,i))}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await a.apply(e,t);return!1===r?await o.apply(e,t):r})();let r=a.apply(e,t);return!1===r?o.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 Bg.lex(t,e??this.defaults)}parser(t,e){return Lg.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},a={...this.defaults,...i},o=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===i.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("u"<typeof e||null===e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(a.hooks&&((a.hooks.options=a).hooks.block=t),a.async)return(async()=>{var r=a.hooks?await a.hooks.preprocess(e):e;r=await(a.hooks?await a.hooks.provideLexer():t?Bg.lex:Bg.lexInline)(r,a),r=a.hooks?await a.hooks.processAllTokens(r):r,a.walkTokens&&await Promise.all(this.walkTokens(r,a.walkTokens)),r=await(a.hooks?await a.hooks.provideParser():t?Lg.parse:Lg.parseInline)(r,a);return a.hooks?await a.hooks.postprocess(r):r})().catch(o);try{a.hooks&&(e=a.hooks.preprocess(e));let r=(a.hooks?a.hooks.provideLexer():t?Bg.lex:Bg.lexInline)(e,a),i=(a.hooks&&(r=a.hooks.processAllTokens(r)),a.walkTokens&&this.walkTokens(r,a.walkTokens),(a.hooks?a.hooks.provideParser():t?Lg.parse:Lg.parseInline)(r,a));return i=a.hooks?a.hooks.postprocess(i):i}catch(r){return o(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>"+bg(r.message+"",!0)+"</pre>",e?Promise.resolve(i):i;if(e)return Promise.reject(r);throw r}}};function Eg(t,e){return Ag.parse(t,e)}function Og(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i,a=Array.from("string"==typeof t?[t]:t),o=(t=(a[a.length-1]=a[a.length-1].replace(/\r?\n([\t ]*)$/,""),a.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},[])),t.length&&(i=new RegExp("\n[\t ]{".concat(Math.min.apply(Math,t),"}"),"g"),a=a.map(function(t){return t.replace(i,"\n")})),a[0]=a[0].replace(/^\r?\n/,""),a[0]);return e.forEach(function(t,e){var r=(i=o.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")),o+=i+a[e+1]}),o}function $g(t,{}){return Og(t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n"))}function Ig(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Dg(t,e={}){t=$g(t,e),e=Eg.lexer(t);let r=[[]],a=0;function o(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,i)=>{0!==i&&(a++,r.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&r[a].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{o(e,t.type)}):"html"===t.type&&r[a].push({content:t.text,type:"normal"})}return i(o,"processNode"),e.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{o(t)}):"html"===t.type?r[a].push({content:t.text,type:"normal"}):r[a].push({content:t.raw,type:"normal"})}),r}function qg(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Pg(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=Eg.lexer(t),i(r,"output"),t.map(r).join("")}function zg(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Rg(t,e){return Ng(t,[],zg(e.content),e.type)}function Ng(t,e,r,i){var a,o,s;return 0===r.length?[{content:e.join(""),type:i},{content:"",type:i}]:([a,...o]=r,t([{content:(s=[...e,a]).join(""),type:i}])?Ng(t,s,o,i):(0===e.length&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}]))}function Wg(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return jg(t,e)}function jg(t,e,r=[],i=[]){if(0===t.length)return 0<i.length&&r.push(i),0<r.length?r:[];let a="";" "===t[0].content&&(a=" ",t.shift());var o=t.shift()??{content:" ",type:"normal"},s=[...i];return""!==a&&s.push({content:a,type:"normal"}),s.push(o),e(s)?jg(t,e,r,s):(0<i.length?(r.push(i),t.unshift(o)):o.content&&([s,i]=Rg(e,o),r.push([s]),i.content)&&t.unshift(i),jg(t,e,r))}function Hg(t,e){e&&t.attr("style",e)}Eg.options=Eg.setOptions=function(t){return Ag.setOptions(t),Eg.defaults=Ag.defaults,kp(Eg.defaults),Eg},Eg.getDefaults=xp,Eg.defaults=bp,Eg.use=function(...t){return Ag.use(...t),Eg.defaults=Ag.defaults,kp(Eg.defaults),Eg},Eg.walkTokens=function(t,e){return Ag.walkTokens(t,e)},Eg.parseInline=Ag.parseInline,Eg.Parser=Lg,Eg.parser=Lg.parse,Eg.Renderer=_g,Eg.TextRenderer=Fg,Eg.Lexer=Bg,Eg.lexer=Bg.lex,Eg.Tokenizer=vg,Eg.Hooks=Mg,Eg.parse=Eg,Lg.parse,Bg.lex,i($g,"preprocessMarkdown"),i(Ig,"nonMarkdownToLines"),i(Dg,"markdownToLines"),i(qg,"nonMarkdownToHTML"),i(Pg,"markdownToHTML"),i(zg,"splitTextToChars"),i(Rg,"splitWordToFitWidth"),i(Ng,"splitWordToFitWidthRecursion"),i(Wg,"splitLineToFitWidth"),i(jg,"splitLineToFitWidthRecursion"),i(Hg,"applyStyle");async function Ug(t,e,r,i,a=!1,o=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=(o=Wr(e.label)?await Ur(e.label.replace(Yr.lineBreakRegex,"\n"),o):_r(e.label,o),e.isNode?"nodeLabel":"edgeLabel"),l=s.append("span");return(o=(l.html(o),Hg(l,e.labelStyle),l.attr("class",n+" "+i),Hg(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"),a&&s.attr("class","labelBkg"),s.node().getBoundingClientRect())).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),o=s.node().getBoundingClientRect()),t.node()}function Yg(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 Gg(t,e,r){return Qg(e=Yg(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function Xg(t,e,r){return Qg(e=Yg(t=t.append("text"),1,e),[{content:r,type:"normal"}]),r=e.node()?.getBoundingClientRect(),r&&t.remove(),r}function Vg(t,e,r,a=!1,o=!1){let s=e.append("g");e=s.insert("rect").attr("class","background").attr("style","stroke: none");var n,l=s.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(n of r){var c,d=i(e=>Gg(s,1.1,e)<=t,"checkWidth");for(c of d(n)?[n]:Wg(n,d))Qg(Yg(l,h,1.1,o),c),h++}return(a?(r=l.node().getBBox(),e.attr("x",r.x-2).attr("y",r.y-2).attr("width",r.width+4).attr("height",r.height+4),s):l).node()}function Zg(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 Qg(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(Zg(e.content)):i.text(" "+Zg(e.content))})}async function Kg(t,e={}){let r=[],i=(t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{var r=i+":"+a;return await mp(r)?Cp(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(Ug,"addHtmlSpan"),i(Yg,"createTspan"),i(Gg,"computeWidthOfText"),i(Xg,"computeDimensionOfText"),i(Vg,"createFormattedText"),i(Zg,"decodeHTMLEntities"),i(Qg,"updateTextContentAndStyles"),i(Kg,"replaceIconSubstring");var Jg=i(async(t,e="",{style:r="",isTitle:i=!1,classes:a="",useHtmlLabels:o=!0,markdown:s=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},d)=>{var u;return h.debug("XYZ createText",e,r,i,a,o,n,"addSvgBackground: ",c),o?(o=s?Pg(e,d):qg(e),o=await Kg(Hu(o),d),u=e.replace(/\\\\/g,"\\"),await Ug(t,{isNode:n,label:Wr(e)?u:o,labelStyle:r.replace("fill:","color:")},l,a,c,d)):(u=Hu(e.replace(/<br\s*\/?>/g,"<br/>")),o=Vg(l,t,s?Dg(u.replace("<br>","<br/>"),d):Ig(u),!!e&&c,!n),n?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),ja(o).attr("style",a)):(l=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),ja(o).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:"),ja(o).select("text").attr("style",t)),i?ja(o).selectAll("tspan.text-outer-tspan").classed("title-row",!0):ja(o).selectAll("tspan.text-outer-tspan").classed("row",!0),o)},"createText");function tf(t,e,r){if(t&&t.length){var[i,a]=e,o=(e=Math.PI/180*r,Math.cos(e)),s=Math.sin(e);for(let e of t){let[t,r]=e;e[0]=(t-i)*o-(r-a)*s+i,e[1]=(t-i)*s+(r-a)*o+a}}}function ef(t,e){return t[0]===e[0]&&t[1]===e[1]}function rf(t,e,r,i=1){var a=r,o=(r=Math.max(e,.1),e=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,[0,0]);if(a)for(let t of e)tf(t,o,a);if(t=((t,e,r)=>{var i=[];for(let e of t){let t=[...e];ef(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),2<t.length&&i.push(t)}var a=[],o=(e=Math.max(e,.1),[]);for(let t of i)for(let e=0;e<t.length-1;e++){let r=t[e],i=t[e+1];if(r[1]!==i[1]){let t=Math.min(r[1],i[1]);o.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(o.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)),o.length){let t=[],i=o[0].ymin,s=0;for(;t.length||o.length;){if(o.length){let e=-1;for(let t=0;t<o.length&&!(o[t].ymin>i);t++)e=t;o.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){let r=e+1;if(r>=t.length)break;let o=t[e].edge,s=t[r].edge;a.push([[Math.round(o.x),i],[Math.round(s.x),i]])}i+=r,t.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),s++}}return a})(e,r,i),a){for(let t of e)tf(t,o,-a);{r=o,i=-a;let e=[];t.forEach(t=>e.push(...t)),tf(e,r,i)}}return t}function af(t,e){var r=e.hachureAngle+90;let i=e.hachureGap,a=(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())&&(a=i),rf(t,i,r,a||1)}class of{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=af(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,i=[];for(r of t)i.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return i}}function sf(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 nf extends of{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var i=af(t,Object.assign({},e,{hachureGap:r})),a=(t=Math.PI/180*e.hachureAngle,[]),o=.5*r*Math.cos(t),s=.5*r*Math.sin(t);for(let[t,e]of i)sf([t,e])&&a.push([[t[0]-o,t[1]+s],[...e]],[[t[0]+o,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class lf extends of{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 hf{constructor(t){this.helper=t}fillPolygons(t,e){return t=af(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){var r=[];let i=e.hachureGap,a=(i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1),e.fillWeight);a<0&&(a=e.strokeWidth/2);var o,s=i/4;for(o of t){let t=sf(o),n=t/i,l=Math.ceil(n)-1,h=t-l*i,c=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let t=0;t<l;t++){let o=d+h+t*i,n=c-s+2*Math.random()*s,l=o-s+2*Math.random()*s,u=this.helper.ellipse(n,l,a,a,e);r.push(...u.ops)}}return{type:"fillSketch",ops:r}}}class cf{constructor(t){this.helper=t}fillPolygons(t,e){return t=af(t,e),{type:"fillSketch",ops:this.dashedLine(t,e)}}dashedLine(t,e){let 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,a=[];return t.forEach(t=>{let o=sf(t),s=Math.floor(o/(r+i)),n=(o+i-s*(r+i))/2,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++){let o=t*(r+i),s=o+r,h=[l[0]+o*Math.cos(c)+n*Math.cos(c),l[1]+o*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)];a.push(...this.helper.doubleLineOps(h[0],h[1],d[0],d[1],e))}}),a}}class df{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=af(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(t,i,e)}}zigzagLines(t,e,r){let i=[];return t.forEach(t=>{let a=sf(t),o=Math.round(a/(2*e)),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<o;t++){let a=2*t*e,o=2*(t+1)*e,n=Math.sqrt(2*Math.pow(e,2)),h=[s[0]+a*Math.cos(l),s[1]+a*Math.sin(l)],c=[s[0]+o*Math.cos(l),s[1]+o*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}}let uf={};class pf{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}let gf={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 ff(t,e){return t.type===e}function yf(t){let e=[],r=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e})(t),i="BOD",a=0,o=r[a];for(;!ff(o,2);){let n=0;var s=[];if("BOD"===i){if("M"!==o.text&&"m"!==o.text)return yf("M0,0"+t);a++,n=gf[o.text],i=o.text}else ff(o,1)?n=gf[i]:(a++,n=gf[o.text],i=o.text);if(!(a+n<r.length))throw new Error("Path data ended short");for(let t=a;t<a+n;t++){let e=r[t];if(!ff(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof gf[i])throw new Error("Bad segment: "+i);{let t={key:i,data:s};e.push(t),a+=n,o=r[a],"m"===(i="M"===i?"L":i)&&(i="l")}}return e}function mf(t){let e=0,r=0,i=0,a=0;var o,s,n=[];for({key:o,data:s}of t)switch(o){case"M":n.push({key:"M",data:[...s]}),[e,r]=s,[i,a]=s;break;case"m":e+=s[0],r+=s[1],n.push({key:"M",data:[e,r]}),i=e,a=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":{let 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":{let 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":{let 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=a}return n}function Cf(t){let e=[],r="",i=0,a=0,o=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,a]=c,[o,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],a=c[5],n=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,a]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,a]});break;case"V":a=c[0],e.push({key:"L",data:[i,a]});break;case"S":{let t=0,o=0;o="C"===r||"S"===r?(t=i+(i-n),a+(a-l)):(t=i,a),e.push({key:"C",data:[t,o,...c]}),n=c[0],l=c[1],i=c[2],a=c[3];break}case"T":{let[t,o]=c,s=0,h=0;h="Q"===r||"T"===r?(s=i+(i-n),a+(a-l)):(s=i,a);var d=i+2*(s-i)/3,u=a+2*(h-a)/3,p=t+2*(s-t)/3,g=o+2*(h-o)/3;e.push({key:"C",data:[d,u,p,g,t,o]}),n=s,l=h,i=t,a=o;break}case"Q":{let[t,r,o,s]=c,h=i+2*(t-i)/3,d=a+2*(r-a)/3,u=o+2*(t-o)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,p,o,s]}),n=t,l=r,i=o,a=s;break}case"A":{let t=Math.abs(c[0]),r=Math.abs(c[1]),o=c[2],s=c[3],n=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,a,l,h,l,h]}),i=l,a=h):i===l&&a===h||(bf(i,a,l,h,t,r,o,s,n).forEach(function(t){e.push({key:"C",data:t})}),i=l,a=h);break}case"Z":e.push({key:"Z",data:[]}),i=o,a=s}r=h}return e}function xf(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function bf(t,e,r,i,a,o,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]=xf(t,e,-c),[r,i]=xf(r,i,-c);let s=(t-r)/2,h=(e-i)/2;var y=s*s/(a*a)+h*h/(o*o);1<y&&(a*=y=Math.sqrt(y),o*=y);let d=a*a,m=o*o,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*a*h/o+(t+r)/2,f=b*-o*s/a+(e+i)/2,u=Math.asin(parseFloat(((e-f)/o).toFixed(9))),p=Math.asin(parseFloat(((i-f)/o).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){let t=p,e=r,n=i;p=l&&p>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,d=bf(r=g+a*Math.cos(p),i=f+o*Math.sin(p),e,n,a,o,s,0,l,[p,t,g,f])}m=p-u;let C=Math.cos(u),x=Math.sin(u),b=Math.cos(p),k=Math.sin(p),w=Math.tan(m/4),T=4/3*a*w,S=4/3*o*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);let t=[];for(let e=0;e<d.length;e+=3){let r=xf(d[e][0],d[e][1],c),i=xf(d[e+1][0],d[e+1][1],c),a=xf(d[e+2][0],d[e+2][1],c);t.push([r[0],r[1],i[0],i[1],a[0],a[1]])}return t}}let kf={randOffset:function(t,e){return $f(t,e)},randOffsetWithRange:function(t,e,r){return Of(t,e,r)},ellipse:function(t,e,r,i,a){return Bf(t,e,a,vf(r,i,a)).opset},doubleLineOps:function(t,e,r,i,a){return If(t,e,r,i,a,!0)}};function wf(t,e,r,i,a){return{type:"path",ops:If(t,e,r,i,a)}}function Tf(t,e,r){var i=(t||[]).length;if(2<i){var a=[];for(let e=0;e<i-1;e++)a.push(...If(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&a.push(...If(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return 2===i?wf(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Sf(t,e){if(t.length){var r="number"==typeof t[0][0]?[t]:t,i=qf(r[0],1+.2*e.roughness,e),a=e.disableMultiStroke?[]:qf(r[0],1.5*(1+.22*e.roughness),Af(e));for(let t=1;t<r.length;t++){var o=r[t];if(o.length){let t=qf(o,1+.2*e.roughness,e),r=e.disableMultiStroke?[]:qf(o,1.5*(1+.22*e.roughness),Af(e));for(let e of t)"move"!==e.op&&i.push(e);for(let t of r)"move"!==t.op&&a.push(t)}}return{type:"path",ops:i.concat(a)}}return{type:"path",ops:[]}}function vf(t,e,r){var i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=(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+=$f(t*a,r),ry:e+=$f(e*a,r)}}function Bf(t,e,r,i){let[a,o]=zf(i.increment,t,e,i.rx,i.ry,1,i.increment*Of(.1,Of(.4,1,r),r),r),s=Pf(a,null,r);if(!r.disableMultiStroke&&0!==r.roughness){let[a]=zf(i.increment,t,e,i.rx,i.ry,1.5,0,r),o=Pf(a,null,r);s=s.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function _f(t,e,r,i,a,o,s,n,l){var h=t;r=Math.abs(r/2),i=Math.abs(i/2);r+=$f(.01*r,l),i+=$f(.01*i,l);let c=a,d=o;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,o=Rf(a=Math.min(t/2,(d-c)/2),h,e,r,i,c,d,1,l),!l.disableMultiStroke){let t=Rf(a,h,e,r,i,c,d,1.5,l);o.push(...t)}return s&&(n?o.push(...If(h,e,h+r*Math.cos(c),e+i*Math.sin(c),l),...If(h,e,h+r*Math.cos(d),e+i*Math.sin(d),l)):o.push({op:"lineTo",data:[h,e]},{op:"lineTo",data:[h+r*Math.cos(c),e+i*Math.sin(c)]})),{type:"path",ops:o}}function Ff(t,e){let r=Cf(mf(yf(t))),i=[],a=[0,0],o=[0,0];for(let{key:t,data:s}of r)switch(t){case"M":o=[s[0],s[1]],a=[s[0],s[1]];break;case"L":i.push(...If(o[0],o[1],s[0],s[1],e)),o=[s[0],s[1]];break;case"C":{let[t,r,a,n,l,h]=s;i.push(...Nf(t,r,a,n,l,h,o,e)),o=[l,h];break}case"Z":i.push(...If(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]]}return{type:"path",ops:i}}function Lf(t,e){var r,i=[];for(r of t)if(r.length){let t=e.maxRandomnessOffset||0,a=r.length;if(2<a){i.push({op:"move",data:[r[0][0]+$f(t,e),r[0][1]+$f(t,e)]});for(let o=1;o<a;o++)i.push({op:"lineTo",data:[r[o][0]+$f(t,e),r[o][1]+$f(t,e)]})}}return{type:"fillPath",ops:i}}function Mf(t,e){return((t,e)=>{let r=t.fillStyle||"hachure";if(!uf[r])switch(r){case"zigzag":uf[r]||(uf[r]=new nf(e));break;case"cross-hatch":uf[r]||(uf[r]=new lf(e));break;case"dots":uf[r]||(uf[r]=new hf(e));break;case"dashed":uf[r]||(uf[r]=new cf(e));break;case"zigzag-line":uf[r]||(uf[r]=new df(e));break;default:r="hachure",uf[r]||(uf[r]=new of(e))}return uf[r]})(e,kf).fillPolygons(t,e)}function Af(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Ef(t){return t.randomizer||(t.randomizer=new pf(t.seed||0)),t.randomizer.next()}function Of(t,e,r,i=1){return r.roughness*i*(Ef(r)*(e-t)+t)}function $f(t,e,r=1){return Of(-t,t,e,r)}function If(t,e,r,i,a,o=!1){o=o?a.disableMultiStrokeFill:a.disableMultiStroke;var s=Df(t,e,r,i,a,!0,!1);return o?s:(o=Df(t,e,r,i,a,!0,!0),s.concat(o))}function Df(t,e,r,i,a,o,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,a.maxRandomnessOffset||0),d=(c=c*c*100>n?l/10:c)/2,u=.2+.2*Ef(a);n=a.bowing*a.maxRandomnessOffset*(i-e)/200,l=a.bowing*a.maxRandomnessOffset*(t-r)/200,n=$f(n,a,h),l=$f(l,a,h);var p=[],g=()=>$f(d,a,h),f=()=>$f(c,a,h),y=a.preserveVertices;return o&&p.push(s?{op:"move",data:[t+(y?0:g()),e+(y?0:g())]}:{op:"move",data:[t+(y?0:$f(c,a,h)),e+(y?0:$f(c,a,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 qf(t,e,r){if(!t.length)return[];var i=[];i.push([t[0][0]+$f(e,r),t[0][1]+$f(e,r)]),i.push([t[0][0]+$f(e,r),t[0][1]+$f(e,r)]);for(let a=1;a<t.length;a++)i.push([t[a][0]+$f(e,r),t[a][1]+$f(e,r)]),a===t.length-1&&i.push([t[a][0]+$f(e,r),t[a][1]+$f(e,r)]);return Pf(i,null,r)}function Pf(t,e,r){var i=t.length,a=[];if(3<i){var o=[],s=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){let r=t[e];o[0]=[r[0],r[1]],o[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],o[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],o[3]=[t[e+1][0],t[e+1][1]],a.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(e&&2===e.length){let t=r.maxRandomnessOffset;a.push({op:"lineTo",data:[e[0]+$f(t,r),e[1]+$f(t,r)]})}}else 3===i?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&a.push(...Df(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return a}function zf(t,e,r,i,a,o,s,n){var l=[],h=[];if(0===n.roughness){t/=4,h.push([e+i*Math.cos(-t),r+a*Math.sin(-t)]);for(let o=0;o<=2*Math.PI;o+=t){let t=[e+i*Math.cos(o),r+a*Math.sin(o)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+a*Math.sin(0)]),h.push([e+i*Math.cos(t),r+a*Math.sin(t)])}else{var c=$f(.5,n)-Math.PI/2,d=(h.push([$f(o,n)+e+.9*i*Math.cos(c-t),$f(o,n)+r+.9*a*Math.sin(c-t)]),2*Math.PI+c-.01);for(let s=c;s<d;s+=t){let t=[$f(o,n)+e+i*Math.cos(s),$f(o,n)+r+a*Math.sin(s)];l.push(t),h.push(t)}h.push([$f(o,n)+e+i*Math.cos(c+2*Math.PI+.5*s),$f(o,n)+r+a*Math.sin(c+2*Math.PI+.5*s)]),h.push([$f(o,n)+e+.98*i*Math.cos(c+s),$f(o,n)+r+.98*a*Math.sin(c+s)]),h.push([$f(o,n)+e+.9*i*Math.cos(c+.5*s),$f(o,n)+r+.9*a*Math.sin(c+.5*s)])}return[h,l]}function Rf(t,e,r,i,a,o,s,n,l){o+=$f(.1,l);var h=[];h.push([$f(n,l)+e+.9*i*Math.cos(o-t),$f(n,l)+r+.9*a*Math.sin(o-t)]);for(let c=o;c<=s;c+=t)h.push([$f(n,l)+e+i*Math.cos(c),$f(n,l)+r+a*Math.sin(c)]);return h.push([e+i*Math.cos(s),r+a*Math.sin(s)]),h.push([e+i*Math.cos(s),r+a*Math.sin(s)]),Pf(h,null,l)}function Nf(t,e,r,i,a,o,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:$f(c[0],n)),s[1]+(u?0:$f(c[0],n))]}),l=u?[a,o]:[a+$f(c[p],n),o+$f(c[p],n)],h.push({op:"bcurveTo",data:[t+$f(c[p],n),e+$f(c[p],n),r+$f(c[p],n),i+$f(c[p],n),l[0],l[1]]});return h}function Wf(t){return[...t]}function jf(t,e=0){let r=t.length;if(r<3)throw new Error("A curve must have at least three points.");var i=[];if(3===r)i.push(Wf(t[0]),Wf(t[1]),Wf(t[2]),Wf(t[2]));else{let 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 a=[],o=1-e;i.push(Wf(r[0]));for(let t=1;t+2<r.length;t++){let e=r[t];a[0]=[e[0],e[1]],a[1]=[e[0]+(o*r[t+1][0]-o*r[t-1][0])/6,e[1]+(o*r[t+1][1]-o*r[t-1][1])/6],a[2]=[r[t+1][0]+(o*r[t][0]-o*r[t+2][0])/6,r[t+1][1]+(o*r[t][1]-o*r[t+2][1])/6],a[3]=[r[t+1][0],r[t+1][1]],i.push(a[1],a[2],a[3])}}return i}function Hf(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function Uf(t,e,r){var i=Hf(e,r);return 0===i?Hf(t,e):(i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i,Hf(t,Yf(e,r,i=Math.max(0,Math.min(1,i)))))}function Yf(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function Gf(t,e,r,i){var a,o,s=i||[];if((()=>{var r=t[e+0],i=t[e+1],a=t[e+2],o=t[e+3];let s=3*i[0]-2*r[0]-o[0],n=(s*=s,3*i[1]-2*r[1]-o[1]);return n*=n,i=3*a[0]-2*o[0]-r[0],i*=i,a=3*a[1]-2*o[1]-r[1],s<i&&(s=i),n<(a*=a)&&(n=a),s+n})()<r){let r=t[e+0];(!s.length||(a=s[s.length-1],o=r,1<Math.sqrt(Hf(a,o))))&&s.push(r),s.push(t[e+3])}else{let i=t[e+0],a=t[e+1],o=t[e+2],n=t[e+3],l=Yf(i,a,.5),h=Yf(a,o,.5),c=Yf(o,n,.5),d=Yf(l,h,.5),u=Yf(h,c,.5),p=Yf(d,u,.5);Gf([i,l,d,p],0,r,s),Gf([p,u,c,n],0,r,s)}return s}function Xf(t,e){return Vf(t,0,t.length,e)}function Vf(t,e,r,i,a){a=a||[];var o=t[e],s=t[r-1];let n=0,l=1;for(let i=e+1;i<r-1;++i){let e=Uf(t[i],o,s);e>n&&(n=e,l=i)}return Math.sqrt(n)>i?(Vf(t,e,l+1,i,a),Vf(t,l,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Zf(t,e=.15,r){var i=[],a=(t.length-1)/3;for(let r=0;r<a;r++)Gf(t,3*r,e,i);return r&&0<r?Vf(i,0,i.length,r):i}let Qf="none";class Kf{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,a){return a=this._o(a),this._d("line",[wf(t,e,r,i,a)],a)}rectangle(t,e,r,i,a){var o=this._o(a),s=[];a=function(t,e,r,i,a){return Tf([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],!0,a)}(t,e,r,i,o);if(o.fill){let a=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===o.fillStyle?s.push(Lf([a],o)):s.push(Mf([a],o))}return o.stroke!==Qf&&s.push(a),this._d("rectangle",s,o)}ellipse(t,e,r,i,a){var o=[];r=Bf(t,e,a=this._o(a),i=vf(r,i,a));if(a.fill)if("solid"===a.fillStyle){let r=Bf(t,e,a,i).opset;r.type="fillPath",o.push(r)}else o.push(Mf([r.estimatedPoints],a));return a.stroke!==Qf&&o.push(r.opset),this._d("ellipse",o,a)}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",[Tf(t,!1,e)],e)}arc(t,e,r,i,a,o,s=!1,n){var l=this._o(n),h=[];n=_f(t,e,r,i,a,o,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){let s=Object.assign({},l),n=_f(t,e,r,i,a,o,s.disableMultiStroke=!0,!1,s);n.type="fillPath",h.push(n)}else h.push(((i,a,o,s)=>{var n=t,l=e,h=Math.abs(r/2),c=Math.abs(i/2);h+=$f(.01*h,s),c+=$f(.01*c,s);let d=a,u=o;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]),Mf([g],s)})(i,a,o,l));return l.stroke!==Qf&&h.push(n),this._d("arc",h,l)}curve(t,e){let r=this._o(e),i=[],a=Sf(t,r);if(r.fill&&r.fill!==Qf)if("solid"===r.fillStyle){let e=Sf(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{let e=[],a=t;if(a.length){let t="number"==typeof a[0][0]?[a]:a;for(let i of t)i.length<3?e.push(...i):3===i.length?e.push(...Zf(jf([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Zf(jf(i),10,(1+r.roughness)/2))}e.length&&i.push(Mf([e],r))}return r.stroke!==Qf&&i.push(a),this._d("curve",i,r)}polygon(t,e){var r=[],i=Tf(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(Lf([t],e)):r.push(Mf([t],e))),e.stroke!==Qf&&r.push(i),this._d("polygon",r,e)}path(t,e){let 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!==Qf;var a=r.stroke!==Qf,o=!!(r.simplification&&r.simplification<1),s=((t,e,r)=>{let i=Cf(mf(yf(t))),a=[],o=[],s=[0,0],n=[],l=()=>{4<=n.length&&o.push(...Zf(n,1)),n=[]},h=()=>{l(),o.length&&(a.push(o),o=[])};for(let{key:t,data:e}of i)switch(t){case"M":h(),s=[e[0],e[1]],o.push(s);break;case"L":l(),o.push([e[0],e[1]]);break;case"C":if(!n.length){let t=o.length?o[o.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(),o.push([s[0],s[1]])}if(h(),!r)return a;var c=[];for(let t of a){let e=Xf(t,r);e.length&&c.push(e)}return c})(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),n=Ff(t,r);if(e)if("solid"===r.fillStyle)if(1===s.length){let e=Ff(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(Lf(s,r));else i.push(Mf(s,r));a&&(o?s.forEach(t=>{i.push(Tf(t,!1,r))}):i.push(n))}return this._d("path",i,r)}opsToPath(t,e){let r="";for(var i of t.ops){let 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(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Qf};break;case"fillPath":e={d:this.opsToPath(t),stroke:Qf,strokeWidth:0,fill:r.fill||Qf};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||Qf,strokeWidth:r,fill:Qf}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class Jf{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Kf(e)}draw(t){let e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(var o of e)switch(o.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,o,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";let e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,o,a,e),i.restore();break}case"fillSketch":this.fillSketch(i,o,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(let i of e.ops){let 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,a){return t=this.gen.line(t,e,r,i,a),this.draw(t),t}rectangle(t,e,r,i,a){return t=this.gen.rectangle(t,e,r,i,a),this.draw(t),t}ellipse(t,e,r,i,a){return t=this.gen.ellipse(t,e,r,i,a),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,a,o,s=!1,n){return t=this.gen.arc(t,e,r,i,a,o,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}}let ty="http://www.w3.org/2000/svg";class ey{constructor(t,e){this.svg=t,this.gen=new Kf(e)}draw(t){var e,r=t.sets||[],i=t.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,o=a.createElementNS(ty,"g"),s=t.options.fixedDecimalPlaceDigits;for(e of r){let r=null;switch(e.type){case"path":(r=a.createElementNS(ty,"path")).setAttribute("d",this.opsToPath(e,s)),r.setAttribute("stroke",i.stroke),r.setAttribute("stroke-width",i.strokeWidth+""),r.setAttribute("fill","none"),i.strokeLineDash&&r.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&r.setAttribute("stroke-dashoffset",""+i.strokeLineDashOffset);break;case"fillPath":(r=a.createElementNS(ty,"path")).setAttribute("d",this.opsToPath(e,s)),r.setAttribute("stroke","none"),r.setAttribute("stroke-width","0"),r.setAttribute("fill",i.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||r.setAttribute("fill-rule","evenodd");break;case"fillSketch":r=this.fillSketch(a,e,i)}r&&o.appendChild(r)}return o}fillSketch(t,e,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),(t=t.createElementNS(ty,"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,a){return t=this.gen.line(t,e,r,i,a),this.draw(t)}rectangle(t,e,r,i,a){return t=this.gen.rectangle(t,e,r,i,a),this.draw(t)}ellipse(t,e,r,i,a){return t=this.gen.ellipse(t,e,r,i,a),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,a,o,s=!1,n){return t=this.gen.arc(t,e,r,i,a,o,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 ry={canvas:(t,e)=>new Jf(t,e),svg:(t,e)=>new ey(t,e),generator:t=>new Kf(t),newSeed:()=>Kf.newSeed()},iy=i(async(t,e,r)=>{let i;var a=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",Yu(e.labelStyle));let o;o=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 Jg(t,_r(Hu(o),yi()),{useHtmlLabels:a,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 a&&(h=s.children[0],s=ja(s),await Vu(h,o),l=h.getBoundingClientRect(),s.attr("width",l.width),s.attr("height",l.height)),a?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"),ay=i(async(t,e,r)=>{var i=r.useHtmlLabels??dr(yi()),a=t.insert("g").attr("class","label").attr("style",r.labelStyle||"");let o=(e=await Jg(a,_r(Hu(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=ja(e),o=s.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)),i?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:t,bbox:o,halfPadding:n,label:a}},"insertLabel"),oy=i((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),sy=i((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function ny(t){return t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y),t.push("Z"),t.join(" ")}function ly(t,e,r,i,a,o){var s=[],n=r-t,l=2*Math.PI/(n/o),h=e+(i-e)/2;for(let e=0;e<=50;e++){var c=t+e/50*n,d=h+a*Math.sin(l*(c-t));s.push({x:c,y:d})}return s}function hy(t,e,r,i,a,o){var s=[],n=a*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let a=0;a<i;a++){var h=n+a*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:-c,y:-h})}return s}function cy(t){t=Array.from(t.childNodes).filter(t=>"path"===t.tagName);let e=document.createElementNS("http://www.w3.org/2000/svg","path");var r=t.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" "),a=(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:a(r,"fill"),"fill-opacity":a(r,"fill-opacity")??"1"},Object.entries(r).forEach(([t,r])=>{r&&e.setAttribute(t,r)})),t&&(r={stroke:a(t,"stroke"),"stroke-width":a(t,"stroke-width")??"1","stroke-opacity":a(t,"stroke-opacity")??"1"},Object.entries(r).forEach(([t,r])=>{r&&e.setAttribute(t,r)})),a=document.createElementNS("http://www.w3.org/2000/svg","g");return a.appendChild(e),a}i(ny,"createPathFromPoints"),i(ly,"generateFullSineWavePoints"),i(hy,"generateCirclePoints"),i(cy,"mergePaths");var dy=i((t,e)=>{var r,i=t.x,a=t.y,o=e.x-i,s=(e=e.y-a,t.width/2);t=t.height/2,t=Math.abs(e)*s>Math.abs(o)*t?(e<0&&(t=-t),r=0==e?0:t*o/e,t):(r=s=o<0?-s:s,0==o?0:s*e/o);return{x:i+r,y:a+t}},"intersectRect"),uy=dy,py=i(async(t,e,r,i=!1,a=!1)=>{let o=e||"";"object"==typeof o&&(o=o[0]);e=yi();var s=dr(e);return Jg(t,o,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},e)},"createLabel"),gy=py,fy=i((t,e,r,i,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+i-a,"A",a,a,0,0,1,t+r-a,e+i,"H",t+a,"A",a,a,0,0,1,t,e+i-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" "),"createRoundedRectPathD"),yy=i(async(t,e)=>{var r=yi(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:o}=i,{labelStyles:s,nodeStyles:n,borderStyles:l,backgroundStyles:c}=nd(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 Jg(u,e.label,{style:e.labelStyle,useHtmlLabels:r,isNode:!0,width:e.width})).getBBox();r&&(r=g.children[0],g=ja(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=ry.svg(t),B=ld(e,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:a}),_=ld(e,{roughness:.7,fill:"none",stroke:o,seed:a});let 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",o),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",o);u.attr("transform",`translate(${C+d/2}, ${e.y}) rotate(-90) translate(${-p.width/2}, ${-p.height/2})`)}else{if(B=Math.max(0,x-y),_=y+(v=Math.min(k,B)),b=Math.max(0,m-_),S=e.x-g/2,"handDrawn"===e.look){C=ry.svg(t),d=ld(e,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:a}),x=ld(e,{roughness:.7,fill:"none",stroke:o,seed:a});let r=C.rectangle(S,y,g,v,d),s=(w=t.insert(()=>r,":first-child"),C.rectangle(S,_,g,b,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",S).attr("y",y).attr("width",g).attr("height",v).attr("fill",i).attr("stroke",o),T.attr("class","swimlane-body").attr("style",n).attr("x",S).attr("y",_).attr("width",g).attr("height",b).attr("fill","none").attr("stroke",o);k=e.x-p.width/2,B=y+(v-p.height)/2,u.attr("transform",`translate(${k}, ${B})`)}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 uy(e,t)},{cluster:t,labelBBox:p}},"swimlane"),my=i(async(t,e)=>{h.info("Creating subgraph rect for ",e.id,e);var r=yi(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:o}=i,{labelStyles:s,nodeStyles:n,borderStyles:l,backgroundStyles:c}=nd(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 Jg(u,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width}):await gy(u,e.label,e.labelStyle||"",!1,!0)).getBBox();dr(r)&&(d=p.children[0],f=ja(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=ry.svg(t),i=ld(e,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:a});let r=x.path(fy(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 o=Xu(r).subGraphTitleTopMargin,u.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+o})`),s&&(a=u.select("span"))&&a.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 uy(e,t)},{cluster:t,labelBBox:g}},"rect"),Cy=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,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none"),a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return uy(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),xy=i(async(t,e)=>{var r=yi(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:i,compositeBackground:o,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 gy(h,e.label,e.labelStyle,void 0,!0)).getBBox();dr(r)&&(f=u.children[0],u=ja(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=ry.svg(t);let r=e.rx||e.ry?b.path(fy(y,m,p,g,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:n,seed:a}):b.rectangle(y,m,p,g,{seed:a}),l=(C=t.insert(()=>r,":first-child"),b.rectangle(y,u,p,f,{fill:x?i:o,fillStyle:x?"hachure":"solid",stroke:n,seed:a}));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 uy(e,t)},{cluster:t,labelBBox:d}},"roundedWithTitle"),by=i(async(t,e)=>{h.info("Creating subgraph rect for ",e.id,e);var r=yi(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:o}=i,{labelStyles:s,nodeStyles:n,borderStyles:l,backgroundStyles:c}=nd(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 Jg(u,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width})).getBBox();dr(r)&&(g=d.children[0],d=ja(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=ry.svg(t),i=ld(e,{roughness:.7,fill:i,stroke:o,fillWeight:4,seed:a});let r=C.path(fy(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 o=Xu(r).subGraphTitleTopMargin,u.attr("transform",`translate(${e.x-p.width/2}, ${e.y-e.height/2+o})`),s&&(a=u.select("span"))&&a.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 uy(e,t)},{cluster:t,labelBBox:p}},"kanbanSection"),ky=i((t,e)=>{var{themeVariables:r,handDrawnSeed:i}=yi(),r=r.nodeBorder,a=(t=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look)).insert("g",":first-child"),o=0*e.padding,s=e.width+o,n=(o=(e.diff=-e.padding,e.height+o),e.x-s/2),l=e.y-o/2;let h;if(e.width=s,"handDrawn"===e.look){let e=ry.svg(t).rectangle(n,l,s,o,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:i});h=t.insert(()=>e,":first-child")}else{h=a.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",o).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 uy(e,t)},{cluster:t,labelBBox:{}}},"divider"),wy={rect:my,squareRect:my,roundedWithTitle:xy,noteGroup:Cy,divider:ky,kanbanSection:by,swimlane:yy},Ty=new Map,Sy=i(async(t,e)=>{var r=e.shape||"rect";r=await wy[r](t,e);return Ty.set(e.id,r),r},"insertCluster"),vy=i(()=>{Ty=new Map},"clear");function By(t,e){return t.intersect(e)}i(By,"intersectNode");var _y=By;function Fy(t,e,r,i){var a=t.x,o=(t=t.y,a-i.x),s=t-i.y,n=Math.sqrt(e*e*s*s+r*r*o*o);o=Math.abs(e*r*o/n),i.x<a&&(o=-o),e=Math.abs(e*r*s/n);return{x:a+o,y:t+(e=i.y<t?-e:e)}}i(Fy,"intersectEllipse");var Ly=Fy;function My(t,e,r){return Ly(t,e,e,r)}i(My,"intersectCircle");var Ay=My;function Ey(t,e,r,i){var a=e.y-t.y,o=t.x-e.x,s=e.x*t.y-t.x*e.y,n=a*r.x+o*r.y+s,l=a*i.x+o*i.y+s;if(!(0!=n&&0!=l&&Oy(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&&Oy(i,t)||0==(e=a*l-n*o))))return i=Math.abs(e/2),{x:(t=o*r-l*s)<0?(t-i)/e:(t+i)/e,y:(t=n*s-a*r)<0?(t-i)/e:(t+i)/e}}function Oy(t,e){return 0<t*e}i(Ey,"intersectLine"),i(Oy,"sameSign");var $y=Ey;function Iy(t,e,r){var i=t.x,a=t.y,o=[];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=a-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=$y(t,r,{x:l+c.x,y:h+c.y},{x:l+d.x,y:h+d.y}))&&o.push(c)}return o.length?(1<o.length&&o.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}),o[0]):t}i(Iy,"intersectPolygon");var Dy={node:_y,circle:Ay,ellipse:Ly,polygon:Iy,rect:uy};function qy(t,e){var r=nd(e).labelStyles;let i=r=(e.labelStyle=r,sy(e));r||(i="anchor"),r=t.insert("g").attr("class",i).attr("id",e.domId||e.id);t=e.cssStyles;var a=ry.svg(r),o=ld(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(o.roughness=0);let s=a.circle(0,0,2,o);return(a=r.insert(()=>s,":first-child")).attr("class","anchor").attr("style",Yu(t)),oy(e,a),e.intersect=function(t){return h.info("Circle intersect",e,1,t),Dy.circle(e,1,t)},r}function Py(t,e,r,i,a,o,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/a)**2+((i-e)/2/o)**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))*o*Math.sin(h)*(s?-1:1),u=l-c*a*Math.cos(h)*(s?-1:1),p=Math.atan2((e-u)/o,(t-d)/a);let g=Math.atan2((i-u)/o,(r-d)/a)-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+a*Math.cos(y);y=u+o*Math.sin(y);f.push({x:m,y:y})}return f}function zy(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 Ry(t,e){var{labelStyles:r,nodeStyles:a}=nd(e),o=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r);let 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 iy(t,e,sy(e)),r=r(e?.height||l.height),[n,h]=n(r),c=zy(r,n,h),l=(e?.width||l.width)+2*o+c-c;o=r,c=e.cssStyles;let d=[{x:l/2,y:-o/2},{x:-l/2,y:-o/2},...Py(-l/2,-o/2,-l/2,o/2,n,h,!1),{x:l/2,y:o/2},...Py(l/2,o/2,l/2,-o/2,n,h,!0)];r=ry.svg(t),l=ld(e,{}),"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o=ny(d);let u=r.path(o,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),a&&"handDrawn"!==e.look&&h.selectAll("path").attr("style",a),h.attr("transform",`translate(${n/2}, 0)`),oy(e,h),e.intersect=function(t){return Dy.polygon(e,d,t)},t}function Ny(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(qy,"anchor"),i(Py,"generateArcPoints"),i(zy,"calculateArcSagitta"),i(Ry,"bowTieRect"),i(Ny,"insertPolygonShape");async function Wy(t,e){var r,i,{labelStyles:i,nodeStyles:a}=nd(e),o=(i=(e.labelStyle=i,e.padding??0),"neo"===e.look?28:i),{shapeSvg:t,bbox:r}=(i="neo"===e.look?24:i,await iy(t,e,sy(e)));o=(e?.width??r.width)+("neo"===e.look?2*o:o+12);let s,n=[{x:12,y:i=-(r=(e?.height??r.height)+("neo"===e.look?2*i:i))},{x:o,y:i},{x:o,y:0},{x:0,y:0},{x:0,y:i+12},{x:12,y:i}];if(i=e.cssStyles,"handDrawn"===e.look){var l=ry.svg(t),h=ld(e,{}),c=ny(n);let a=l.path(c,h);s=t.insert(()=>a,":first-child").attr("transform",`translate(${-o/2}, ${r/2})`),i&&s.attr("style",i)}else s=Ny(t,o,r,n);return a&&s.attr("style",a),oy(e,s),e.intersect=function(t){return Dy.polygon(e,n,t)},t}function jy(t,e){var r=nd(e).nodeStyles,i=(t=(e.label="",t.insert("g").attr("class",sy(e)).attr("id",e.domId??e.id)),e.cssStyles);let a=[{x:0,y:(o=Math.max(28,e.width??0))/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}];var o=ry.svg(t),s=ld(e,{}),n=("handDrawn"!==e.look&&(s.roughness=0,s.fillStyle="solid"),ny(a));let l=o.path(n,s);return o=t.insert(()=>l,":first-child"),i&&"handDrawn"!==e.look&&o.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&o.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return Dy.polygon(e,a,t)},t}async function Hy(t,e,r){var{labelStyles:i,nodeStyles:a}=nd(e),{shapeSvg:i,bbox:t,halfPadding:o}=(e.labelStyle=i,await iy(t,e,sy(e)));r=r?.padding??o;let s,n="neo"===e.look?t.width/2+32:t.width/2+r;if(o=e.cssStyles,"handDrawn"===e.look){t=ry.svg(i),r=ld(e,{});let a=t.circle(0,0,2*n,r);(s=i.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",Yu(o))}else s=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",n).attr("cx",0).attr("cy",0);return oy(e,s),e.calcIntersect=function(t,e){var r=t.width/2;return Dy.circle(t,r,e)},e.intersect=function(t){return h.info("Circle intersect",e,n,t),Dy.circle(e,n,t)},i}function Uy(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 Yy(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),r=(e.labelStyle=r,e.label="",t.insert("g").attr("class",sy(e)).attr("id",e.domId??e.id));let a=Math.max(30,e?.width??0);t=e.cssStyles;var o=ry.svg(r),s=ld(e,{});"handDrawn"!==e.look&&(s.roughness=0,s.fillStyle="solid");let n=o.circle(0,0,2*a,s);var l=Uy(a);let c=o.path(l,s);return(o=r.insert(()=>n,":first-child")).insert(()=>c),o.attr("class","outer-path"),t&&"handDrawn"!==e.look&&o.selectAll("path").attr("style",t),i&&"handDrawn"!==e.look&&o.selectAll("path").attr("style",i),oy(e,o),e.intersect=function(t){return h.info("crossedCircle intersect",e,{radius:a,point:t}),Dy.circle(e,a,t)},r}function Gy(t,e,r,i=100,a=0,o=180){var s=[],n=a*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let a=0;a<i;a++){var h=n+a*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:-c,y:-h})}return s}async function Xy(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,label:a}=(e.labelStyle=r,await iy(t,e,sy(e))),o="neo"===e.look?18:e.padding??0,s="neo"===e.look?12:e.padding??0,n=(o=t.width+o,s=t.height+s,Math.max(5,.1*s)),l=e.cssStyles,h=[...Gy(o/2,-s/2,n,30,-90,0),{x:-o/2-n,y:n},...Gy(o/2+2*n,-n,n,20,-180,-270),...Gy(o/2+2*n,n,n,20,-90,-180),{x:-o/2-n,y:-s/2},...Gy(o/2,s/2,n,20,0,90)];let c=[{x:o/2,y:-s/2-n},{x:-o/2,y:-s/2-n},...Gy(o/2,-s/2,n,20,-90,0),{x:-o/2-n,y:-n},...Gy(o/2+.1*o,-n,n,20,-180,-270),...Gy(o/2+.1*o,n,n,20,-90,-180),{x:-o/2-n,y:s/2},...Gy(o/2,s/2,n,20,0,90),{x:-o/2,y:s/2+n},{x:o/2,y:s/2+n}];var d=ry.svg(r),u=ld(e,{fill:"none"});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),h=ny(h).replace("Z","");let p=d.path(h,u);h=ny(c);let 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)`),a.attr("transform",`translate(${-o/2+n-(t.x-(t.left??0))},${-s/2+(e.padding??0)/2-(t.y-(t.top??0))})`),oy(e,d),e.intersect=function(t){return Dy.polygon(e,c,t)},r}function Vy(t,e,r,i=100,a=0,o=180){var s=[],n=a*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let a=0;a<i;a++){var h=n+a*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:c,y:h})}return s}async function Zy(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,label:a}=(e.labelStyle=r,await iy(t,e,sy(e))),o="neo"===e.look?18:e.padding??0,s="neo"===e.look?12:e.padding??0,n=(o=t.width+("neo"===e.look?2*o:o),s=t.height+("neo"===e.look?2*s:s),Math.max(5,.1*s)),l=e.cssStyles,h=[...Vy(o/2,-s/2,n,20,-90,0),{x:o/2+n,y:-n},...Vy(o/2+2*n,-n,n,20,-180,-270),...Vy(o/2+2*n,n,n,20,-90,-180),{x:o/2+n,y:s/2},...Vy(o/2,s/2,n,20,0,90)];let c=[{x:-o/2,y:-s/2-n},{x:o/2,y:-s/2-n},...Vy(o/2,-s/2,n,20,-90,0),{x:o/2+n,y:-n},...Vy(o/2+2*n,-n,n,20,-180,-270),...Vy(o/2+2*n,n,n,20,-90,-180),{x:o/2+n,y:s/2},...Vy(o/2,s/2,n,20,0,90),{x:o/2,y:s/2+n},{x:-o/2,y:s/2+n}];var d=ry.svg(r),u=ld(e,{fill:"none"});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),h=ny(h).replace("Z","");let p=d.path(h,u);h=ny(c);let 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)`),a.attr("transform",`translate(${-o/2+(e.padding??0)/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)/2-(t.y-(t.top??0))})`),oy(e,d),e.intersect=function(t){return Dy.polygon(e,c,t)},r}function Qy(t,e,r,i=100,a=0,o=180){var s=[],n=a*Math.PI/180,l=(o*Math.PI/180-n)/(i-1);for(let a=0;a<i;a++){var h=n+a*l,c=t+r*Math.cos(h);h=e+r*Math.sin(h);s.push({x:-c,y:-h})}return s}async function Ky(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,label:a}=(e.labelStyle=r,await iy(t,e,sy(e))),o="neo"===e.look?18:e.padding??0,s="neo"===e.look?12:e.padding??0,n=(o=t.width+("neo"===e.look?2*o:o),s=t.height+("neo"===e.look?2*s:s),Math.max(5,.1*s)),l=e.cssStyles,h=[...Qy(o/2,-s/2,n,30,-90,0),{x:-o/2-n,y:n},...Qy(o/2+2*n,-n,n,20,-180,-270),...Qy(o/2+2*n,n,n,20,-90,-180),{x:-o/2-n,y:-s/2},...Qy(o/2,s/2,n,20,0,90)],c=[...Qy(-o/2+n+n/2,-s/2,n,20,-90,-180),{x:o/2-n/2,y:n},...Qy(-o/2-n/2,-n,n,20,0,90),...Qy(-o/2-n/2,n,n,20,-90,0),{x:o/2-n/2,y:-n},...Qy(-o/2+n+n/2,s/2,n,30,-180,-270)];let d=[{x:o/2,y:-s/2-n},{x:-o/2,y:-s/2-n},...Qy(o/2,-s/2,n,20,-90,0),{x:-o/2-n,y:-n},...Qy(o/2+2*n,-n,n,20,-180,-270),...Qy(o/2+2*n,n,n,20,-90,-180),{x:-o/2-n,y:s/2},...Qy(o/2,s/2,n,20,0,90),{x:-o/2,y:s/2+n},{x:o/2-n-n/2,y:s/2+n},...Qy(-o/2+n+n/2,-s/2,n,20,-90,-180),{x:o/2-n/2,y:n},...Qy(-o/2-n/2,-n,n,20,0,90),...Qy(-o/2-n/2,n,n,20,-90,0),{x:o/2-n/2,y:-n},...Qy(-o/2+n+n/2,s/2,n,30,-180,-270)];var u=ry.svg(r),p=ld(e,{fill:"none"});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),h=ny(h).replace("Z","");let g=u.path(h,p);h=ny(c).replace("Z","");let f=u.path(h,p);c=ny(d);let 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)`),a.attr("transform",`translate(${-o/2+(e.padding??0)/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)/2-(t.y-(t.top??0))})`),oy(e,h),e.intersect=function(t){return Dy.polygon(e,d,t)},r}async function Jy(t,e){var r,i,{labelStyles:a,nodeStyles:o}=nd(e),s=(a=(e.labelStyle=a,e.padding??0),"neo"===e.look?16:a),{shapeSvg:t,bbox:r}=(a="neo"===e.look?12:a,await iy(t,e,sy(e))),a=(s=Math.max(20,1.25*(r.width+2*s),e?.width??0),(r=Math.max(5,r.height+2*a,e?.height??0))/2),n=e.cssStyles,l=ry.svg(t),h=ld(e,{}),c=r/4;let d=[{x:i=(i=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),s))-a,y:0},{x:c,y:0},{x:0,y:r/2},{x:c,y:r},{x:i,y:r},...hy(-i,-r/2,a,50,270,90)];c=ny(d);let 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),o&&"handDrawn"!==e.look&&i.selectChildren("path").attr("style",o),i.attr("transform",`translate(${-s/2}, ${-r/2})`),oy(e,i),e.intersect=function(t){return Dy.polygon(e,d,t)},t}i(Wy,"card"),i(jy,"choice"),i(Hy,"circle"),i(Uy,"createLine"),i(Yy,"crossedCircle"),i(Gy,"generateCirclePoints"),i(Xy,"curlyBraceLeft"),i(Vy,"generateCirclePoints"),i(Zy,"curlyBraceRight"),i(Qy,"generateCirclePoints"),i(Ky,"curlyBraces"),i(Jy,"curvedTrapezoid");var tm=i((t,e,r,i,a,o)=>[`M${t},`+(e+o),`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,"l0,"+i,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),em=i((t,e,r,i,a,o)=>[`M${t},`+(e+o),`M${t+r},`+(e+o),`a${a},${o} 0,0,0 ${-r},0`,"l0,"+i,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),rm=i((t,e,r,i,a,o)=>[`M${t-r/2},`+-i/2,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function im(t,e){var r,{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?24:r),{shapeSvg:o,bbox:t,label:s}=(r="neo"===e.look?24:r,(e.width||e.height)&&(o=e.width??0,e.width=(e.width??0)-r,e.width<8&&(e.width=8),e.height=(e.height??0)-a-o/2/(2.5+o/50)*3,e.height<8)&&(e.height=8),await iy(t,e,sy(e)));let n,l=(r=(e.width||t.width)+r)/2,h=l/(2.5+r/50);a=(e.height||t.height)+a+h;var c=e.cssStyles;if("handDrawn"===e.look){var d=ry.svg(o),u=em(0,0,r,a,l,h),p=rm(0,h,r,a,l,h),g=ld(e,{});let t=d.path(u,g),i=d.path(p,ld(e,{fill:"none"}));n=o.insert(()=>i,":first-child"),(n=o.insert(()=>t,":first-child")).attr("class","basic label-container"),c&&n.attr("style",c)}else u=tm(0,0,r,a,l,h),n=o.insert("path",":first-child").attr("d",u).attr("class","basic label-container outer-path").attr("style",Yu(c)).attr("style",i);return n.attr("label-offset-y",h),n.attr("transform",`translate(${-r/2}, ${-(a/2+h)})`),oy(e,n),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=Dy.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(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-h)){let a=h*h*(1-i*i/(l*l));0<a&&(a=Math.sqrt(a)),a=h-a,0<t.y-(e.y??0)&&(a=-a),r.y+=a}return r},o}async function am(t,e,r){var{labelStyles:i,nodeStyles:a}=nd(e),{shapeSvg:i,bbox:t}=(e.labelStyle=i,await iy(t,e,sy(e))),o=Math.max(t.width+2*r.labelPaddingX,e?.width||0),s=-o/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=ry.svg(i);var u=ld(e,{});let a=h||c?r.path(fy(s,n,o,t,h||0),u):r.rectangle(s,n,o,t,u);(l=i.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",Yu(d))}else(l=i.insert("rect",":first-child")).attr("class","basic label-container").attr("style",a).attr("rx",Yu(h)).attr("ry",Yu(c)).attr("x",s).attr("y",n).attr("width",o).attr("height",t);return oy(e,l),e.calcIntersect=function(t,e){return Dy.rect(t,e)},e.intersect=function(t){return Dy.rect(e,t)},i}async function om(t,e){var{cssClasses:r,labelPaddingX:i,labelPaddingY:a,padding:o,width:s,height:n}=e;t=await am(t,e,{rx:0,ry:0,classes:r??"",labelPaddingX:i??2*(o??0),labelPaddingY:a??o??0});if("handDrawn"===e.look){let a=ry.svg(t),o=ld(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(()=>a.line(e.x,e.y,e.x+e.width,e.y,o),".basic.label-container g.label"),t.insert(()=>a.line(e.x,e.y+e.height,e.x+e.width,e.y+e.height,o),".basic.label-container g.label"),r.remove())}}else a=t.select(".basic.label-container"),o=(Number(a.attr("width"))||s)??0,e=(Number(a.attr("height"))||n)??0,0<o&&0<e&&a.attr("stroke-dasharray",o+" "+e);return t}async function sm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,"neo"===e.look?16:e.padding??0),"neo"===e.look?16:e.padding??0),{shapeSvg:t,bbox:o,label:s}=await iy(t,e,sy(e)),n=(r=o.width+r,.2*(a=o.height+a)),r=-r/2,l=(a=-a/2-n/2,e.cssStyles),h=ry.svg(t),c=ld(e,{}),d=("handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid"),[{x:r,y:a+n},{x:-r,y:a+n},{x:-r,y:-a},{x:r,y:-a},{x:r,y:a},{x:-r,y:a},{x:-r,y:a+n}]);let 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-(o.x-(o.left??0))}, ${a+n+(e.padding??0)/2-(o.y-(o.top??0))})`),oy(e,h),e.intersect=function(t){return Dy.rect(e,t)},t}async function nm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a="neo"===e.look?12:5,{shapeSvg:t,bbox:o}=(r=(e.labelStyle=r,e.padding??0),r="neo"===e.look?16:r,await iy(t,e,sy(e)));let s,n=(e?.width?e?.width/2:o.width/2)+(r??0);o=n-a;var l,c,r=e.cssStyles;return"handDrawn"===e.look?(a=ry.svg(t),l=ld(e,{roughness:.2,strokeWidth:2.5}),c=ld(e,{roughness:.2,strokeWidth:1.5}),l=a.circle(0,0,2*n,l),a=a.circle(0,0,2*o,c),(s=t.insert("g",":first-child")).attr("class",Yu(e.cssClasses)).attr("style",Yu(r)),s.node()?.appendChild(l),s.node()?.appendChild(a)):(c=(s=t.insert("g",":first-child")).insert("circle",":first-child"),r=s.insert("circle"),s.attr("class","basic label-container").attr("style",i),c.attr("class","outer-circle").attr("style",i).attr("r",n).attr("cx",0).attr("cy",0),r.attr("class","inner-circle").attr("style",i).attr("r",o).attr("cx",0).attr("cy",0)),oy(e,s),e.intersect=function(t){return h.info("DoubleCircle intersect",e,n,t),Dy.circle(e,n,t)},t}function lm(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:a}=nd(e),i=(e.label="",e.labelStyle=i,t.insert("g").attr("class",sy(e)).attr("id",e.domId??e.id)),o=(t=e.cssStyles,ry.svg(i)),s=(r=r.nodeBorder,ld(e,{fillStyle:"solid"}));"handDrawn"!==e.look&&(s.roughness=0);let n=o.circle(0,0,14,s);return(o=i.insert(()=>n,":first-child")).selectAll("path").attr("style",`fill: ${r} !important;`),t&&0<t.length&&"handDrawn"!==e.look&&o.selectAll("path").attr("style",t),a&&"handDrawn"!==e.look&&o.selectAll("path").attr("style",a),oy(e,o),e.intersect=function(t){return h.info("filledCircle intersect",e,{radius:7,point:t}),Dy.circle(e,7,t)},i}i(im,"cylinder"),i(am,"drawRect"),i(om,"datastore"),i(sm,"dividedRectangle"),i(nm,"doublecircle"),i(lm,"filledCircle");async function hm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:t,bbox:a,label:o}=(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 iy(t,e,sy(e))),r=(e?.width||a.width)+(r??0),s=e?.height||r+a.height;let n=[{x:0,y:-s},{x:s,y:-s},{x:s/2,y:0}];var l=e.cssStyles,c=ry.svg(t),d=ld(e,{}),u=("handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid"),ny(n));let 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,oy(e,c),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-s/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return h.info("Triangle intersect",e,n,t),Dy.polygon(e,n,t)},t}function cm(t,e,{dir:r,config:{state:i,themeVariables:a}}){var o=nd(e).nodeStyles,s=(t=(e.label="",t.insert("g").attr("class",sy(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=ry.svg(t);a=ld(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(a.roughness=0,a.fillStyle="solid");let d=c.rectangle(r,h,n,l,a);return c=t.insert(()=>d,":first-child"),s&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&c.selectAll("path").attr("style",o),oy(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 Dy.rect(e,t)},t}async function dm(t,e){var r,{labelStyles:i,nodeStyles:a}=nd(e),o=(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*o,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*i,e.width<15)&&(e.width=15),await iy(t,e,sy(e))),i=(e?.width||Math.max(15,r.width))+2*i;let s=(r=(e?.height||Math.max(10,r.height))+2*o)/2;o=e.cssStyles;var n=ry.svg(t),l=ld(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-i/2,y:-r/2},{x:i/2-s,y:-r/2},...hy(-i/2+s,0,s,50,90,270),{x:i/2-s,y:r/2},{x:-i/2,y:r/2}];i=ny(c);let d=n.path(i,l);return(r=t.insert(()=>d,":first-child")).attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&r.selectChildren("path").attr("style",o),a&&"handDrawn"!==e.look&&r.selectChildren("path").attr("style",a),oy(e,r),e.intersect=function(t){return h.info("Pill intersect",e,{radius:s,point:t}),Dy.polygon(e,c,t)},t}i(hm,"flippedTriangle"),i(cm,"forkJoin"),i(dm,"halfRoundedRectangle");var um=i((t,e,r,i,a)=>[`M${t+a},`+e,`L${t+r-a},`+e,`L${t+r},`+(e-i/2),`L${t+r-a},`+(e-i),`L${t+a},`+(e-i),`L${t},`+(e-i/2),"Z"].join(" "),"createHexagonPathD");async function pm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a="neo"===e.look?3.5:4,o=(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/a*2-r,e.height=(e.height??0)-o),await iy(t,e,sy(e)));let n,l=[{x:a=(o=(e?.height||t.height)+o)/a,y:0},{x:(t=(e?.width||t.width)+2*a+r)-a,y:0},{x:t,y:-o/2},{x:t-a,y:-o},{x:a,y:-o},{x:0,y:-o/2}];if(r=e.cssStyles,"handDrawn"===e.look){var h=ry.svg(s),c=ld(e,{});a=um(0,0,t,o,a);let i=h.path(a,c);n=s.insert(()=>i,":first-child").attr("transform",`translate(${-t/2}, ${o/2})`),r&&n.attr("style",r)}else n=Ny(s,t,o,l);return i&&n.attr("style",i),e.width=t,e.height=o,oy(e,n),e.intersect=function(t){return Dy.polygon(e,l,t)},s}async function gm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),r=(e.label="",e.labelStyle=r,await iy(t,e,sy(e))).shapeSvg,a=(t=Math.max(30,e?.width??0),Math.max(30,e?.height??0)),o=e.cssStyles,s=ry.svg(r),n=ld(e,{});"handDrawn"!==e.look&&(n.roughness=0,n.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:a},{x:t,y:a}];var c=ny(l);let d=s.path(c,n);return(s=r.insert(()=>d,":first-child")).attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&s.selectChildren("path").attr("style",o),i&&"handDrawn"!==e.look&&s.selectChildren("path").attr("style",i),s.attr("transform",`translate(${-t/2}, ${-a/2})`),oy(e,s),e.intersect=function(t){return h.info("Pill intersect",e,{points:l}),Dy.polygon(e,l,t)},r}async function fm(t,e,{config:{themeVariables:r,flowchart:i}}){var a=nd(e).labelStyles;e.labelStyle=a,a=e.assetHeight??48,a=Math.max(a,e.assetWidth??48),i=i?.wrappingWidth;e.width=Math.max(a,i??0);let{shapeSvg:o,bbox:s,label:n}=await iy(t,e,"icon-shape default"),l="t"===e.pos,c=a,d=a;i=r.nodeBorder,t=ad(e).stylesMap,r=-d/2;var u=-c/2;let p=e.label?8:0;var g=ry.svg(o),f=ld(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let y=g.rectangle(r,u,d,c,f);r=Math.max(d,s.width),u=c+s.height+p;let m=g.rectangle(-r/2,-u/2,r,u,{...f,fill:"transparent",stroke:"none"});var C,x,b;g=o.insert(()=>y,":first-child"),r=o.insert(()=>m);return e.icon&&((f=o.append("g")).html(`<g>${await Cp(e.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),C=(a=f.node().getBBox()).width,x=a.height,b=a.y,f.attr("transform",`translate(${-C/2-a.x},${l?s.height/2+p/2-x/2-b:-s.height/2-p/2-x/2-b})`),f.attr("style",`color: ${t.get("stroke")??i};`)),n.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${l?-u/2:u/2-s.height})`),g.attr("transform",`translate(0,${l?s.height/2+p/2:-s.height/2-p/2})`),oy(e,r),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Dy.rect(e,t);var r=e.x??0,i=e.y??0,a=e.height??0;let o=[];return o=l?[{x:r-s.width/2,y:i-a/2},{x:r+s.width/2,y:i-a/2},{x:r+s.width/2,y:i-a/2+s.height+p},{x:r+d/2,y:i-a/2+s.height+p},{x:r+d/2,y:i+a/2},{x:r-d/2,y:i+a/2},{x:r-d/2,y:i-a/2+s.height+p},{x:r-s.width/2,y:i-a/2+s.height+p}]:[{x:r-d/2,y:i-a/2},{x:r+d/2,y:i-a/2},{x:r+d/2,y:i-a/2+c},{x:r+s.width/2,y:i-a/2+c},{x:r+s.width/2/2,y:i+a/2},{x:r-s.width/2,y:i+a/2},{x:r-s.width/2,y:i-a/2+c},{x:r-d/2,y:i-a/2+c}],Dy.polygon(e,o,t)},o}async function ym(t,e,{config:{themeVariables:r,flowchart:i}}){var a=nd(e).labelStyles,{shapeSvg:i,bbox:t,label:o}=(a=(e.labelStyle=a,e.assetHeight??48),a=Math.max(a,e.assetWidth??48),i=i?.wrappingWidth,e.width=Math.max(a,i??0),await iy(t,e,"icon-shape default")),s=e.label?8:0,n="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=ad(e).stylesMap,d=ry.svg(i),u=ld(e,{}),p=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),g=(p=(u.stroke=p??l,i.append("g")),a=(l=(e.icon&&p.html(`<g>${await Cp(e.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),p.node().getBBox())).width,l.height),f=l.x,l=l.y,y=Math.max(a,g)*Math.SQRT2+40;let m=d.circle(0,0,y,u);var C=Math.max(y,t.width);y=y+t.height+s;let 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(${-a/2-f},${n?t.height/2+s/2-g/2-l:-t.height/2-s/2-g/2-l})`),p.attr("style",`color: ${c.get("stroke")??r};`),o.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${n?-y/2:y/2-t.height})`),d.attr("transform",`translate(0,${n?t.height/2+s/2:-t.height/2-s/2})`),oy(e,C),e.intersect=function(t){return h.info("iconSquare intersect",e,t),Dy.rect(e,t)},i}async function mm(t,e,{config:{themeVariables:r,flowchart:i}}){var a=nd(e).labelStyles;e.labelStyle=a,a=e.assetHeight??48,a=Math.max(a,e.assetWidth??48),i=i?.wrappingWidth;e.width=Math.max(a,i??0);let{shapeSvg:o,bbox:s,halfPadding:n,label:l}=await iy(t,e,"icon-shape default"),c="t"===e.pos,d=a+2*n,u=a+2*n;var{nodeBorder:i,mainBkg:t}=r,p=(r=ad(e).stylesMap,-u/2),g=-d/2;let f=e.label?8:0;var y=ry.svg(o),m=ld(e,{}),C=("handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid"),r.get("fill"));m.stroke=C??t;let x=y.path(fy(p,g,u,d,5),m);C=Math.max(u,s.width),t=d+s.height+f;let b=y.rectangle(-C/2,-t/2,C,t,{...m,fill:"transparent",stroke:"none"});var k;p=o.insert(()=>x,":first-child").attr("class","icon-shape2"),g=o.insert(()=>b);return e.icon&&((y=o.append("g")).html(`<g>${await Cp(e.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),m=(C=y.node().getBBox()).width,a=C.height,k=C.y,y.attr("transform",`translate(${-m/2-C.x},${c?s.height/2+f/2-a/2-k:-s.height/2-f/2-a/2-k})`),y.attr("style",`color: ${r.get("stroke")??i};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-t/2:t/2-s.height})`),p.attr("transform",`translate(0,${c?s.height/2+f/2:-s.height/2-f/2})`),oy(e,g),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Dy.rect(e,t);var r=e.x??0,i=e.y??0,a=e.height??0;let o=[];return o=c?[{x:r-s.width/2,y:i-a/2},{x:r+s.width/2,y:i-a/2},{x:r+s.width/2,y:i-a/2+s.height+f},{x:r+u/2,y:i-a/2+s.height+f},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+s.height+f},{x:r-s.width/2,y:i-a/2+s.height+f}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+s.width/2,y:i-a/2+d},{x:r+s.width/2/2,y:i+a/2},{x:r-s.width/2,y:i+a/2},{x:r-s.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],Dy.polygon(e,o,t)},o}async function Cm(t,e,{config:{themeVariables:r,flowchart:i}}){var a=nd(e).labelStyles;e.labelStyle=a,a=e.assetHeight??48,a=Math.max(a,e.assetWidth??48),i=i?.wrappingWidth;e.width=Math.max(a,i??0);let{shapeSvg:o,bbox:s,halfPadding:n,label:l}=await iy(t,e,"icon-shape default"),c="t"===e.pos,d=a+2*n,u=a+2*n;var{nodeBorder:i,mainBkg:t}=r,p=(r=ad(e).stylesMap,-u/2),g=-d/2;let f=e.label?8:0;var y=ry.svg(o),m=ld(e,{}),C=("handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid"),r.get("fill"));m.stroke=C??t;let x=y.path(fy(p,g,u,d,.1),m);C=Math.max(u,s.width),t=d+s.height+f;let b=y.rectangle(-C/2,-t/2,C,t,{...m,fill:"transparent",stroke:"none"});var k;p=o.insert(()=>x,":first-child"),g=o.insert(()=>b);return e.icon&&((y=o.append("g")).html(`<g>${await Cp(e.icon,{height:a,width:a,fallbackPrefix:""})}</g>`),m=(C=y.node().getBBox()).width,a=C.height,k=C.y,y.attr("transform",`translate(${-m/2-C.x},${c?s.height/2+f/2-a/2-k:-s.height/2-f/2-a/2-k})`),y.attr("style",`color: ${r.get("stroke")??i};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-t/2:t/2-s.height})`),p.attr("transform",`translate(0,${c?s.height/2+f/2:-s.height/2-f/2})`),oy(e,g),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Dy.rect(e,t);var r=e.x??0,i=e.y??0,a=e.height??0;let o=[];return o=c?[{x:r-s.width/2,y:i-a/2},{x:r+s.width/2,y:i-a/2},{x:r+s.width/2,y:i-a/2+s.height+f},{x:r+u/2,y:i-a/2+s.height+f},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+s.height+f},{x:r-s.width/2,y:i-a/2+s.height+f}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+s.width/2,y:i-a/2+d},{x:r+s.width/2/2,y:i+a/2},{x:r-s.width/2,y:i+a/2},{x:r-s.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],Dy.polygon(e,o,t)},o}async function xm(t,e,{config:{flowchart:r}}){var i=((a=new Image).src=e?.img??"",await a.decode(),Number(a.naturalWidth.toString().replace("px",""))),a=Number(a.naturalHeight.toString().replace("px","")),o=(e.imageAspectRatio=i/a,nd(e)).labelStyles;e.labelStyle=o,o=r?.wrappingWidth,e.defaultWidth=r?.wrappingWidth,r=Math.max(e.label?o??0:0,e?.assetWidth??i);let s="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:r,n="on"===e.constraint?s/e.imageAspectRatio:e?.assetHeight??a,{shapeSvg:l,bbox:c,label:d}=(e.width=Math.max(s,o??0),await iy(t,e,"image-shape default")),u="t"===e.pos;i=-s/2,r=-n/2;let p=e.label?8:0;a=ry.svg(l),o=ld(e,{}),"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let g=a.rectangle(i,r,s,n,o);t=Math.max(s,c.width),i=n+c.height+p;let f=a.rectangle(-t/2,-i/2,t,i,{...o,fill:"none",stroke:"none"});return r=l.insert(()=>g,":first-child"),a=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})`),oy(e,a),e.intersect=function(t){if(h.info("iconSquare intersect",e,t),!e.label)return Dy.rect(e,t);var r=e.x??0,i=e.y??0,a=e.height??0;let o=[];return o=u?[{x:r-c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2},{x:r+c.width/2,y:i-a/2+c.height+p},{x:r+s/2,y:i-a/2+c.height+p},{x:r+s/2,y:i+a/2},{x:r-s/2,y:i+a/2},{x:r-s/2,y:i-a/2+c.height+p},{x:r-c.width/2,y:i-a/2+c.height+p}]:[{x:r-s/2,y:i-a/2},{x:r+s/2,y:i-a/2},{x:r+s/2,y:i-a/2+n},{x:r+c.width/2,y:i-a/2+n},{x:r+c.width/2/2,y:i+a/2},{x:r-c.width/2,y:i+a/2},{x:r-c.width/2,y:i-a/2+n},{x:r-s/2,y:i-a/2+n}],Dy.polygon(e,o,t)},l}async function bm(t,e){var r,i,{labelStyles:r,nodeStyles:a}=nd(e),o=r=(e.labelStyle=r,e.padding??0),{shapeSvg:t,bbox:i}=(r="neo"===e.look?2*r:r,await iy(t,e,sy(e)));let s,n=[{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*(o??0),e?.height??0))/6,y:-i},{x:-3*i/6,y:-i}];if(o=e.cssStyles,"handDrawn"===e.look){var l=ry.svg(t),h=ld(e,{}),c=ny(n);let a=l.path(c,h);s=t.insert(()=>a,":first-child").attr("transform",`translate(${-r/2}, ${i/2})`),o&&s.attr("style",o)}else s=Ny(t,r,i,n);return a&&s.attr("style",a),e.width=r,e.height=i,oy(e,s),e.intersect=function(t){return Dy.polygon(e,n,t)},t}async function km(t,e){var{shapeSvg:t,bbox:r,label:i}=await iy(t,e,"label"),a=t.insert("rect",":first-child");return a.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))})`),oy(e,a),e.intersect=function(t){return Dy.rect(e,t)},t}async function wm(t,e){var r,{labelStyles:i,nodeStyles:a}=nd(e),o=i=(e.labelStyle=i,e.padding??0),i="neo"===e.look?2*i:i,{shapeSvg:t,bbox:r}=await iy(t,e,sy(e));o=(e?.height??r.height)+o;let s,n=[{x:0,y:0},{x:(r=(e?.width??r.width)+i)+3*o/6,y:0},{x:r,y:-o},{x:-3*o/6,y:-o}];if(i=e.cssStyles,"handDrawn"===e.look){var l=ry.svg(t),h=ld(e,{}),c=ny(n);let a=l.path(c,h);s=t.insert(()=>a,":first-child").attr("transform",`translate(${-r/2}, ${o/2})`),i&&s.attr("style",i)}else s=Ny(t,r,o,n);return a&&s.attr("style",a),e.width=r,e.height=o,oy(e,s),e.intersect=function(t){return Dy.polygon(e,n,t)},t}async function Tm(t,e){var r,{labelStyles:i,nodeStyles:a}=nd(e),o=i=(e.labelStyle=i,e.padding??0),i="neo"===e.look?2*i:i,{shapeSvg:t,bbox:r}=await iy(t,e,sy(e));let s,n=[{x:-3*(o=(e?.height??r.height)+o)/6,y:0},{x:r=(e?.width??r.width)+i,y:0},{x:r+3*o/6,y:-o},{x:0,y:-o}];if(i=e.cssStyles,"handDrawn"===e.look){var l=ry.svg(t),h=ld(e,{}),c=ny(n);let a=l.path(c,h);s=t.insert(()=>a,":first-child").attr("transform",`translate(${-r/2}, ${o/2})`),i&&s.attr("style",i)}else s=Ny(t,r,o,n);return a&&s.attr("style",a),e.width=r,e.height=o,oy(e,s),e.intersect=function(t){return Dy.polygon(e,n,t)},t}function Sm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),r=(e.label="",e.labelStyle=r,t.insert("g").attr("class",sy(e)).attr("id",e.domId??e.id)),a=(t=e.cssStyles,Math.max(35,e?.width??0)),o=Math.max(35,e?.height??0);let s=[{x:a,y:0},{x:0,y:o+3.5},{x:a-14,y:o+3.5},{x:0,y:2*o},{x:a,y:o-3.5},{x:14,y:o-3.5}];var n=ry.svg(r),l=ld(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),ny(s));let 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(-${a/2},${-o})`),oy(e,n),e.intersect=function(t){return h.info("lightningBolt intersect",e,t),Dy.polygon(e,s,t)},r}i(pm,"hexagon"),i(gm,"hourglass"),i(fm,"icon"),i(ym,"iconCircle"),i(mm,"iconRounded"),i(Cm,"iconSquare"),i(xm,"imageSquare"),i(bm,"inv_trapezoid"),i(km,"labelRect"),i(wm,"lean_left"),i(Tm,"lean_right"),i(Sm,"lightningBolt");var vm=i((t,e,r,i,a,o,s)=>[`M${t},`+(e+o),`a${a},${o} 0,0,0 ${r},0`,`a${a},${o} 0,0,0 ${-r},0`,"l0,"+i,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${t},`+(e+o+s),`a${a},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Bm=i((t,e,r,i,a,o,s)=>[`M${t},`+(e+o),`M${t+r},`+(e+o),`a${a},${o} 0,0,0 ${-r},0`,"l0,"+i,`a${a},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${t},`+(e+o+s),`a${a},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),_m=i((t,e,r,i,a,o)=>[`M${t-r/2},`+-i/2,`a${a},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Fm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:o,bbox:t,label:s}=(r="neo"===e.look?24:r,(e.width||e.height)&&(o=e.width??0,e.width=(e.width??0)-a,e.width<10&&(e.width=10),e.height=(e.height??0)-r-o/2/(2.5+o/50)*3,e.height<10)&&(e.height=10),await iy(t,e,sy(e)));let n=(a=(e?.width||t.width)+2*a)/2,l=n/(2.5+a/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=ry.svg(o),p=Bm(0,0,a,r,n,l,h),g=_m(0,l,a,r,n,l),f=ld(e,{});let t=u.path(p,f),i=u.path(g,f);o.insert(()=>i,":first-child").attr("class","line"),(c=o.insert(()=>t,":first-child")).attr("class","basic label-container"),d&&c.attr("style",d)}else p=vm(0,0,a,r,n,l,h),c=o.insert("path",":first-child").attr("d",p).attr("class","basic label-container outer-path").attr("style",Yu(d)).attr("style",i);return c.attr("label-offset-y",l),c.attr("transform",`translate(${-a/2}, ${-(r/2+l)})`),oy(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=Dy.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 a=l*l*(1-i*i/(n*n));0<a&&(a=Math.sqrt(a)),a=l-a,0<t.y-(e.y??0)&&(a=-a),r.y+=a}return r},o}async function Lm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:o,bbox:t,label:s}=(r="neo"===e.look?12:r,(e.width||e.height)&&(o=e.width,e.width=10*(o??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*r,e.height<10)&&(e.height=10),await iy(t,e,sy(e))),r=(a=(e?.width||t.width)+2*(a??0),(e?.height||t.height)+2*(r??0)),n="neo"===e.look?r/4:r/8,l=r+n,h=e.cssStyles,c=ry.svg(o),d=ld(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let u=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...ly(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,n,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=c.polygon(u.map(t=>[t.x,t.y]),d);return(l=o.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(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-r/2+(e.padding??0)-n/2-(t.y-(t.top??0))})`),oy(e,l),e.intersect=function(t){return Dy.polygon(e,u,t)},o}async function Mm(t,e){var r,{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),o=(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*a-2*o,10),e.height=Math.max((e?.height??0)-2*r-2*o,10)),await iy(t,e,sy(e))),l=-(a=(e?.width||s.width)+2*a+2*o-2*o)/2,h=-(r=(e?.height||s.height)+2*r+2*o-2*o)/2,c=e.cssStyles,d=ry.svg(t),u=ld(e,{});let p=[{x:l-o,y:h+o},{x:l-o,y:h+r+o},{x:l+a-o,y:h+r+o},{x:l+a-o,y:h+r},{x:l+a,y:h+r},{x:l+a,y:h+r-o},{x:l+a+o,y:h+r-o},{x:l+a+o,y:h-o},{x:l+o,y:h-o},{x:l+o,y:h},{x:l,y:h},{x:l,y:h+o}];r=[{x:l,y:h+o},{x:l+a-o,y:h+o},{x:l+a-o,y:h+r},{x:l+a,y:h+r},{x:l+a,y:h},{x:l,y:h}],"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),a=ny(p);let g=d.path(a,u);l=ny(r);let f=d.path(l,u);return"handDrawn"!==e.look&&(g=cy(g),f=cy(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-o-(s.x-(s.left??0))}, ${-s.height/2+o-(s.y-(s.top??0))})`),oy(e,h),e.intersect=function(t){return Dy.polygon(e,p,t)},t}async function Am(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,label:a}=(e.labelStyle=r,await iy(t,e,sy(e))),o=e.padding??0,s="neo"===e.look?16:o;o="neo"===e.look?12:o;let n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*s,e.height=(e?.height??0)-3*o);s=Math.max(t.width,e?.width??0)+2*s,o=Math.max(t.height,e?.height??0)+3*o;var l="neo"===e.look?o/4:o/8,h=-s/2,c=-(o=o+(n?l/2:-l/2))/2,d=e.cssStyles,u=ly(h-10,c+o+10,h+s-10,c+o+10,l,.8),p=u?.[u.length-1];let g=[{x:h-10,y:10+c},{x:h-10,y:c+o+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}];o=[{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=ry.svg(r),p=ld(e,{}),"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),s=ny(g);let f=u.path(s,p);h=ny(o);let 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})`),a.attr("transform",`translate(${-t.width/2-10-(t.x-(t.left??0))}, ${-t.height/2+10-l/2-(t.y-(t.top??0))})`),oy(e,c),e.intersect=function(t){return Dy.polygon(e,g,t)},r}async function Em(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:a}=nd(e),i=(e.labelStyle=i,e.useHtmlLabels||dr(rr())),{shapeSvg:i,bbox:t,label:o}=(i||(e.centerLabel=!0),await iy(t,e,sy(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=ry.svg(i);r=ld(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let u=d.rectangle(l,h,s,n,r);return(d=i.insert(()=>u,":first-child")).attr("class","basic label-container outer-path"),o.attr("class","label noteLabel"),c&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",c),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),o.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))}, ${-t.height/2-(t.y-(t.top??0))})`),oy(e,d),e.intersect=function(t){return Dy.rect(e,t)},i}i(Fm,"linedCylinder"),i(Lm,"linedWaveEdgedRect"),i(Mm,"multiRect"),i(Am,"multiWaveEdgedRectangle"),i(Em,"note");var Om=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 $m(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await iy(t,e,sy(e))),a=[{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 o;var s=e.cssStyles;if("handDrawn"===e.look){var n=ry.svg(r),l=ld(e,{}),h=Om(0,0,t);let i=n.path(h,l);o=r.insert(()=>i,":first-child").attr("transform",`translate(${-t/2+.5}, ${t/2})`),s&&o.attr("style",s)}else(o=Ny(r,t,t,a)).attr("transform",`translate(${-t/2+.5}, ${t/2})`);return i&&o.attr("style",i),oy(e,o),e.calcIntersect=function(t,e){var r=t.width;return{x:(t=Dy.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 Im(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?21:r??0),{shapeSvg:t,bbox:o,label:s}=(r="neo"===e.look?12:r??0,await iy(t,e,sy(e))),n=(a=-((e?.width??o.width)+("neo"===e.look?2*a:a))/2,(r=-((e?.height??o.height)+("neo"===e.look?2*r:r))/2)/2);let l=[{x:a+n,y:r},{x:a,y:0},{x:a+n,y:-r},{x:-a,y:-r},{x:-a,y:r}];a=e.cssStyles;var r=ry.svg(t),h=ld(e,{}),c=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),ny(l));let d=r.path(c,h);return(r=t.insert(()=>d,":first-child")).attr("class","basic label-container outer-path"),a&&"handDrawn"!==e.look&&r.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&r.selectAll("path").attr("style",i),r.attr("transform",`translate(${-n/2},0)`),s.attr("transform",`translate(${-n/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),oy(e,r),e.intersect=function(t){return Dy.polygon(e,l,t)},t}async function Dm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";t=(r=t.insert("g").attr("class",a).attr("id",e.domId||e.id)).insert("g");var r,o=r.insert("g").attr("class","label").attr("style",i),s=e.description,n=await gy(o,e.label,e.labelStyle,!0,!0);let l={width:0,height:0};dr(yi())&&(c=n.children[0],d=ja(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 gy(o,Array.isArray(c)?c.join("<br/>"):c,e.labelStyle,!0,!0)).children[0],ja(s));l=c.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height),c=(e.padding||0)/2,ja(s).attr("transform","translate( "+(l.width>d.width?0:(d.width-l.width)/2)+", "+(d.height+c+5)+")"),ja(n).attr("transform","translate( "+(l.width<d.width?0:-(d.width-l.width)/2)+", 0)"),l=o.node().getBBox(),o.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,o=-l.height/2-c;let p,g;if("handDrawn"===e.look){var f=ry.svg(r),y=ld(e,{});let t=f.path(fy(n,o,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 oy(e,p),e.intersect=function(t){return Dy.rect(e,t)},r}async function qm(t,e,{config:{themeVariables:r}}){return am(t,e,{rx:r=r?.radius??5,ry:r,classes:"",labelPaddingX:+(e?.padding??0),labelPaddingY:+(e?.padding??0)})}i($m,"question"),i(Im,"rect_left_inv_arrow"),i(Dm,"rectWithTitle"),i(qm,"roundedRect");async function Pm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,"neo"===e.look?16:e.padding??0),"neo"===e.look?12:e.padding??0),{shapeSvg:t,bbox:o,label:s}=await iy(t,e,sy(e)),n=(r=(e?.width??o.width)+2*r+("neo"===e.look?8:16))-8,l=a=(e?.height??o.height)+2*a,r=8-r/2,h=(a=-a/2,e.cssStyles),c=ry.svg(t),d=ld(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid"),n=[{x:r,y:a},{x:r+n,y:a},{x:r+n,y:a+l},{x:r-8,y:a+l},{x:r-8,y:a},{x:r,y:a},{x:r,y:a+l}];let 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",Yu(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-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),oy(e,r),e.intersect=function(t){return Dy.rect(e,t)},t}async function zm(t,e){var r,{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:t,bbox:o,label:s}=(r="neo"===e.look?12:r,(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*r,10)),await iy(t,e,sy(e))),n=-(a=(e?.width||o.width)+2*a)/2,l=-(r=1.5*((e?.height||o.height)+2*r)/1.5)/2,h=e.cssStyles,c=ry.svg(t),d=ld(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let u=[{x:n,y:l},{x:n,y:l+r},{x:n+a,y:l+r},{x:n+a,y:l-r/2}];n=ny(u);let 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(${-a/2+(e.padding??0)-(o.x-(o.left??0))}, ${-r/4+(e.padding??0)-(o.y-(o.top??0))})`),oy(e,l),e.intersect=function(t){return Dy.polygon(e,u,t)},t}async function Rm(t,e){var r=e.padding??0;return am(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??("neo"===e.look?16:2*r),labelPaddingY:"neo"===e.look?12:r})}async function Nm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?20:r),{shapeSvg:t,bbox:o}=(r="neo"===e.look?12:r,await iy(t,e,sy(e))),r=o.height+("neo"===e.look?2*r:r),o=o.width+r/4+("neo"===e.look?2*a:a),s=(a=r/2,e.cssStyles),n=ry.svg(t),l=ld(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let h=[{x:-o/2+a,y:-r/2},{x:o/2-a,y:-r/2},...hy(-o/2+a,0,a,50,90,270),{x:o/2-a,y:r/2},...hy(o/2-a,0,a,50,270,450)];r=ny(h);let c=n.path(r,l);return(o=t.insert(()=>c,":first-child")).attr("class","basic label-container outer-path"),s&&"handDrawn"!==e.look&&o.selectChildren("path").attr("style",s),i&&"handDrawn"!==e.look&&o.selectChildren("path").attr("style",i),oy(e,o),e.intersect=function(t){return Dy.polygon(e,h,t)},t}async function Wm(t,e){return am(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function jm(t,e,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:a}=nd(e),i=(e.labelStyle=i,e).cssStyles,{lineColor:r,stateBorder:o,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=ry.svg(l),c=ld(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let d=h.circle(0,0,e.width,{...c,stroke:r,strokeWidth:2});r=o??s,o=5*(e.width??0)/14;let u=h.circle(0,0,o,{...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),a&&s.selectAll("path").attr("style",a),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"})`)),oy(e,s),e.intersect=function(t){return Dy.circle(e,(e.width??0)/2,t)},l}function Hm(t,e,{config:{themeVariables:r}}){var{lineColor:r,nodeShadow:i}=r,a=((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 o;if("handDrawn"===e.look){let t=ry.svg(a).circle(0,0,e.width,id(r));(o=a.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(o=a.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??"",o.attr("style",`filter:url(#${r?r+"-drop-shadow-small":"drop-shadow-small"})`)),oy(e,o),e.intersect=function(t){return Dy.circle(e,(e.width??7)/2,t)},a}i(Pm,"shadedProcess"),i(zm,"slopedRect"),i(Rm,"squareRect"),i(Nm,"stadium"),i(Wm,"state"),i(jm,"stateEnd"),i(Hm,"stateStart");async function Um(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e?.padding??8),"neo"===e.look?28:r),{shapeSvg:t,bbox:o}=(r="neo"===e.look?12:r,await iy(t,e,sy(e))),r=(a=(e?.width??o.width)+16+a,o=(e?.height??o.height)+r,a-16),s=o,o=(a=-a/2,-o/2);let 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=ry.svg(t),h=ld(e,{});let i=l.rectangle(a,o,16+r,s,h),n=l.line(a+8,o,a+8,o+s,h),c=l.line(a+8+r,o,a+8+r,o+s,h);t.insert(()=>n,":first-child"),t.insert(()=>c,":first-child"),l=t.insert(()=>i,":first-child"),a=e.cssStyles,l.attr("class","basic label-container").attr("style",Yu(a)),oy(e,l)}else o=Ny(t,r,s,n),i&&o.attr("style",i),oy(e,o);return e.intersect=function(t){return Dy.polygon(e,n,t)},t}i(Um,"subroutine");async function Ym(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:t,bbox:o}=(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*a-.2*(e.height+2*r),10)),await iy(t,e,sy(e))),s=.2*(r=(e?.height||o.height)+2*r),n=.2*r,o=(e?.width||o.width)+2*a+s-s,r=(a=r,-o/2),l=-a/2,h=e.cssStyles,c=ry.svg(t),d=ld(e,{});let u=[{x:r-s/2,y:l},{x:r+o+s/2,y:l},{x:r+o+s/2,y:l+a},{x:r-s/2,y:l+a}];r=[{x:r+o-s/2,y:l+a},{x:r+o+s/2,y:l+a},{x:r+o+s/2,y:l+a-n}],"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid"),o=ny(u);let p=c.path(o,d);s=ny(r);let 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),oy(e,l),e.intersect=function(t){return Dy.polygon(e,u,t)},t}async function Gm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,label:a}=(e.labelStyle=r,await iy(t,e,sy(e))),o=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*o,h=.2*s,c=s+n,d=e.cssStyles,u=ry.svg(r),p=ld(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-o/2-o/2*.1,y:c/2},...ly(-o/2-o/2*.1,c/2,o/2+o/2*.1,c/2,n,.8),{x:o/2+o/2*.1,y:-c/2},{x:-o/2-o/2*.1,y:-c/2}];h=[{x:(f=-o/2+o/2*.1)+o-l,y:1.3*((c=-c/2-.4*h)+s)},{x:f+o,y:c+s-h},{x:f+o,y:.9*(c+s)},...ly(f+o,1.25*(c+s),f+o-l,1.3*(c+s),.02*-s,.5)];var f=ny(g);let y=u.path(f,p);l=ny(h);let 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})`),a.attr("transform",`translate(${-o/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-n/2-(t.y-(t.top??0))})`),oy(e,c),e.intersect=function(t){return Dy.polygon(e,g,t)},r}async function Xm(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await iy(t,e,sy(e))),a=Math.max(t.width+(e.padding??0),e?.width||0),o=-a/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",o).attr("y",s).attr("width",a).attr("height",t),oy(e,n),e.intersect=function(t){return Dy.rect(e,t)},r}i(Ym,"taggedRect"),i(Gm,"taggedWaveEdgedRectangle"),i(Xm,"text");var Vm=i((t,e,r,i,a,o)=>`M${t},${e}\n a${a},${o} 0,0,1 0,${-i}\n l${r},0\n a${a},${o} 0,0,1 0,${i}\n M${r},${-i}\n a${a},${o} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Zm=i((t,e,r,i,a,o)=>[`M${t},`+e,`M${t+r},`+e,`a${a},${o} 0,0,0 0,`+-i,`l${-r},0`,`a${a},${o} 0,0,0 0,`+i,`l${r},0`].join(" "),"createOuterCylinderPathD"),Qm=i((t,e,r,i,a,o)=>[`M${t+r/2},`+-i/2,`a${a},${o} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD");async function Km(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:a,bbox:t,label:o}=(r=(e.labelStyle=r,e.padding??0),r="neo"===e.look?12:r/2,(e.width||e.height)&&(a=e.height??0,e.height=(e.height??0)-r,e.height<5&&(e.height=5),e.width=(e.width??0)-r-a/2/(2.5+a/50)*3,e.width<10)&&(e.width=10),await iy(t,e,sy(e))),s=(e.height||t.height)+r;let 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=ry.svg(a),u=Zm(0,0,r,s,l,n),p=Qm(0,0,r,s,l,n);let t=d.path(u,ld(e,{})),i=d.path(p,ld(e,{fill:"none"}));c=a.insert(()=>i,":first-child"),(c=a.insert(()=>t,":first-child")).attr("class","basic label-container"),h&&c.attr("style",h)}else u=Vm(0,0,r,s,l,n),(c=a.insert("path",":first-child").attr("d",u).attr("class","basic label-container").attr("style",Yu(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} )`),o.attr("transform",`translate(${-t.width/2-l-(t.x-(t.left??0))}, ${-t.height/2-(t.y-(t.top??0))})`),oy(e,c),e.intersect=function(t){var r=Dy.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 a=l*l*(1-i*i/(n*n));0!=a&&(a=Math.sqrt(Math.abs(a))),a=l-a,0<t.x-(e.x??0)&&(a=-a),r.x+=a}return r},a}async function Jm(t,e){var r,{labelStyles:i,nodeStyles:a}=nd(e),o=i=(e.labelStyle=i,e.padding??0),i="neo"===e.look?2*i:i,{shapeSvg:t,bbox:r}=await iy(t,e,sy(e));let s,n=[{x:-3*(o=(e?.height??r.height)+o)/6,y:0},{x:(r=(e?.width??r.width)+i)+3*o/6,y:0},{x:r,y:-o},{x:0,y:-o}];if(i=e.cssStyles,"handDrawn"===e.look){var l=ry.svg(t),h=ld(e,{}),c=ny(n);let a=l.path(c,h);s=t.insert(()=>a,":first-child").attr("transform",`translate(${-r/2}, ${o/2})`),i&&s.attr("style",i)}else s=Ny(t,r,o,n);return a&&s.attr("style",a),e.width=r,e.height=o,oy(e,s),e.intersect=function(t){return Dy.polygon(e,n,t)},t}async function tC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:t,bbox:o}=(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*a,e.width<15)&&(e.width=15),await iy(t,e,sy(e))),o=(a=(e?.width||o.width)+2*a,(e?.height||o.height)+2*r),r=e.cssStyles,s=ry.svg(t),n=ld(e,{});"handDrawn"!==e.look&&(n.roughness=0,n.fillStyle="solid");let l=[{x:-a/2*.8,y:-o/2},{x:a/2*.8,y:-o/2},{x:a/2,y:-o/2*.6},{x:a/2,y:o/2},{x:-a/2,y:o/2},{x:-a/2,y:-o/2*.6}];a=ny(l);let h=s.path(a,n);return(o=t.insert(()=>h,":first-child")).attr("class","basic label-container outer-path"),r&&"handDrawn"!==e.look&&o.selectChildren("path").attr("style",r),i&&"handDrawn"!==e.look&&o.selectChildren("path").attr("style",i),oy(e,o),e.intersect=function(t){return Dy.polygon(e,l,t)},t}i(Km,"tiltedCylinder"),i(Jm,"trapezoid"),i(tC,"trapezoidalPentagon");async function eC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:t,bbox:a,label:o}=(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 iy(t,e,sy(e))),s=Ye(yi().flowchart?.htmlLabels),r=(e?.width||a.width)+r,n=e?.height||r+a.height;let l=[{x:0,y:0},{x:n,y:0},{x:n/2,y:-n}];var c=e.cssStyles,d=ry.svg(t),u=ld(e,{}),p=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),ny(l));let 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,oy(e,d),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${n/2-(a.height+(e.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return h.info("Triangle intersect",e,l,t),Dy.polygon(e,l,t)},t}async function rC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r);r="neo"===e.look?12:r;let o=!0;(e.width||e.height)&&(o=!1,e.width=(e?.width??0)-2*a,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 iy(t,e,sy(e)),r=(a=(e?.width||s.width)+2*(a??0),(e?.height||s.height)+2*(r??0)),l="neo"===e.look?r/4:r/8,h=r+(o?l:-l),c=e.cssStyles,d=0<(d=14-a)?d/2:0,u=ry.svg(t),p=ld(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-d,y:h/2},...ly(-a/2-d,h/2,a/2+d,h/2,l,.8),{x:a/2+d,y:-h/2},{x:-a/2-d,y:-h/2}];d=ny(g);let 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(${-a/2+(e.padding??0)-(s.x-(s.left??0))},${-r/2+(e.padding??0)-l-(s.y-(s.top??0))})`),oy(e,h),e.intersect=function(t){return Dy.polygon(e,g,t)},t}async function iC(t,e){var r,{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,e.padding??0),"neo"===e.look?16:r),{shapeSvg:o,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),o=Math.min(.2*e.height,e.height/4),e.height=Math.ceil(e.height-r-o*(20/9)),e.width=e.width-2*a),await iy(t,e,sy(e))),s=(a=(e?.width||t.width)+2*a,t=(t=(e?.height||t.height)+r)+2*(r=t/8),e.cssStyles),n=ry.svg(o),l=ld(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let h=[{x:-a/2,y:t/2},...ly(-a/2,t/2,a/2,t/2,r,1),{x:a/2,y:-t/2},...ly(a/2,-t/2,-a/2,-t/2,r,-1)];a=ny(h);let c=n.path(a,l);return(t=o.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),oy(e,t),e.intersect=function(t){return Dy.polygon(e,h,t)},o}i(eC,"triangle"),i(rC,"waveEdgedRectangle"),i(iC,"waveRectangle");var aC=10;async function oC(t,e){var r,{labelStyles:r,nodeStyles:i}=nd(e),a=(r=(e.labelStyle=r,"neo"===e.look?16:e.padding??0),"neo"===e.look?12:e.padding??0),{shapeSvg:t,bbox:o,label:s}=((e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*r-aC,10),e.height=Math.max((e?.height??0)-2*a-aC,10)),await iy(t,e,sy(e))),n=(r=(e?.width||o.width)+2*r+aC,a=(e?.height||o.height)+2*a+aC,-(r=r-aC)/2),l=-(a=a-aC)/2,h=e.cssStyles,c=ry.svg(t),d=ld(e,{});let u=[{x:n-aC,y:l-aC},{x:n-aC,y:l+a},{x:n+r,y:l+a},{x:n+r,y:l-aC}];r=`M${n-aC},${l-aC} L${n+r},${l-aC} L${n+r},${l+a} L${n-aC},${l+a} L${n-aC},${l-aC}\n M${n-aC},${l} L${n+r},${l}\n M${n},${l-aC} L${n},`+(l+a),"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let 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(${-o.width/2+5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),oy(e,n),e.intersect=function(t){return Dy.polygon(e,u,t)},t}i(oC,"windowPane");var sC=new Set(["redux-color","redux-dark-color"]),nC=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function lC(t,e){var r=e,{theme:i,themeVariables:a}=(r.alias&&(e.label=r.alias),rr()),{rowEven:o,rowOdd:s,nodeBorder:n,borderColorArray:a}=a,l=("handDrawn"===e.look&&(p=(p=rr().themeVariables).background,await lC(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}=nd(e);if(0===r.attributes.length&&e.label)return q={rx:0,ry:0,labelPaddingX:h,labelPaddingY:1.5*h,classes:""},Ou(e.label,l)+2*q.labelPaddingX<l.er.minEntityWidth&&(e.width=l.er.minEntityWidth),q=await am(t,e,q),null!=i&&sC.has(i)&&(x=r.colorIndex??0,q.attr("data-color-id","color-"+x%a.length)),Ye(l.htmlLabels)||(E=(x=q.select("text")).node()?.getBBox(),x.attr("transform",`translate(${-E.width/2}, 0)`)),q;l.htmlLabels||(h*=1.25,c*=1.25);let g=sy(e);g=g||"node default";var f=t.insert("g").attr("class",g).attr("id",e.domId||e.id);let y=await hC(f,e.label??"",l,0,0,["name"],u),m=(y.height+=c,0);var C,x=[],b=[];let k=0,w=0,T=0,S=0,v=!0,B=!0;for(C of r.attributes){var _=await hC(f,C.type,l,0,m,["attribute-type"],u),F=(k=Math.max(k,_.width+h),await hC(f,C.name,l,0,m,["attribute-name"],u)),L=(w=Math.max(w,F.width+h),await hC(f,C.keys.join(),l,0,m,["attribute-keys"],u)),M=(T=Math.max(T,L.width+h),await hC(f,C.comment,l,0,m,["attribute-comment"],u));_=(S=Math.max(S,M.width+h),Math.max(_.height,F.height,L.height,M.height)+c);b.push({yOffset:m,rowHeight:_}),m+=_}let A=4;T<=h&&(v=!1,T=0,A--),S<=h&&(B=!1,S=0,A--);var E=f.node().getBBox(),O=(t=(0<y.width+2*h-(k+w+T+S)&&(q=y.width+2*h-(k+w+T+S),k+=q/A,w+=q/A,0<T&&(T+=q/A),0<S)&&(S+=q/A),k+w+T+S),ry.svg(f)),$=ld(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let I=0;0<b.length&&(I=b.reduce((t,e)=>t+(e?.rowHeight??0),0));var D=Math.max(E.width+2*h,e?.width||0,t),q=Math.max((I??0)+y.height,e?.height||0);let P=-D/2,z=-q/2,R=(f.selectAll("g:not(:first-child)").each((t,e,r)=>{let i=0,a=0;(e=(r=ja(r[e])).attr("transform"))&&(e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(e))&&(i=parseFloat(e[1]),a=parseFloat(e[2]),r.attr("class").includes("attribute-name")?i+=k:r.attr("class").includes("attribute-keys")?i+=k+w:r.attr("class").includes("attribute-comment")&&(i+=k+w+T)),r.attr("transform",`translate(${P+h/2+i}, ${a+z+y.height+c/2})`)}),f.select(".name").attr("transform","translate("+-y.width/2+", "+(z+c/2)+")"),null!=i&&sC.has(i)&&(E=r.colorIndex??0,f.attr("data-color-id","color-"+E%a.length)),O.rectangle(P,z,D,q,$));var N,W,j;t=f.insert(()=>R,":first-child").attr("class","outer-path").attr("style",d.join(""));for([N,W]of(x.push(0),b.entries())){var H=(N+1)%2==0&&0!==W.yOffset;let t=O.rectangle(P,y.height+z+W?.yOffset,D,W?.rowHeight,{...$,fill:H?o:s,stroke:n});f.insert(()=>t,"g.label").attr("style",d.join("")).attr("class","row-rect-"+(H?"even":"odd"))}let U=cC(P,y.height+z,D+P,y.height+z,1e-4),Y=O.polygon(U.map(t=>[t.x,t.y]),$);for(j of(f.insert(()=>Y).attr("class","divider"),U=cC(k+P,y.height+z,k+P,q+z,1e-4),Y=O.polygon(U.map(t=>[t.x,t.y]),$),f.insert(()=>Y).attr("class","divider"),v&&(U=cC(r=k+w+P,y.height+z,r,q+z,1e-4),Y=O.polygon(U.map(t=>[t.x,t.y]),$),f.insert(()=>Y).attr("class","divider")),B&&(U=cC(E=k+w+T+P,y.height+z,E,q+z,1e-4),Y=O.polygon(U.map(t=>[t.x,t.y]),$),f.insert(()=>Y).attr("class","divider")),x)){var G=y.height+z+j;U=cC(P,G,D+P,G,1e-4),Y=O.polygon(U.map(t=>[t.x,t.y]),$),f.insert(()=>Y).attr("class","divider")}return oy(e,t),p&&"handDrawn"!==e.look&&(null!=i&&nC.has(i)?f.selectAll("path"):(a=p.split(";")?.filter(t=>t.includes("stroke"))?.map(t=>""+t).join("; "),f.selectAll("path").attr("style",a??""),f.selectAll(".row-rect-even path"))).attr("style",p),e.intersect=function(t){return Dy.rect(e,t)},f}async function hC(t,e,r,i=0,a=0,o=[],s=""){if(t=t.insert("g").attr("class","label "+o.join(" ")).attr("transform",`translate(${i}, ${a})`).attr("style",s),e!==Dr(e)&&(e=(e=Dr(e)).replaceAll("<","&lt;").replaceAll(">","&gt;")),o=t.node().appendChild(await Jg(t,e,{width:Ou(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("&lt;")||e.includes("&gt;")){let t=o.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=o.getBBox();return Ye(r.htmlLabels)&&((i=o.children[0]).style.textAlign="start",a=ja(o),n=i.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n}function cC(t,e,r,i,a){return t===r?[{x:t-a/2,y:e},{x:t+a/2,y:e},{x:r+a/2,y:i},{x:r-a/2,y:i}]:[{x:t,y:e-a/2},{x:t,y:e+a/2},{x:r,y:i+a/2},{x:r,y:i-a/2}]}async function dC(t,e,r,i,a=r.class.padding??12){var o=i?0:3,s=(i=t.insert("g").attr("class",sy(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 uC(t,{text:`«${e.annotations[0]}»`},0),h=(p=t.node().getBBox()).height),await uC(s=i.insert("g").attr("class","label-group text"),e,0,["font-weight: bolder"]);var d,u,p=s.node().getBBox(),g=p.height;n=i.insert("g").attr("class","members-group text");let f=0;for(d of e.members){f+=await uC(n,d,f,[d.parseClassifier()])+o}(c=n.node().getBBox().height)<=0&&(c=a/2),l=i.insert("g").attr("class","methods-group text");let y=0;for(u of e.methods){y+=await uC(l,u,y,[u.parseClassifier()])+o}return i.node().getBBox(),null!==t&&(e=t.node().getBBox(),t.attr("transform",`translate(${-e.width/2})`)),s.attr("transform",`translate(${-p.width/2}, ${h})`),i.node().getBBox(),n.attr("transform",`translate(0, ${h+g+2*a})`),i.node().getBBox(),l.attr("transform",`translate(0, ${h+g+(c?c+4*a:2*a)})`),t=i.node().getBBox(),{shapeSvg:i,bbox:t}}async function uC(t,e,r,a=[]){t=t.insert("g").attr("class","label").attr("style",a.join("; "));let o=rr(),s="useHtmlLabels"in e?e.useHtmlLabels:Ye(o.htmlLabels)??!0,n="";n="text"in e?e.text:e.label,!s&&n.startsWith("\\")&&(n=n.substring(1)),Wr(n)&&(s=!0),e=await Jg(t,xi(Hu(n)),{width:Ou(n,o)+50,classes:"markdown-node-label",useHtmlLabels:s},o);let l,h=1;if(s){var c=e.children[0],d=ja(e),u=(h=c.innerHTML.split("<br>").length,c.innerHTML.includes("</math>")&&(h+=c.innerHTML.split("<mrow>").length-1),c.getElementsByTagName("img"));if(u){let t=""===n.replace(/<img[^>]*>/g,"").trim();await Promise.all([...u].map(e=>new Promise(r=>{function a(){var i;e.style.display="flex",e.style.flexDirection="column",t?(i=o.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(a,"setupImage"),setTimeout(()=>{e.complete&&a()}),e.addEventListener("error",a),e.addEventListener("load",a)})))}l=c.getBoundingClientRect(),d.attr("width",l.width),d.attr("height",l.height)}else a.includes("font-weight: bolder")&&ja(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 pC(t,e){let r=yi();var i=(i=r.themeVariables).useGradient;let a=r.class.padding??12,o=a,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 dC(t,e,r,s,o));var{labelStyles:t,nodeStyles:c}=nd(e),c=(e.labelStyle=t,e.cssStyles=n.styles||"",n.styles?.join(";")||c||"");e.cssStyles||(e.cssStyles=c.replaceAll("!important","").split(";"));let d=0===n.members.length&&0===n.methods.length&&!r.class?.hideEmptyMembersBox;var u=ry.svg(l),p=ld(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),y=(e.height??0)>h.height,m=(0===n.members.length&&0===n.methods.length?f+=o:0<n.members.length&&0===n.methods.length&&(f+=2*o),-g/2),C=-f/2,x=d?2*a:0===n.members.length&&0===n.methods.length?-a:0,b=(y&&(x=2*a),u.rectangle(m-a,C-a-(d?a:0===n.members.length&&0===n.methods.length?-a/2:0),g+2*a,f+2*a+x,p));var k=((g=l.insert(()=>b,":first-child")).attr("class","basic label-container outer-path"),g.node().getBBox());let w=l.select(".annotation-group").node().getBBox().height-(d?a/2:0)||0,T=l.select(".label-group").node().getBBox().height-(d?a/2:0)||0,S=l.select(".members-group").node().getBBox().height-(d?a/2:0)||0,v=(w+T+C+a-(C-a-(d?a:0===n.members.length&&0===n.methods.length?-a/2:0)))/2;if(l.selectAll(".text").each((t,e,i)=>{let h=0,c=(h=(e=(i=ja(i[e])).attr("transform"))&&(e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(e))?parseFloat(e[2]):h)+C+a-(d?a:0===n.members.length&&0===n.methods.length?-a/2:0),u=(i.attr("class").includes("methods-group")&&(e=Math.max(S,o/2),c=y?Math.max(v,w+T+e+C+2*o+a)+2*o:w+T+e+C+4*o+a),0===n.members.length&&0===n.methods.length&&r.class?.hideEmptyMembersBox&&(c=0<n.annotations.length?h-o: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+a;let 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*o+a;let 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))),oy(e,g),e.intersect=function(t){return Dy.rect(e,t)},l}async function gC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),r=(e.labelStyle=r,e),a=e,o="verifyMethod"in e,s=sy(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=o?await fC(t,`&lt;&lt;${r.type}&gt;&gt;`,0,e.labelStyle):await fC(t,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);c+=(s=await fC(t,r.name,c,e.labelStyle+"; font-weight: bold;"))+20,o?(c+=o=await fC(t,r.requirementId?"ID: "+r.requirementId:"",c,e.labelStyle),c+=o=await fC(t,r.text?"Text: "+r.text:"",c,e.labelStyle),c+=o=await fC(t,r.risk?"Risk: "+r.risk:"",c,e.labelStyle),await fC(t,r.verifyMethod?"Verification: "+r.verifyMethod:"",c,e.labelStyle)):(c+=o=await fC(t,a.type?"Type: "+a.type:"",c,e.labelStyle),await fC(t,a.docRef?"Doc Ref: "+a.docRef:"",c,e.labelStyle)),r=(t.node()?.getBBox().width??200)+20;let d=(t.node()?.getBBox().height??200)+20,u=-r/2;o=-d/2,a=ry.svg(t);var p=ld(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=a.rectangle(u,o,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=ja(r[e])).attr("transform");let a=0,o=0;i&&(i=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(i[1]),o=parseFloat(i[2])),i=o-d/2;let s=10+u;0!==e&&1!==e||(s=a),r.attr("transform",`translate(${s}, ${20+i})`)}),c>h+s+20){var y=o+h+s+20;let i;i="neo"===e.look?(o=[[u,y],[u+r,y],[u+r,y+.001],[u,y+.001]],a.polygon(o,p)):a.line(u,y,u+r,y,p),t.insert(()=>i).attr("class","divider")}return oy(e,f),e.intersect=function(t){return Dy.rect(e,t)},i&&"handDrawn"!==e.look&&(l||n?.length)&&t.selectAll("path").attr("style",i),t}async function fC(t,e,r,i=""){if(""===e)return 0;t=t.insert("g").attr("class","label").attr("style",i);var a,o=yi(),s=o.htmlLabels??!0;e=await Jg(t,xi(Hu(e)),{width:Ou(e,o)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},o);let n;if(s)o=e.children[0],s=ja(e),n=o.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height);else{for(a of e.children[0].children)i&&a.setAttribute("style",i);(n=e.getBBox()).height+=6}return t.attr("transform",`translate(${-n.width/2},${-n.height/2+r})`),n.height}i(lC,"erBox"),i(hC,"addText"),i(cC,"lineToPolygon"),i(dC,"textHelper"),i(uC,"addText"),i(pC,"classBox"),i(gC,"requirementBox"),i(fC,"addText");var yC=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 mC(t,e,{config:r}){var{labelStyles:i,nodeStyles:a}=nd(e),{shapeSvg:t,bbox:o,label:s}=(i=(e.labelStyle=i||"",e.width),e.width=(e.width??200)-10,await iy(t,e,sy(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 ay(l,"ticket"in e&&e.ticket||"",r):await ay(t,"ticket"in e&&e.ticket||"",r));var{label:r,bbox:d}=await ay(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(o.height+20,e?.height||0)+u,g=-i/2,f=-p/2;let y;s.attr("transform","translate("+(n-i/2)+", "+(-u-o.height/2)+")"),h.attr("transform","translate("+(n-i/2)+", "+(-u+o.height/2)+")"),r.attr("transform","translate("+(n+i/2-d.width-20)+", "+(-u+o.height/2)+")");var{rx:s,ry:r}=e;n=e.cssStyles;if("handDrawn"===e.look){d=ry.svg(t),u=ld(e,{});let a=s||r?d.path(fy(g,f,i,p,s||0),u):d.rectangle(g,f,i,p,u);(y=t.insert(()=>a,":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",a).attr("rx",s??5).attr("ry",r??5).attr("x",g).attr("y",f).attr("width",i).attr("height",p),(o="priority"in e&&e.priority)&&(d=t.append("line"),u=2+g,n=f+Math.floor((s??0)/2),a=f+p-Math.floor((s??0)/2),d.attr("x1",u).attr("y1",n).attr("x2",u).attr("y2",a).attr("stroke-width","4").attr("stroke",yC(o)));return oy(e,y),e.height=p,e.intersect=function(t){return Dy.rect(e,t)},t}async function CC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,halfPadding:a,label:o}=(e.labelStyle=r,await iy(t,e,sy(e))),s=t.width+10*a,n=(a=t.height+8*a,.15*s),l=e.cssStyles,c=t.height+20,a=(s=Math.max(s,t.width+20),Math.max(a,c));let d;if(o.attr("transform",`translate(${-t.width/2}, ${-t.height/2})`),c=`M0 0 \n a${n},${n} 1 0,0 ${.25*s},${-1*a*.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*a}\n\n a${n},${n} 1 0,0 ${.15*s},${.33*a}\n a${.8*n},${.8*n} 1 0,0 0,${.34*a}\n a${n},${n} 1 0,0 ${-1*s*.15},${.33*a}\n\n a${n},${n} 1 0,0 ${-1*s*.25},${.15*a}\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*a*.15}\n\n a${n},${n} 1 0,0 ${-1*s*.1},${-1*a*.33}\n a${.8*n},${.8*n} 1 0,0 0,${-1*a*.34}\n a${n},${n} 1 0,0 ${.1*s},${-1*a*.33}\n H0 V0 Z`,"handDrawn"===e.look){o=ry.svg(r),t=ld(e,{});let i=o.path(c,t);(d=r.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",Yu(l))}else d=r.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",c);return d.attr("transform",`translate(${-s/2}, ${-a/2})`),oy(e,d),e.calcIntersect=function(t,e){return Dy.rect(t,e)},e.intersect=function(t){return h.info("Bang intersect",e,t),Dy.rect(e,t)},r}async function xC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e),{shapeSvg:r,bbox:t,halfPadding:a,label:o}=(e.labelStyle=r,await iy(t,e,sy(e))),s=t.width+2*a,a=t.height+2*a,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*a}\n a${d},${d} 1 0,1 ${-1*s*.15},${.65*a}\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*a*.35}\n a${d},${d} 1 0,1 ${.1*s},${-1*a*.65}\n H0 V0 Z`,"handDrawn"===e.look){c=ry.svg(r),n=ld(e,{});let t=c.path(l,n);(p=r.insert(()=>t,":first-child")).attr("class","basic label-container").attr("style",Yu(u))}else p=r.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",l);return o.attr("transform",`translate(${-t.width/2}, ${-t.height/2})`),p.attr("transform",`translate(${-s/2}, ${-a/2})`),oy(e,p),e.calcIntersect=function(t,e){return Dy.rect(t,e)},e.intersect=function(t){return h.info("Cloud intersect",e,t),Dy.rect(e,t)},r}async function bC(t,e){var{labelStyles:r,nodeStyles:i}=nd(e);e.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:n}=await iy(t,e,sy(e));var r=o.width+8*s,l=(t=o.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=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",l),a.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(${-o.width/2}, ${-o.height/2})`),a.append(()=>n.node()),oy(e,i),e.calcIntersect=function(t,e){return Dy.rect(t,e)},e.intersect=function(t){return Dy.rect(e,t)},a;throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`)}async function kC(t,e){return Hy(t,e,{padding:e.padding??0})}i(mC,"kanbanItem"),i(CC,"bang"),i(xC,"cloud"),i(bC,"defaultMindmapNode"),i(kC,"mindmapCircle");var wC=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Rm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:qm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Nm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Um},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:im},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:om},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Hy},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:CC},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:xC},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:$m},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:pm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Tm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:wm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Jm},{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:bm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:nm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Xm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Wy},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Pm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Hm},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:jm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Xy},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Zy},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ky},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Sm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:rC},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dm},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Km},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Fm},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Jy},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:sm},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:eC},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:oC},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:lm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tC},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:hm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Am},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Mm},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ry},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Yy},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Ym},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:iC},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Im},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Lm}],TC=i(()=>{var t=[...Object.entries({state:Wm,choice:jy,note:Em,rectWithTitle:Dm,labelRect:km,iconSquare:Cm,iconCircle:ym,icon:fm,iconRounded:mm,imageSquare:xm,anchor:qy,kanbanItem:mC,mindmapCircle:kC,defaultMindmapNode:bC,classBox:pC,erBox:lC,requirementBox:gC}),...wC.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(t)},"generateShapeMap"),SC=TC();function vC(t){return t in SC}i(vC,"isValidShape");var BC=new Map;async function _C(t,e,r){let i,a;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");var o=e.shape?SC[e.shape]:void 0;if(!o)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),a=await o(i,e,r)}else a=await o(t,e,r),i=a;return i.attr("data-look",Yu(e.look)),e.tooltip&&a.attr("title",e.tooltip),BC.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}i(_C,"insertNode");var FC=i((t,e)=>{BC.set(e.id,t)},"setNodeElem"),LC=i(()=>{BC.clear()},"clear"),MC=i(t=>{var e=BC.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"),AC=i((t,e)=>e?"translate("+-t.width/2+", "+-t.height/2+")":"translate("+-((t.x??0)+t.width/2)+", "+-((t.y??0)+t.height/2)+")","computeLabelTransform"),EC={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},OC={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function $C(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=IC(t),e=IC(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($C,"calculateDeltaAndAngle");var IC=i(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),DC=i(t=>({x:i(function(e,r,i){let a=0;var o=IC(i[0]).x<IC(i[i.length-1]).x?"left":"right",s=(r=(0===r&&Object.hasOwn(EC,t.arrowTypeStart)?(({angle:s,deltaX:n}=$C(i[0],i[1])),a=EC[t.arrowTypeStart]*Math.cos(s)*(0<=n?1:-1)):r===i.length-1&&Object.hasOwn(EC,t.arrowTypeEnd)&&(({angle:s,deltaX:n}=$C(i[i.length-1],i[i.length-2])),a=EC[t.arrowTypeEnd]*Math.cos(s)*(0<=n?1:-1)),Math.abs(IC(e).x-IC(i[i.length-1]).x)),Math.abs(IC(e).y-IC(i[i.length-1]).y)),n=Math.abs(IC(e).x-IC(i[0]).x),l=(i=Math.abs(IC(e).y-IC(i[0]).y),EC[t.arrowTypeStart]),h=EC[t.arrowTypeEnd];return r<h&&0<r&&s<h&&(s=h+1-r,a-=s*="right"==o?-1:1),n<l&&0<n&&i<l&&(h=l+1-n,a+=h*="right"==o?-1:1),IC(e).x+a},"x"),y:i(function(e,r,i){let a=0;var o=IC(i[0]).y<IC(i[i.length-1]).y?"down":"up",s=(r=(0===r&&Object.hasOwn(EC,t.arrowTypeStart)?(({angle:s,deltaY:n}=$C(i[0],i[1])),a=EC[t.arrowTypeStart]*Math.abs(Math.sin(s))*(0<=n?1:-1)):r===i.length-1&&Object.hasOwn(EC,t.arrowTypeEnd)&&(({angle:s,deltaY:n}=$C(i[i.length-1],i[i.length-2])),a=EC[t.arrowTypeEnd]*Math.abs(Math.sin(s))*(0<=n?1:-1)),Math.abs(IC(e).y-IC(i[i.length-1]).y)),Math.abs(IC(e).x-IC(i[i.length-1]).x)),n=Math.abs(IC(e).y-IC(i[0]).y),l=(i=Math.abs(IC(e).x-IC(i[0]).x),EC[t.arrowTypeStart]),h=EC[t.arrowTypeEnd];return r<h&&0<r&&s<h&&(s=h+1-r,a-=s*="up"==o?-1:1),n<l&&0<n&&i<l&&(h=l+1-n,a+=h*="up"==o?-1:1),IC(e).y+a},"y")}),"getLineFunctionsWithOffset"),qC=i((t,e,r,i,a,o=!1,s)=>{e.arrowTypeStart&&RC(t,"start",e.arrowTypeStart,r,i,a,o,s),e.arrowTypeEnd&&RC(t,"end",e.arrowTypeEnd,r,i,a,o,s)},"addEdgeMarkers"),PC={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}},zC=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],RC=i((t,e,r,i,a,o,s=!1,n)=>{let l=PC[r];var c=l&&zC.includes(l.type);l?(a=a+`_${o}-`+l.type+("start"===e?"Start":"End")+(s&&c?"-margin":""),n&&""!==n.trim()?(o=a+"_"+n.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(o)||(s=document.getElementById(a))&&((c=s.cloneNode(!0)).id=o,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}#${o})`)):t.attr("marker-"+e,`url(${i}#${a})`)):h.warn("Unknown arrow type: "+r)},"addEdgeMarker"),NC=i(t=>"string"==typeof t?t:yi()?.flowchart?.curve,"resolveEdgeCurveType"),WC=new Map,jC=new Map,HC=i(()=>{WC.clear(),jC.clear()},"clear"),UC=i(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),YC=i(async(t,e)=>{var r=yi(),i=dr(r),a=nd(e).labelStyles,o=(a=(e.labelStyle=a,t.insert("g").attr("class","edgeLabel"))).insert("g").attr("class","label").attr("data-id",e.id),s="markdown"===e.labelType;s=await Jg(t,e.label,{style:UC(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},r);o.node().appendChild(s),h.info("abc82",e,e.labelType);let n,l=s.getBBox(),c=l;if(i?(r=s.children[0],d=ja(s),l=r.getBoundingClientRect(),c=l,d.attr("width",l.width),d.attr("height",l.height)):(r=ja(s).select("text").node())&&"function"==typeof r.getBBox&&(c=r.getBBox()),o.attr("transform",AC(c,i)),WC.set(e.id,a),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=o=await gy(r,e.startLabelLeft,UC(e.labelStyle)||"",!1,!1)).getBBox();i&&(a=o.children[0],o=ja(o),s=a.getBoundingClientRect(),o.attr("width",s.width),o.attr("height",s.height)),r.attr("transform",AC(s,i)),jC.get(e.id)||jC.set(e.id,{}),jC.get(e.id).startLeft=d,GC(n,e.startLabelLeft)}if(e.startLabelRight){o=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let s=(n=r=await gy(o,e.startLabelRight,UC(e.labelStyle)||"",!1,!1)).getBBox();i&&(d=r.children[0],r=ja(r),s=d.getBoundingClientRect(),r.attr("width",s.width),r.attr("height",s.height)),o.attr("transform",AC(s,i)),jC.get(e.id)||jC.set(e.id,{}),jC.get(e.id).startRight=a,GC(n,e.startLabelRight)}if(e.endLabelLeft){r=(d=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let s=(n=o=await gy(d,e.endLabelLeft,UC(e.labelStyle)||"",!1,!1)).getBBox();i&&(a=o.children[0],o=ja(o),s=a.getBoundingClientRect(),o.attr("width",s.width),o.attr("height",s.height)),r.attr("transform",AC(s,i)),jC.get(e.id)||jC.set(e.id,{}),jC.get(e.id).endLeft=d,GC(n,e.endLabelLeft)}if(e.endLabelRight){o=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let s=(n=r=await gy(a,e.endLabelRight,UC(e.labelStyle)||"",!1,!1)).getBBox();i&&(d=r.children[0],t=ja(r),s=d.getBoundingClientRect(),t.attr("width",s.width),t.attr("height",s.height)),o.attr("transform",AC(s,i)),jC.get(e.id)||jC.set(e.id,{}),jC.get(e.id).endRight=a,GC(n,e.endLabelRight)}return s},"insertEdgeLabel");function GC(t,e){dr(yi())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}i(GC,"setTerminalWidth");var XC=i((t,e)=>{h.debug("Moving label abc88 ",t.id,t.label,WC.get(t.id),e);var r=e.updatedPath||e.originalPath,i=yi();i=Xu(i).subGraphTitleTotalMargin;if(t.label){var a=WC.get(t.id);let s=t.x,n=t.y;r&&(o=Wu.calcLabelPosition(r),h.debug("Moving label "+t.label+" from (",s,",",n,") to (",o.x,",",o.y,") abc88"),e.updatedPath)&&(s=o.x,n=o.y),a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){e=jC.get(t.id).startLeft;let i=t.x,a=t.y;r&&(i=(o=Wu.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r)).x,a=o.y),e.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){a=jC.get(t.id).startRight;let e=t.x,o=t.y;r&&(e=(i=Wu.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r)).x,o=i.y),a.attr("transform",`translate(${e}, ${o})`)}if(t.endLabelLeft){var o=jC.get(t.id).endLeft;let i=t.x,a=t.y;r&&(i=(e=Wu.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r)).x,a=e.y),o.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){i=jC.get(t.id).endRight;let e=t.x,o=t.y;r&&(e=(a=Wu.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r)).x,o=a.y),i.attr("transform",`translate(${e}, ${o})`)}},"positionEdgeLabel"),VC=i((t,e)=>{var r,i,a;return!(t?.isLabelEdge&&t?.id?.endsWith("-to-label")&&Array.isArray(e))||2!==e.length||([t,r]=e,i=Math.abs(r.x-t.x),a=Math.abs(r.y-t.y),i<.001)||a<.001?e:i<=a?[t,{x:t.x,y:r.y},r]:[t,{x:r.x,y:t.y},r]},"orthogonalizeToLabelClippedPoints"),ZC=i((t,e)=>{var r=t.x,i=t.y;r=Math.abs(e.x-r),e=Math.abs(e.y-i);return t.width/2<=r||t.height/2<=e},"outsideNode"),QC=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,a=t.y,o=Math.abs(i-r.x),s=t.width/2;let n=r.x<e.x?s-o:s+o;o=t.height/2,t=Math.abs(e.y-r.y);var l=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*s>Math.abs(i-e.x)*o)return n=l*(a=r.y<e.y?e.y-o-a:a-o-e.y)/t,o={x:r.x<e.x?r.x+n:r.x-l+n,y:r.y<e.y?r.y+t-a:r.y-t+a},0===n&&(o.x=e.x,o.y=e.y),0===l&&(o.x=e.x),0===t&&(o.y=e.y),h.debug(`abc89 top/bottom calc, Q ${t}, q ${a}, R ${l}, r `+n,o),o;{a=t*(n=r.x<e.x?e.x-s-i:i-s-e.x)/l;let o=r.x<e.x?r.x+l-n:r.x-l+n,c=r.y<e.y?r.y+a:r.y-a;return h.debug(`sides calc abc89, Q ${t}, q ${a}, R ${l}, r `+n,{_x:o,_y:c}),0===n&&(o=e.x,c=e.y),0===l&&(o=e.x),0===t&&(c=e.y),{x:o,y:c}}},"intersection"),KC=i((t,e)=>{h.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],a=!1;return t.forEach(t=>{if(h.info("abc88 checking point",t,e),ZC(e,t)||a)h.warn("abc88 outside",t,i),i=t,a||r.push(t);else{let o=QC(e,i,t),s=(h.debug("abc88 inside",t,i,o),h.debug("abc88 intersection",o,e),!1);r.forEach(t=>{s=s||t.x===o.x&&t.y===o.y}),r.some(t=>t.x===o.x&&t.y===o.y)?h.warn("abc88 no intersect",o,r):r.push(o),a=!0}}),h.debug("returning points",r),r},"cutPathAtIntersect");function JC(t){var e=[],r=[];for(let s=1;s<t.length-1;s++){var i=t[s-1],a=t[s],o=t[s+1];(i.x===a.x&&a.y===o.y&&5<Math.abs(a.x-o.x)&&5<Math.abs(a.y-i.y)||i.y===a.y&&a.x===o.x&&5<Math.abs(a.x-i.x)&&5<Math.abs(a.y-o.y))&&(e.push(a),r.push(s))}return{cornerPoints:e,cornerPointPositions:r}}i(JC,"extractCornerPoints");var tx=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"),ex=i(function(t){var e=JC(t).cornerPointPositions,r=[];for(let u=0;u<t.length;u++)if(e.includes(u)){var i=t[u-1],a=t[u+1],o=t[u],s=tx(i,o,5),n=tx(a,o,5),l=n.x-s.x,c=n.y-s.y,d=(r.push(s),2*Math.sqrt(2));let e={x:o.x,y:o.y};10<Math.abs(a.x-i.x)&&10<=Math.abs(a.y-i.y)?(h.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y)),e=o.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(a.x-i.x),Math.abs(a.y-i.y)),r.push(e,n)}else r.push(t[u]);return r},"fixCorners"),rx=i((t,e,r)=>(t=Math.floor((t-e-r)/4),`0 ${e} ${Array(t).fill("2 2").join(" ")} `+r),"generateDashArray"),ix=i(function(t,e,r,i,a,o,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,g=[];for(p in e.cssCompiledStyles)sd(p)||g.push(e.cssCompiledStyles[p]);"swimlane"===c?(o.intersect&&a.intersect&&Array.isArray(d)&&2<=d.length&&(d=2===d.length?[a.intersect(d[0]),o.intersect(d[1])]:(m=(c=d.slice(1,-1))[0],b=c[c.length-1],f=Math.abs(d[d.length-1].x-b.x)<.5&&Math.abs(d[d.length-1].y-b.y)<.5,x=a.intersect(m),f=f?b:o.intersect(b),b=Math.abs(f.x-b.x)<.5&&Math.abs(f.y-b.y)<.5?[]:[f],[...Math.abs(x.x-m.x)<.5&&Math.abs(x.y-m.y)<.5?[]:[x],...c,...b])),d=VC(e,d)):o.intersect&&a.intersect&&!n&&((d=d.slice(1,e.points.length-1)).unshift(a.intersect(d[0])),d.push(o.intersect(d[d.length-1])));var f=btoa(JSON.stringify(d));e.toCluster&&(h.info("to cluster abc88",r.get(e.toCluster)),d=KC(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=KC(d.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let y=d.filter(t=>!Number.isNaN(t.y));var m=NC(e.curve);"rounded"!==m&&(y=ex(y));let C=nn;switch(m){case"linear":case"rounded":C=nn;break;case"basis":default:C=mn;break;case"cardinal":C=Sn;break;case"bumpX":C=un;break;case"bumpY":C=pn;break;case"catmullRom":C=An;break;case"monotoneX":C=Hn;break;case"monotoneY":C=Un;break;case"natural":C=Xn;break;case"step":C=Zn;break;case"stepAfter":C=Kn;break;case"stepBefore":C=Qn}var{x:x,y:c}=DC(e),b=cn().x(x).y(c).curve(C);let k,w;switch(e.thickness){case"normal":default:k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-invisible"}switch(e.pattern){case"solid":default:k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed"}n="rounded"===m?ax(sx(y,e),5):b(y);let T=(a=Array.isArray(e.style)?e.style:[e.style]).find(t=>t?.startsWith("stroke:")),S="",v=(e.animate&&(S="edge-animation-fast"),e.animation&&(S="edge-animation-"+e.animation),!1),B=("handDrawn"===e.look?(o=ry.svg(t),Object.assign([],y),k+=" transition",x=(w=ja(r=o.path(n,{roughness:.3,seed:l})).select("path").attr("id",s+"-"+e.id).attr("class"," "+k+(e.classes?" "+e.classes:"")+(S?" "+S:"")).attr("style",a?a.reduce((t,e)=>t+";"+e,""):"")).attr("d"),w.attr("d",x),t.node().appendChild(w.node())):(c=g.join(";"),m=a?a.reduce((t,e)=>t+e+";",""):"",b=(c?c+";"+m+";":m)+";"+(a?a.reduce((t,e)=>t+";"+e,""):""),w=t.append("path").attr("d",n).attr("id",s+"-"+e.id).attr("class"," "+k+(e.classes?" "+e.classes:"")+(S?" "+S:"")).attr("style",b),T=b.match(/stroke:([^;]+)/)?.[1],v=!0===e.animate||!!e.animation||c.includes("animation"),l="function"==typeof(o=w.node()).getTotalLength?o.getTotalLength():0,r=OC[e.arrowTypeStart]||0,x=OC[e.arrowTypeEnd]||0,"neo"!==e.look||v||(m="dotted"===e.pattern||"dashed"===e.pattern?rx(l,r,x):`0 ${r} ${l-r-x} `+x,w.attr("style",`stroke-dasharray: ${m}; stroke-dashoffset: 0;`+w.attr("style")))),w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",e.id),w.attr("data-points",f),w.attr("data-look",Yu(e.look)),e.showPoints&&y.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)&&(B=(B=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),qC(w,e,B,s,i,a=!v&&"neo"===e?.look,T),b=d[n=Math.floor(d.length/2)],c={},(u=!Wu.isLabelCoordinateInPath(b,w.attr("d"))||u)&&(c.updatedPath=d),c.originalPath=e.points,c},"insertEdge");function ax(t,e){if(t.length<2)return"";let r="";var i=t.length;for(let u=0;u<i;u++){var a,o,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,a=d.x-h.x,d=d.y-h.y,s=Math.hypot(l,c),n=Math.hypot(a,d),s<1e-5)||n<1e-5||(l/=s,c/=s,a/=n,d/=n,o=Math.max(-1,Math.min(1,l*a+c*d)),(o=Math.acos(o))<1e-5)||Math.abs(Math.PI-o)<1e-5?r+=`L${h.x},`+h.y:(o=Math.min(e/Math.sin(o/2),s/2,n/2),s=h.x-l*o,n=h.y-c*o,l=h.x+a*o,c=h.y+d*o,r=(r+=`L${s},`+n)+`Q${h.x},${h.y} ${l},`+c)}return r}function ox(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 sx(t,e){var r,i,a,o=t.map(t=>({...t})),s=(2<=t.length&&EC[e.arrowTypeStart]&&(a=EC[e.arrowTypeStart],s=ox(i=t[0],t[1]).angle,r=a*Math.cos(s),a*=Math.sin(s),o[0].x=i.x+r,o[0].y=i.y+a),t.length);return 2<=s&&EC[e.arrowTypeEnd]&&(r=EC[e.arrowTypeEnd],i=t[s-1],a=ox(t[s-2],i).angle,e=r*Math.cos(a),t=r*Math.sin(a),o[s-1].x=i.x-e,o[s-1].y=i.y-t),o}i(ax,"generateRoundedPath"),i(ox,"calculateDeltaAndAngle"),i(sx,"applyMarkerOffsetsToPoints");var nx=i((t,e,r,i)=>{e.forEach(e=>{Mx[e](t,r,i)})},"insertMarkers"),lx=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"),hx=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"),cx=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"),dx=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"),ux=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"),px=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"),gx=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"),fx=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"),yx=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"),mx=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"),Cx=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"),xx=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"),bx=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"),kx=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"),wx=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"),Tx=i((t,e,r)=>{var i,a=rr().themeVariables,{strokeWidth:a,mainBkg:o}=a;(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",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",""+a).attr("r",6),i.append("path").attr("d","M9,0 L9,18").attr("stroke-width",""+a),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",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",""+a).attr("r",6),i.append("path").attr("d","M21,0 L21,18").attr("stroke-width",""+a)},"zero_or_one_neo"),Sx=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"),vx=i((t,e,r)=>{var i,a=rr().themeVariables,{strokeWidth:a,mainBkg:o}=a;(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",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",""+a),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",""+a),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",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",""+a),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",""+a)},"zero_or_more_neo"),Bx=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"),_x=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"),Fx=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"),Lx=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"),Mx={extension:lx,composition:hx,aggregation:cx,dependency:dx,lollipop:ux,point:px,circle:gx,cross:fx,barb:yx,barbNeo:mx,only_one:Cx,zero_or_one:xx,one_or_more:bx,zero_or_more:kx,only_one_neo:wx,zero_or_one_neo:Tx,one_or_more_neo:Sx,zero_or_more_neo:vx,requirement_arrow:Bx,requirement_contains:Fx,requirement_arrow_neo:_x,requirement_contains_neo:Lx},Ax=nx,Ex={common:Yr,getConfig:rr,insertCluster:Sy,insertEdge:ix,insertEdgeLabel:YC,insertMarkers:Ax,insertNode:_C,interpolateToCurve:pu,labelHelper:iy,log:h,positionEdgeLabel:XC},Ox={},$x=i(t=>{for(var e of t)Ox[e.name]=e},"registerLayoutLoaders"),Ix=(i(()=>{$x([{name:"dagre",loader:i(async()=>import("./dagre-VKFMJZFB-35daad97.js"),"loader")},{name:"swimlane",loader:i(async()=>import("./swimlanes-5IMT3BWC-791a3547.js"),"loader")},{name:"cose-bilkent",loader:i(async()=>import("./cose-bilkent-JH36ORCC-f0ddc3e7.js"),"loader")}])},"registerDefaultLayoutLoaders")(),i(async(t,e,r)=>{if(!(t.layoutAlgorithm in Ox))throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm);if(t.diagramId)for(var i of t.nodes){var a=i.domId||i.id;i.domId=t.diagramId+"-"+a}var o=Ox[t.layoutAlgorithm],s=await o.loader(),{theme:n,themeVariables:l}=t.config,{useGradient:l,gradientStart:h,gradientStop:c}=l,d=e.attr("id");return e.append("defs").append("filter").attr("id",d+"-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",n?.includes("dark")?"#FFFFFF":"#000000"),e.append("defs").append("filter").attr("id",d+"-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",n?.includes("dark")?"#FFFFFF":"#000000"),l&&((d=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",h).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)),s.render(t,e,Ex,{algorithm:o.algorithm},r)},"render")),Dx=i((t="",{fallback:e="dagre"}={})=>{if(t in Ox)return t;if(e in Ox)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"),qx="comm",Px="rule",zx="decl",Rx="@keyframes",Nx="@layer",Wx=Math.abs,jx=String.fromCharCode;function Hx(t){return t.trim()}function Ux(t,e,r){return t.replace(e,r)}function Yx(t,e){return 0|t.charCodeAt(e)}function Gx(t,e,r){return t.slice(e,r)}function Xx(t){return t.length}function Vx(t){return t.length}function Zx(t,e){return e.push(t),t}var Qx=1,Kx=1,Jx=0,tb=0,eb=0,rb="";function ib(t,e,r,i,a,o,s,n){return{value:t,root:e,parent:r,type:i,props:a,children:o,line:Qx,column:Kx,length:s,return:"",siblings:n}}function ab(){return eb=0<tb?Yx(rb,--tb):0,Kx--,10===eb&&(Kx=1,Qx--),eb}function ob(){return eb=tb<Jx?Yx(rb,tb++):0,Kx++,10===eb&&(Kx=1,Qx++),eb}function sb(){return Yx(rb,tb)}function nb(){return tb}function lb(t,e){return Gx(rb,t,e)}function hb(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 cb(t){return Hx(lb(tb-1,pb(91===t?t+2:40===t?t+1:t)))}function db(t){for(;(eb=sb())&&eb<33;)ob();return 2<hb(t)||3<hb(eb)?"":" "}function ub(t,e){for(;--e&&ob()&&!(eb<48||102<eb||57<eb&&eb<65||70<eb&&eb<97););return lb(t,nb()+(e<6&&32==sb()&&32==ob()))}function pb(t){for(;ob();)switch(eb){case t:return tb;case 34:case 39:34!==t&&39!==t&&pb(eb);break;case 40:41===t&&pb(t);break;case 92:ob()}return tb}function gb(t,e){for(;ob()&&t+eb!==57&&(t+eb!==84||47!==sb()););return"/*"+lb(e,tb-1)+"*"+jx(47===t?t:ob())}function fb(t){for(;!hb(sb());)ob();return lb(t,tb)}function yb(t){return function(t){return rb="",t}(mb("",null,null,null,[""],t=function(t){return Qx=Kx=1,Jx=Xx(rb=t),tb=0,[]}(t),0,[0],t))}function mb(t,e,r,i,a,o,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=a,S=w;C;)switch(h=k,k=ob()){case 40:108!=h&&58==Yx(S,g-1)?(b++,S+="("):S+=cb(k);break;case 41:b--,S+=")";break;case 34:case 39:case 91:S+=cb(k);break;case 9:case 10:case 13:case 32:S+=0<b?jx(k):db(h);break;case 92:S+=ub(nb()-1,7);continue;case 47:switch(sb()){case 42:case 47:Zx(xb(gb(ob(),nb()),e,r,l),l),5!=hb(h||1)&&5!=hb(sb()||1)||!Xx(S)||" "===Gx(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*m:n[u++]=Xx(S)*x;case 125*m:case 59:case 0:if(0<b&&k)S+=jx(k);else{switch(k){case 0:case 125:C=0;case 59+p:-1==x&&(S=Ux(S,/\f/g,"")),0<y&&(Xx(S)-g||0===m)&&Zx(32<y?bb(S+";",i,r,g-1,l):bb(Ux(S," ","")+";",i,r,g-2,l),l);break;case 59:S+=";";default:if(Zx(d=Cb(S,e,r,u,p,a,n,w,T=[],c=[],g,o),o),123===k)if(0===p)mb(S,e,d,d,T,o,g,n,c);else{switch(f){case 99:if(110===Yx(S,3))break;case 108:if(97===Yx(S,2))break;default:p=0;case 100:case 109:case 115:}p?mb(t,d,d,i&&Zx(Cb(t,d,d,0,0,a,n,w,a,T=[],g,c),c),a,c,g,n,i?T:c):mb(S,d,d,d,[""],c,0,n,c)}}u=p=y=0,m=x=1,w=S="",g=s}break;case 58:g=1+Xx(S),y=h;default:if(m<1)if(123==k)--m;else if(125==k&&0==m++&&125==ab())continue;switch(S+=jx(k),k*m){case 38:x=0<p?1:(S+="\f",-1);break;case 44:0<b||(n[u++]=(Xx(S)-1)*x,x=1);break;case 64:45===sb()&&(S+=cb(ob())),f=sb(),p=g=Xx(w=S+=fb(nb())),k++;break;case 45:45===h&&2==Xx(S)&&(m=0)}}return o}function Cb(t,e,r,i,a,o,s,n,l,h,c,d){for(var u,p=a-1,g=0===a?o:[""],f=Vx(g),y=0,m=0;y<i;++y)for(var C,x=0,b=Gx(t,p+1,p=Wx(u=s[y]));x<f;++x)(C=Hx(0<u?g[x]+" "+b:Ux(b,/&\f/g,g[x])))&&(l[m++]=C);return ib(t,e,r,0===a?Px:n,l,h,c,d)}function xb(t,e,r,i){return ib(t,e,r,qx,jx(eb),Gx(t,2,-2),0,i)}function bb(t,e,r,i,a){return ib(t,e,r,zx,Gx(t,0,i),Gx(t,i+1,-1),i,a)}function kb(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function wb(t,e,r,i){switch(t.type){case Nx:if(t.children.length)break;case"@import":case"@namespace":case zx:return t.return=t.return||t.value;case qx:return"";case Rx:return t.return=t.value+"{"+kb(t.children,i)+"}";case Px:if(!Xx(t.value=t.props.join(",")))return""}return Xx(r=kb(t.children,i))?t.return=t.value+"{"+r+"}":""}var Tb=i(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Sb={id:"c4",detector:Tb,loader:i(async()=>({id:"c4",diagram:(await import("./c4Diagram-LMCZKHZV-da04a76e.js")).diagram}),"loader")},vb="flowchart",Bb=i((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),_b=i(async()=>{var t=(await import("./flowDiagram-23GEKE2U-14ee2b3c.js")).diagram;return{id:vb,diagram:t}},"loader"),Fb={id:vb,detector:Bb,loader:_b},Lb="flowchart-v2",Mb=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"),Ab=i(async()=>{var t=(await import("./flowDiagram-23GEKE2U-14ee2b3c.js")).diagram;return{id:Lb,diagram:t}},"loader"),Eb={id:Lb,detector:Mb,loader:Ab},Ob="swimlane",$b=i(t=>/^\s*swimlane-beta\b/.test(t),"detector"),Ib=i(async()=>{var t=(await import("./swimlanesDiagram-G3AALYLV-b621330d.js")).diagram;return{id:Ob,diagram:t}},"loader"),Db={id:Ob,detector:$b,loader:Ib},qb=i(t=>/^\s*erDiagram/.test(t),"detector"),Pb={id:"er",detector:qb,loader:i(async()=>({id:"er",diagram:(await import("./erDiagram-Q63AITRT-bcb00855.js")).diagram}),"loader")},zb="gitGraph",Rb=i(t=>/^\s*gitGraph/.test(t),"detector"),Nb=i(async()=>{var t=(await import("./gitGraphDiagram-IHSO6WYX-4d9324ad.js")).diagram;return{id:zb,diagram:t}},"loader"),Wb={id:zb,detector:Rb,loader:Nb},jb="gantt",Hb=i(t=>/^\s*gantt/.test(t),"detector"),Ub=i(async()=>{var t=(await import("./ganttDiagram-NO4QXBWP-249a167d.js")).diagram;return{id:jb,diagram:t}},"loader"),Yb={id:jb,detector:Hb,loader:Ub},Gb="info",Xb=i(t=>/^\s*info/.test(t),"detector"),Vb=i(async()=>{var t=(await import("./infoDiagram-FWYZ7A6U-1267309e.js")).diagram;return{id:Gb,diagram:t}},"loader"),Zb={id:Gb,detector:Xb,loader:Vb},Qb=i(t=>/^\s*pie/.test(t),"detector"),Kb={id:"pie",detector:Qb,loader:i(async()=>({id:"pie",diagram:(await import("./pieDiagram-ENE6RG2P-0c3b09b8.js")).diagram}),"loader")},Jb="quadrantChart",tk=i(t=>/^\s*quadrantChart/.test(t),"detector"),ek=i(async()=>{var t=(await import("./quadrantDiagram-ABIIQ3AL-3d15c26d.js")).diagram;return{id:Jb,diagram:t}},"loader"),rk={id:Jb,detector:tk,loader:ek},ik="xychart",ak=i(t=>/^\s*xychart(-beta)?/.test(t),"detector"),ok=i(async()=>{var t=(await import("./xychartDiagram-FW5EYKEG-f2fac492.js")).diagram;return{id:ik,diagram:t}},"loader"),sk={id:ik,detector:ak,loader:ok},nk="requirement",lk=i(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),hk=i(async()=>{var t=(await import("./requirementDiagram-TGXJPOKE-5a337f1a.js")).diagram;return{id:nk,diagram:t}},"loader"),ck={id:nk,detector:lk,loader:hk},dk="sequence",uk=i(t=>/^\s*sequenceDiagram/.test(t),"detector"),pk=i(async()=>{var t=(await import("./sequenceDiagram-DBY2YBRQ-7bad18e4.js")).diagram;return{id:dk,diagram:t}},"loader"),gk={id:dk,detector:uk,loader:pk},fk="class",yk=i((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),mk=i(async()=>{var t=(await import("./classDiagram-OUVF2IWQ-fc2b54d6.js")).diagram;return{id:fk,diagram:t}},"loader"),Ck={id:fk,detector:yk,loader:mk},xk="classDiagram",bk=i((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),kk=i(async()=>{var t=(await import("./classDiagram-v2-EOCWNBFH-fc2b54d6.js")).diagram;return{id:xk,diagram:t}},"loader"),wk={id:xk,detector:bk,loader:kk},Tk="state",Sk=i((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),vk=i(async()=>{var t=(await import("./stateDiagram-2N3HPSRC-8047e124.js")).diagram;return{id:Tk,diagram:t}},"loader"),Bk={id:Tk,detector:Sk,loader:vk},_k="stateDiagram",Fk=i((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),Lk=i(async()=>{var t=(await import("./stateDiagram-v2-6OUMAXLB-d4c58fd3.js")).diagram;return{id:_k,diagram:t}},"loader"),Mk={id:_k,detector:Fk,loader:Lk},Ak="journey",Ek=i(t=>/^\s*journey/.test(t),"detector"),Ok=i(async()=>{var t=(await import("./journeyDiagram-5HDEW3XC-563a68ff.js")).diagram;return{id:Ak,diagram:t}},"loader"),$k={id:Ak,detector:Ek,loader:Ok},Ik=i((t,e,r)=>{h.debug("rendering svg for syntax error\n");var i=(e=tl(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"),Dk={draw:Ik},qk=Dk,Pk={db:{},renderer:Dk,parser:{parse:i(()=>{},"parse")}},zk="flowchart-elk",Rk=i((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),Nk=i(async()=>{var t=(await import("./flowDiagram-23GEKE2U-14ee2b3c.js")).diagram;return{id:zk,diagram:t}},"loader"),Wk={id:zk,detector:Rk,loader:Nk},jk="timeline",Hk=i(t=>/^\s*timeline/.test(t),"detector"),Uk=i(async()=>{var t=(await import("./timeline-definition-FHXFAJF6-f9600b97.js")).diagram;return{id:jk,diagram:t}},"loader"),Yk={id:jk,detector:Hk,loader:Uk},Gk="mindmap",Xk=i(t=>/^\s*mindmap/.test(t),"detector"),Vk=i(async()=>{var t=(await import("./mindmap-definition-LN4V7U3C-86a890ce.js")).diagram;return{id:Gk,diagram:t}},"loader"),Zk={id:Gk,detector:Xk,loader:Vk},Qk="kanban",Kk=i(t=>/^\s*kanban/.test(t),"detector"),Jk=i(async()=>{var t=(await import("./kanban-definition-HUTT4EX6-d8b002e3.js")).diagram;return{id:Qk,diagram:t}},"loader"),tw={id:Qk,detector:Kk,loader:Jk},ew="sankey",rw=i(t=>/^\s*sankey(-beta)?/.test(t),"detector"),iw=i(async()=>{var t=(await import("./sankeyDiagram-HTMAVEWB-209eac30.js")).diagram;return{id:ew,diagram:t}},"loader"),aw={id:ew,detector:rw,loader:iw},ow="packet",sw=i(t=>/^\s*packet(-beta)?/.test(t),"detector"),nw=i(async()=>{var t=(await import("./diagram-NH7WQ7WH-6f91f6aa.js")).diagram;return{id:ow,diagram:t}},"loader"),lw={id:ow,detector:sw,loader:nw},hw="radar",cw=i(t=>/^\s*radar-beta/.test(t),"detector"),dw=i(async()=>{var t=(await import("./diagram-WEI45ONY-dd634033.js")).diagram;return{id:hw,diagram:t}},"loader"),uw={id:hw,detector:cw,loader:dw},pw="block",gw=i(t=>/^\s*block(-beta)?/.test(t),"detector"),fw=i(async()=>{var t=(await import("./blockDiagram-677ZJIJ3-c769a3c8.js")).diagram;return{id:pw,diagram:t}},"loader"),yw={id:pw,detector:gw,loader:fw},mw="treeView",Cw=i(t=>/^\s*treeView-beta/.test(t),"detector"),xw=i(async()=>{var t=(await import("./diagram-OA4YK3LP-587273f4.js")).diagram;return{id:mw,diagram:t}},"loader"),bw={id:mw,detector:Cw,loader:xw},kw="architecture",ww=i(t=>/^\s*architecture/.test(t),"detector"),Tw=i(async()=>{var t=(await import("./architectureDiagram-ZJ3FMSHR-bde2dd21.js")).diagram;return{id:kw,diagram:t}},"loader"),Sw={id:kw,detector:ww,loader:Tw},vw="eventmodeling",Bw=i(t=>/^\s*eventmodeling/.test(t),"detector"),_w=i(async()=>{var t=(await import("./diagram-FQU43EPY-41eed431.js")).diagram;return{id:vw,diagram:t}},"loader"),Fw={id:vw,detector:Bw,loader:_w},Lw="ishikawa",Mw=i(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),Aw=i(async()=>{var t=(await import("./ishikawaDiagram-FXEZZL3T-9fef4653.js")).diagram;return{id:Lw,diagram:t}},"loader"),Ew={id:Lw,detector:Mw,loader:Aw},Ow="venn",$w=i(t=>/^\s*venn-beta/.test(t),"detector"),Iw=i(async()=>{var t=(await import("./vennDiagram-L72KCM5P-28cffef7.js")).diagram;return{id:Ow,diagram:t}},"loader"),Dw={id:Ow,detector:$w,loader:Iw},qw="treemap",Pw=i(t=>/^\s*treemap/.test(t),"detector"),zw=i(async()=>{var t=(await import("./diagram-G47NLZAW-aa02607c.js")).diagram;return{id:qw,diagram:t}},"loader"),Rw={id:qw,detector:Pw,loader:zw},Nw="wardley",Ww=i(t=>/^\s*wardley-beta/i.test(t),"detector"),jw=i(async()=>{var t=(await import("./wardleyDiagram-EHGQE667-d11fe904.js")).diagram;return{id:Nw,diagram:t}},"loader"),Hw={id:Nw,detector:Ww,loader:jw},Uw="cynefin",Yw=i(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),Gw=i(async()=>{var t=(await import("./cynefinDiagram-TSTJHNR4-910b3dfd.js")).diagram;return{id:Uw,diagram:t}},"loader"),Xw={id:Uw,detector:Yw,loader:Gw},Vw="railroad",Zw=i(t=>/^\s*railroad-beta/i.test(t),"detector"),Qw=i(async()=>{var t=(await import("./railroadDiagram-RFXS5EU6-ec9e696e.js")).diagram;return{id:Vw,diagram:t}},"loader"),Kw={id:Vw,detector:Zw,loader:Qw},Jw="railroadEbnf",tT=i(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),eT=i(async()=>{var t=(await import("./ebnfDiagram-CCIWWBDH-e9974165.js")).diagram;return{id:Jw,diagram:t}},"loader"),rT={id:Jw,detector:tT,loader:eT},iT="railroadAbnf",aT=i(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),oT=i(async()=>{var t=(await import("./abnfDiagram-VRR7QNED-686410b0.js")).diagram;return{id:iT,diagram:t}},"loader"),sT={id:iT,detector:aT,loader:oT},nT="railroadPeg",lT=i(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),hT=i(async()=>{var t=(await import("./pegDiagram-2B236MQR-64eeb662.js")).diagram;return{id:nT,diagram:t}},"loader"),cT={id:nT,detector:lT,loader:hT},dT=!1,uT=i(()=>{dT||(dT=!0,Ti("error",Pk,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(Wk,Zk,Sw),Cr(Sb,tw,wk,Ck,Pb,Yb,Zb,Kb,ck,gk,Db,Eb,Fb,Yk,Wb,Mk,Bk,$k,rk,aw,lw,sk,yw,Fw,bw,uw,Ew,Rw,Kw,rT,sT,cT,Dw,Hw,Xw))},"addDiagrams"),pT=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:a}=await r();Ti(a,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){for(var e of(h.error(`Failed to load ${t.length} external diagrams`),t))h.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function gT(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function fT(t,e,r,i){var a;void 0!==t.insert&&(r&&(t.attr("aria-describedby",a="chart-desc-"+i),t.insert("desc",":first-child").attr("id",a).text(r)),e)&&(t.attr("aria-labelledby",a="chart-title-"+i),t.insert("title",":first-child").attr("id",a).text(e))}i(gT,"setA11yDiagramInfo"),i(fT,"addSVGa11yTitleDescription");var yT=class t{constructor(t,e,r,i,a){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=a}static{i(this,"Diagram")}static async fromText(e,r={}){var i=rr(),a=mr(e,i);e=ju(e)+"\n";try{Si(a)}catch{var o;if(!(o=br(a)))throw new fr(`Diagram ${a} not found.`);var{id:o,diagram:s}=await o();Ti(o,s)}var{db:o,parser:s,renderer:n,init:l}=Si(a);return s.parser&&(s.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await s.parse(e),new t(a,e,o,s,n)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},mT=[],CT=i(()=>{mT.forEach(t=>{t()}),mT=[]},"attachFunctions"),xT=i(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function bT(t){var e=t.match(ur);if(!e)return{text:t,metadata:{}};let r=e[1];var i=r?e[2].split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e[2],a={};return(i="object"!=typeof(i=rd(i,{schema:ed})??{})||Array.isArray(i)?{}:i).displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:t.slice(e[0].length),metadata:a}}i(bT,"extractFrontMatter");var kT=i(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),wT=i(t=>{var{text:t,metadata:e}=bT(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"),TT=i(t=>{var e=Wu.detectInit(t)??{},r=Wu.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:du(t),directive:e}},"processDirectives");function ST(t){var e=kT(t),r=(e=wT(e),TT(e.text)),i=Nu(e.config,r.directive);return{code:t=xT(r.text),title:e.title,config:i}}function vT(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}i(ST,"preprocessDiagram"),i(vT,"toBase64");var BT=["foreignobject"],_T=["dominant-baseline"];function FT(t){return t=ST(t),or(),ar(t.config??{}),t}async function LT(t,e){uT();try{var{code:r,config:i}=FT(t);return{diagramType:(await NT(r)).type,config:i}}catch(t){if(e?.suppressErrors)return!1;throw t}}i(FT,"processAndSetConfigs"),i(LT,"parse");var MT=i((t,e,r=[])=>`.${t} ${e} `+He(`{ ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),AT=i((t,e=new Map)=>{let 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){let i=dr(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{ou(t.styles)||i.forEach(e=>{r.insertRule(MT(t.id,e,t.styles),r.cssRules.length)}),ou(t.textStyles)||r.insertRule(MT(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"),ET=i((t,e)=>kb(yb(t+`{${e}}`),function(t){var e=Vx(t);return function(r,i,a,o){for(var s="",n=0;n<e;n++)s+=t[n](r,i,a,o)||"";return s}}([i(function(e,r,i,a){"rule"===e.type&&Array.isArray(e.props)?e.parent&&e.parent.type===Rx||(e.props=e.props.map(e=>e.startsWith(t)?e:t+" "+e)):e.type.startsWith("@")&&!["@media","@supports",Nx,"@scope","@container","@starting-style",Rx].includes(e.type)&&(h.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=qx)},"addNamespace"),wb])),"compileCSS"),OT=i((t,e,r,i)=>(r=AT(t,r),e=ei(e,r,{...t.themeVariables,theme:t.theme,look:t.look},i),ET(i,e)),"createUserStyles"),$T=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=Hu(i)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),IT=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=vT(`<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"),DT=i((t,e,r,i,a)=>{var o=t.append("div");o.attr("id",r),i&&o.attr("style",i),r=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return a&&r.attr("xmlns:xlink",a),r.append("g"),t},"appendDivSvgG");function qT(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}i(qT,"sandboxedIframe");var PT=i((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),zT=i(async function(t,e,r){uT();var a=(e=(x=FT(e)).code,rr()),o=(h.debug(a),e.length>(a?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),"#"+t);let s="#"+(y="i"+t);let n="#"+(C="d"+t);var l=i(()=>{var t=ja(d?s:n).node();t&&"remove"in t&&t.remove()},"removeTempElements");let c=ja(document.body),d="sandbox"===a.securityLevel;var u="loose"===a.securityLevel,p=a.fontFamily;let g,f;void 0!==r?(r&&(r.innerHTML=""),d?(m=qT(ja(r),y),(c=ja(m.nodes()[0].contentDocument.body)).node().style.margin="0"):c=ja(r),DT(c,t,C,"font-family: "+p,"http://www.w3.org/1999/xlink")):(PT(document,t,C,y),d?(m=qT(ja(document.body),y),(c=ja(m.nodes()[0].contentDocument.body)).node().style.margin="0"):c=ja("body"),DT(c,t,C));try{g=await yT.fromText(e,{title:x.title})}catch(r){if(a.suppressErrorRendering)throw l(),r;g=await yT.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=OT(a,p,C,o);(r=document.createElement("style")).innerHTML=x,y.insertBefore(r,m);try{await g.renderer.draw(e,t,"11.16.0",g)}catch(r){throw a.suppressErrorRendering?l():qk.draw(e,t,"11.16.0"),r}WT(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",a.arrowMarkerAbsolute),b=$T(b,d,Ye(a.arrowMarkerAbsolute)),d?(C=c.select(n+" svg").node(),b=IT(b,C)):u||(b=ne.sanitize(b,{ADD_TAGS:BT,ADD_ATTR:_T,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),CT(),f)throw f;return l(),{diagramType:p,svg:b,bindFunctions:g.db.bindFunctions}},"render");function RT(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),uT()}i(RT,"initialize");var NT=i((t,e={})=>(t=ST(t).code,yT.fromText(t,e)),"getDiagramFromText");function WT(t,e,r,i){gT(e,t),fT(e,r,i,e.attr("id"))}i(WT,"addA11yInfo");var jT=Object.freeze({render:zT,parse:LT,getDiagramFromText:NT,initialize:RT,getConfig:rr,setConfig:er,getSiteConfig:tr,updateSiteConfig:Je,reset:i(()=>{or()},"reset"),globalReset:i(()=>{or(Ue)},"globalReset"),defaultConfig:Ue}),HT=(c(rr().logLevel),or(rr()),i((t,e,r)=>{h.warn(t),Pu(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")),UT=i(async function(t={querySelector:".mermaid"}){try{await YT(t)}catch(e){if(Pu(e)&&h.error(e.str),aS.parseError&&aS.parseError(e),!t.suppressErrors)throw h.error("Use the suppressErrors option to suppress these errors"),e}},"run"),YT=i(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var i=jT.getConfig();let a;if(h.debug((t?"":"No ")+"Callback function found"),r)a=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");a=document.querySelectorAll(e)}h.debug(`Found ${a.length} diagrams`),void 0!==i?.startOnLoad&&(h.debug("Start On Load: "+i?.startOnLoad),jT.updateSiteConfig({startOnLoad:i?.startOnLoad}));var o,s=new Wu.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),n=[];for(o of Array.from(a))if(h.info("Rendering diagram: "+o.id),!o.getAttribute("data-processed")){o.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=o.innerHTML,d=(c=Og(Wu.entityDecode(c)).trim().replace(/<br\s*\/?>/gi,"<br/>"),Wu.detectInit(c));d&&h.debug("Detected early reinit: ",d);try{var{svg:u,bindFunctions:p}=await rS(l,c,o);o.innerHTML=u,t&&await t(l),p&&p(o)}catch(t){HT(t,n,aS.parseError)}}if(0<n.length)throw n[0]},"runThrowsErrors"),GT=i(function(t){jT.initialize(t)},"initialize"),XT=i(async function(t,e,r){h.warn("mermaid.init is deprecated. Please use run instead."),t&&GT(t),t={postRenderCallback:r,querySelector:".mermaid"},"string"==typeof e?t.querySelector=e:e&&(e instanceof HTMLElement?t.nodes=[e]:t.nodes=e),await UT(t)},"init"),VT=i(async(t,{lazyLoad:e=!0}={})=>{uT(),Cr(...t),!1===e&&await pT()},"registerExternalDiagrams"),ZT=i(function(){aS.startOnLoad&&jT.getConfig().startOnLoad&&aS.run().catch(t=>h.error("Mermaid failed to initialize",t))},"contentLoaded"),QT=("undefined"!=typeof document&&window.addEventListener("load",ZT,!1),i(function(t){aS.parseError=t},"setParseErrorHandler")),KT=[],JT=!1,tS=i(async()=>{if(!JT){for(JT=!0;0<KT.length;){var t=KT.shift();if(t)try{await t()}catch(t){h.error("Error executing queue",t)}}JT=!1}},"executeQueue"),eS=i(async(t,e)=>new Promise((r,a)=>{KT.push(i(()=>new Promise((i,o)=>{jT.parse(t,e).then(t=>{i(t),r(t)},t=>{h.error("Error parsing",t),aS.parseError?.(t),o(t),a(t)})}),"performCall")),tS().catch(a)}),"parse"),rS=i((t,e,r)=>new Promise((a,o)=>{KT.push(i(()=>new Promise((i,s)=>{jT.render(t,e,r).then(t=>{i(t),a(t)},t=>{h.error("Error parsing",t),aS.parseError?.(t),s(t),o(t)})}),"performCall")),tS().catch(o)}),"render"),iS=i(()=>Object.keys(yr).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),aS={startOnLoad:!0,mermaidAPI:jT,parse:eS,render:rS,init:XT,run:UT,registerExternalDiagrams:VT,registerLayoutLoaders:$x,initialize:GT,parseError:void 0,contentLoaded:ZT,setParseErrorHandler:QT,detectType:mr,registerIconPacks:fp,getRegisteredDiagramsMetadata:iS},oS=aS,sS=Object.freeze({__proto__:null,default:oS});export{z as $,Dx as A,Ix as B,$ as C,a as D,Re as E,Nu as F,rr as G,_u as H,bi as I,ed as J,tl as K,Ce as L,Wr as M,jr as N,Or as O,Ur as P,Ru as Q,Dr as R,cn as S,mn as T,vu as U,kr as V,ri as W,Zr as X,q as Y,su as Z,i as _,he as a,Sd as a$,R as a0,an as a1,Js as a2,Qs as a3,tn as a4,Ys as a5,Vs as a6,Xs as a7,Hs as a8,Ks as a9,WC as aA,jC as aB,Xg as aC,Yd as aD,xd as aE,ru as aF,Dd as aG,Id as aH,$d as aI,Od as aJ,vd as aK,kd as aL,Fd as aM,bd as aN,Ad as aO,wd as aP,_d as aQ,zd as aR,Pd as aS,qd as aT,Nd as aU,Rd as aV,Bd as aW,Td as aX,Ed as aY,Md as aZ,Ld as a_,Zs as aa,Us as ab,js as ac,rn as ad,en as ae,Gs as af,Sy as ag,_C as ah,MC as ai,f as aj,E as ak,fp as al,Cp as am,Iu as an,ry as ao,Ax as ap,LC as aq,HC as ar,vy as as,oy as at,FC as au,Xu as av,ix as aw,XC as ax,YC as ay,EC as az,di as b,dr as b0,Tu as b1,Jg as b2,AC as b3,DC as b4,Hu as b5,Vu as b6,P as b7,on as b8,up as b9,Bo as ba,Eo as bb,lo as bc,Ao as bd,Io as be,sd as bf,nd as bg,Ha as bh,Ua as bi,go as bj,Ya as bk,uo as bl,Mo as bm,Fo as bn,n as bo,sS as bp,ci as c,yi as d,Yr as e,Eu as f,hi as g,Ou as h,_r as i,ja as j,Vr as k,h as l,ud as m,ui as n,pi as o,rd as p,vC as q,Uu as r,li as s,ne as t,Wu as u,ni as v,Mu as w,Ci as x,cr as y,mi as z};